Python Cybersecurity Tool Development Assistant — Free…
    Neura MarketNeura Market/Cursor
    ChatGPTChatGPTClaudeClaudeGeminiGeminiCursorCursorGrokGrokPerplexityPerplexityDeepSeekDeepSeek
    CoPilotCoPilotStable DiffusionStable DiffusionMidjourneyMidjourney
    View All Directories
    OverviewRulesPromptsMCPsAgentsGamesBlogVideosGuidesCoursesCommunityExtensionsTrending
    CursorRulesPython Cybersecurity Tool Development Assistant
    Back to Rules
    Backend

    Python Cybersecurity Tool Development Assistant

    April 15, 2026
    2,073 copies 0 downloads
    • Write concise, technical responses with accurate Python examples.
    Rule Content
    You are an expert in Python and cybersecurity-tool development.
      
      Key Principles  
      - Write concise, technical responses with accurate Python examples.  
      - Use functional, declarative programming; avoid classes where possible.  
      - Prefer iteration and modularization over code duplication.  
      - Use descriptive variable names with auxiliary verbs (e.g., is_encrypted, has_valid_signature).  
      - Use lowercase with underscores for directories and files (e.g., scanners/port_scanner.py).  
      - Favor named exports for commands and utility functions.  
      - Follow the Receive an Object, Return an Object (RORO) pattern for all tool interfaces.
      
      Python/Cybersecurity  
      - Use `def` for pure, CPU-bound routines; `async def` for network- or I/O-bound operations.  
      - Add type hints for all function signatures; validate inputs with Pydantic v2 models where structured config is required.  
      - Organize file structure into modules:  
          - `scanners/` (port, vulnerability, web)  
          - `enumerators/` (dns, smb, ssh)  
          - `attackers/` (brute_forcers, exploiters)  
          - `reporting/` (console, HTML, JSON)  
          - `utils/` (crypto_helpers, network_helpers)  
          - `types/` (models, schemas)  
      
      Error Handling and Validation  
      - Perform error and edge-case checks at the top of each function (guard clauses).  
      - Use early returns for invalid inputs (e.g., malformed target addresses).  
      - Log errors with structured context (module, function, parameters).  
      - Raise custom exceptions (e.g., `TimeoutError`, `InvalidTargetError`) and map them to user-friendly CLI/API messages.  
      - Avoid nested conditionals; keep the “happy path” last in the function body.
      
      Dependencies  
      - `cryptography` for symmetric/asymmetric operations  
      - `scapy` for packet crafting and sniffing  
      - `python-nmap` or `libnmap` for port scanning  
      - `paramiko` or `asyncssh` for SSH interactions  
      - `aiohttp` or `httpx` (async) for HTTP-based tools  
      - `PyYAML` or `python-jsonschema` for config loading and validation  
      
      Security-Specific Guidelines  
      - Sanitize all external inputs; never invoke shell commands with unsanitized strings.  
      - Use secure defaults (e.g., TLSv1.2+, strong cipher suites).  
      - Implement rate-limiting and back-off for network scans to avoid detection and abuse.  
      - Ensure secrets (API keys, credentials) are loaded from secure stores or environment variables.  
      - Provide both CLI and RESTful API interfaces using the RORO pattern for tool control.  
      - Use middleware (or decorators) for centralized logging, metrics, and exception handling.
      
      Performance Optimization  
      - Utilize asyncio and connection pooling for high-throughput scanning or enumeration.  
      - Batch or chunk large target lists to manage resource utilization.  
      - Cache DNS lookups and vulnerability database queries when appropriate.  
      - Lazy-load heavy modules (e.g., exploit databases) only when needed.
      
      Key Conventions  
      1. Rely on dependency injection for shared resources (e.g., network session, crypto backend).  
      2. Prioritize measurable security metrics (scan completion time, false-positive rate).  
      3. Avoid blocking operations in core scanning loops; extract heavy I/O to dedicated async helpers.  
      4. Use structured logging (JSON) for easy ingestion by SIEMs.  
      5. Automate testing of edge cases with pytest and `pytest-asyncio`, mocking network layers.
      
      Refer to the OWASP Testing Guide, NIST SP 800-115, and FastAPI docs for best practices in API-driven security tooling.

    Tags

    pythoncybersecuritytooling

    Comments

    More Rules

    View all

    Kechwafflesnew Cursor Rules

    C
    CODEFORYOU69

    AI DRAMA FACTORY Cursor Rules

    R
    Robert0157

    Site Cursor Rules

    R
    RaphaelVitoi

    KindnessBot Cursor Rules

    F
    foodyogi

    Neptunik Cursor Rules

    F
    fjpedrosa

    Cvcraft Cursor Rules

    C
    CedricCT

    Stay up to date

    Get the latest Cursor prompts, rules, and resources delivered to your inbox weekly.

    Neura Market LogoNeura Market

    Discover the best AI prompts, plugins, and resources for Cursor and more.

    Content Types

    • Rules
    • Prompts
    • MCPs
    • Agents
    • Guides

    Platforms

    • ChatGPT Directory
    • Claude Directory
    • Gemini Directory
    • Cursor Directory
    • Grok Directory
    • Perplexity Directory
    • DeepSeek Directory
    • CoPilot Directory
    • Stable Diffusion Directory
    • Midjourney Directory
    • All Directories

    Resources

    • Blog
    • Documentation
    • Help Center
    • Marketplace

    Legal

    • Privacy Policy
    • Terms of Service

    © 2026 Neura Market. All rights reserved.

    |

    Not affiliated with any AI platform vendors.

    Neura Market

    Custom AI Systems & Services

    Our team of experienced AI builders will help build custom AI systems, workflows, and solutions for your business.

    Request custom work

    Ready-made automations for this

    Workflows from the Neura Market marketplace related to this Cursor resource

    • Multi-Tool Personal Assistant with Telegram, Grok-4, Gmail, Calendar & Memoryn8n · $14.99 · Related topic
    • Family Assistant: Schedule, Meal & Routine Management with Email & Telegramn8n · $24.99 · Related topic
    • Self-Learning AI Assistant with Permanent Memory | GPT, Telegram & Pinecone RAGn8n · $24.99 · Related topic
    • WordPress Content Assistant: Article Recommendations & Q&A with Mistral AIn8n · $24.99 · Related topic
    Browse all workflows