Python Security Scan and Fix Loop (10 AST Rules, SARIF)

    by José Miguel Gómez

    1

    Scan Python for ten security issues, fix them with ready recipes, rescan against a baseline and export SARIF. Stdlib only, no network.

    $7

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

    Security scanned

    Works with the AI Agents you already use

    What it does

    • Scans Python files for ten specific security risks like weak encryption or unsafe commands
    • Groups findings by how dangerous they are so you know what to fix first
    • Provides specific code recipes to replace insecure lines with safe versions
    • Tracks fixes against a baseline to confirm that problems are actually gone
    • Lists every ignored security warning to make sure no one is hiding a real risk
    • Exports reports in standard formats that other security tools can read

    Who it's for

    Developers making a pull request safe

    Check your Python code for security holes before you merge it.

    Try asking: “Review this Python code for security problems.”

    Founders shipping a Python app

    Find and fix common coding mistakes that let hackers in.

    Try asking: “Run a security scan on the src folder.”

    Security leads auditing a project

    Get a clear report of every security risk and every ignored warning.

    Try asking: “List every nosast suppression in this project.”

    Python Security Scan and Fix Loop (10 AST Rules, SARIF)

    Example session with this skill installed

    Run a security scan on the code in the src/ folder and tell me what needs to be fixed.

    • Read your context and instructions
    • Compiled the python security scan

    I will run a security scan on the src/ folder to find any risks.

    I have completed the scan using ten security rules. I found 3 findings that need your attention:

    High Severity

    • Rule PY008 (SQL Injection): In src/database.py at line 42, you are using a formatted string to build a database query. This is risky because a user could trick your database.
    • Fix: Use bound parameters instead of f-strings or plus signs.

    Medium Severity

    • Rule PY005 (Weak Hash): In src/auth.py at line 12, the code uses MD5. This is an old, weak way to protect data.
    • Fix: Use SHA-256 or a newer method instead.
    • Rule PY010 (Debug Mode): In src/app.py at line 5, the app is set to debug=True.
    • Fix: Set this to False before you share the code with others.

    I have saved these findings to a baseline file. Would you like me to show you the exact code recipes to fix the SQL injection risk first?

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

    About this skill

    When you write Python code, it is easy to leave the door open for hackers by mistake. This skill acts like a security guard for your project. It looks through your files for ten specific types of danger, like weak passwords, risky database commands, or insecure ways of reading data. Instead of just telling you there is a problem, it helps you fix it and then checks your work to make sure the hole is truly plugged.

    How it works

    1. Your AI agent scans your Python folders to find security risks and saves a list of what it found.
    2. It looks at each problem and explains if it is a real danger or a harmless mistake.
    3. You use the provided fix instructions to update the code.
    4. The agent rescans the code to prove the old risks are gone and no new ones were added.
    5. It creates a final report showing what was fixed and what was intentionally left alone.

    What you get: A list of security fixes for your Python code and a report proving the project is safer.

    Only checks Python files. It cannot see how data moves between different functions or files.

    Built for Python 3.10+ using standard library AST modules. Includes sast_flow.py and sast_scan.py scripts. Generates JSON baselines and SARIF 2.1.0 reports. Provides markdown reference files for triage, fix recipes, and suppression policies. Does not require external APIs or network access.

    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 buying a skill.

    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.

    Frequently Asked Questions

    This skill acts as a security guard for Python projects. It scans your code for ten specific risks like weak passwords or unsafe database commands, provides instructions to fix them, and then verifies that the fixes actually worked.

    This skill works on Python 3.10 or newer. You do not need to install any external software or create new accounts because it uses only the standard tools already built into Python.

    The skill provides a list of security fixes for your code and a report that proves the risks are gone. It can also create a file called a baseline to track your progress and a SARIF file, which is a standard format used to share security results with other software.

    This skill only scans Python files and does not track how data moves between different functions or files. It is designed to find risks within a single file at a time rather than analyzing the entire logic of a complex system.

    You can ask your agent to review your Python code for security problems, run a SAST scan, or make a pull request safe to merge. It is best used when you want to find vulnerabilities and get a plan to fix them.

    If a security alert is a mistake or harmless in your specific case, you can use a special comment in your code to ignore it. The skill will then list these decisions in your final report so you can keep track of why certain items were not changed.

    New in Security

    Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Security.