Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIMuseMuseDotsDots+21 more

    Advanced Taint Tracking Python

    1

    Detect SQLi, RCE, and SSTI vulnerabilities in Python apps using advanced AST taint tracking and dataflow tracing.

    $15

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

    Security scanned
    Advanced Taint Tracking Python

    Advanced Taint Tracking Python

    Example session with this skill installed

    Audit the current project for potential SQL injection and RCE by tracing request inputs to database and shell sinks.

    • Read your context and instructions
    • Compiled the advanced taint tracking

    I have completed the AST taint analysis for the project. I identified one high-severity SQL injection path and one medium-severity RCE risk involving untrusted user input.

    Taint Analysis Report

    IDSourceIntermediateSinkVulnerability
    T-001request.args.get('id')db_manager.py:get_user_query()cursor.execute()SQL Injection (Raw String Formatting)
    T-002request.json['cmd']utils.py:run_diagnostic()subprocess.Popen()Remote Code Execution (Shell=True)

    Mitigation Code (T-001: SQL Injection)

    
    # Vulnerable code in db_manager.py
    # query = f"SELECT * FROM users WHERE id = {user_id}"
    # cursor.execute(query)
    
    # Recommended Fix: Use parameterized queries
    query = "SELECT * FROM users WHERE id = %s"
    cursor.execute(query, (user_id,))
    

    Mitigation Code (T-002: RCE)

    
    # Vulnerable code in utils.py
    # subprocess.Popen(user_command, shell=True)
    
    # Recommended Fix: Use list-based arguments and disable shell
    # Map user input to a predefined list of allowed commands
    allowed_commands = {"status": ["/usr/bin/uptime"], "check": ["/usr/bin/df", "-h"]}
    if user_command in allowed_commands:
        subprocess.Popen(allowed_commands[user_command], shell=False)
    

    Next steps

    1. Apply the parameterized query fix in db_manager.py.
    2. Refactor utils.py to use an allow-list for shell commands instead of passing raw strings.
    3. Run the automated evaluation suite to verify the fixes.

    Connects securely to your tools. The creator never sees your data.

    About this skill

    Manual security audits often miss deep dataflow vulnerabilities hidden across multiple files. This skill performs static AST taint analysis to track untrusted user input from entry points to dangerous execution sinks.

    What it does

    • Source Mapping identifies untrusted data entry points like request.args, request.json, and HTTP headers.
    • Propagation Tracing follows data through intermediate functions, variable assignments, and serialization steps.
    • Sink Detection flags dangerous functions including subprocess.Popen, eval, and raw SQL execute calls.
    • Mitigation Generation provides exact code fixes using parameterized queries and safe alternatives.

    How it works

    1. Initialize Analysis by scanning API endpoints and controllers for untrusted input sources.
    2. Trace Dataflow across project files to see how variables move through the application logic.
    3. Audit Sinks to determine if sanitization occurs before the data reaches a sensitive function.
    4. Export Results as an AST taint path graph detailing the vulnerability and the fix.

    Frameworks & tools

    Built for Python web frameworks including Flask and Django. It utilizes Abstract Syntax Tree (AST) analysis for cross-file dataflow tracing without requiring external binaries.

    Why this beats prompting it yourself

    Generic prompts often overlook how data is transformed between files, leading to false negatives in security audits. This skill follows a deterministic workflow to ensure every hop from source to sink is mapped and validated against known dangerous patterns.

    Use cases

    • Detect SQL Injection by tracing user input into raw database cursor executions.
    • Identify RCE Risks where unsanitized strings reach os.system or subprocess.
    • Prevent SSTI by auditing render_template_string calls in Flask applications.
    • PR Security Reviews to automatically check new endpoints for tainted data paths.

    Known limitations

    Restricted to pure Python AST analysis within the local workspace. It cannot detect vulnerabilities in external binaries or global system configurations.

    Limited to Python AST analysis. Restricted to local workspace files. Cannot analyze external binaries or system-level dependencies.

    How to use

    1. 1

      Connect your agent to the Agensi MCP

      Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup

    2. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before any payment.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill goes through the trust checks below.

    Security scanned

    Checked by our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    Money-back guarantee

    Doesn't do what its page promises? You get your money back.

    Trust & safety

    Security scan

    Security scan passed 4 days ago

    Requires

    Python
    File System Read/Write (strictly scoped to current project workspace `./`). Zero global installation or elevated privileges required.

    Permissions

    Read Files
    Network Access

    Target Use Cases: - Trace untrusted input from HTTP request to database query in Python. - Perform taint analysis on this Django view for SQL injection. - Audit dataflow from user upload to file system sink.

    Listed4 days ago

    What's inside

    Frequently Asked Questions

    This skill performs automated static analysis by mapping the 'taint' (untrusted data) from its source, through various function calls, until it reaches a dangerous sink like a database execution or system command. Unlike manual reviews, it deterministically traces data across multiple files to find hidden vulnerabilities.

    The skill is optimized for Python applications built on Flask or Django and works within any AI agent environment that supports file-system access and Python script execution. It requires no external binaries as it relies on Python's native Abstract Syntax Tree (AST) modules.

    Upon purchase, you receive the full skill logic, integration documentation for your AI agent, and a library of pre-defined 'sinks' (dangerous functions) and 'sources' (API entry points) used to trigger the analysis.

    Because it performs static analysis on your source code locally within the workspace, it does not require an active database connection or a running instance of your application to find vulnerabilities.

    Yes, the skill is designed for DevSecOps workflows and can be triggered via your AI agent during the Pull Request process to automatically flag security risks in new code before it is merged.

    The current version is focused on pure Python dataflow; it does not trace data through external C-extensions, compiled binaries, or infrastructure-level configurations outside of the workspace files.

    New in DevOps & Cloud