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

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

Python Security Scan and Fix Loop (10 AST Rules, SARIF) is a paid AI agent skill on Agensi by José Miguel Gómez, in Security. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: $7 (one-time purchase)
- Creator: [José Miguel Gómez](https://www.agensi.io/creators/jose-miguel-gomez)
- Category: [Security](https://www.agensi.io/skills/security)
- Version: 1.0
- Last updated: 2026-12-03
- Security: scan passed (2026-12-03); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/python-security-scan-and-fix-loop-10-ast-rules-sarif
- Tags: security, code-review, python, sast

## 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: "Review this Python code for security problems."
- **Founders shipping a Python app:** Find and fix common coding mistakes that let hackers in. Try: "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: "List every nosast suppression in this project."

## 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.

## Requires

- Python

## Known limitations

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

## Technical details

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 this skill

1. Connect your AI agent to Agensi once: add the MCP server https://mcp.agensi.io/mcp/auth and sign in with your Agensi account (OAuth, no API key). Steps for Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and other agents: https://www.agensi.io/docs/mcp-setup
2. Ask your agent: "Use the Python Security Scan and Fix Loop (10 AST Rules, SARIF) skill from Agensi" and describe your task.
3. Buy it on the listing or let your agent ask you first; your agent then loads it from Agensi when it needs it. Every paid skill has a money-back guarantee: https://www.agensi.io/docs/money-back-guarantee

## Frequently asked questions

### What problems does this skill help me solve?

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.

### What software or accounts do I need to use this?

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.

### What specific files or reports will I get back?

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.

### Are there any limits to what this skill can find?

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.

### How should I ask my agent to start the security process?

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.

### What happens if the skill finds a problem that I do not want to fix?

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.

---

Source: [Agensi](https://www.agensi.io), the marketplace of skills for AI agents. Any MCP-compatible agent (Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and more) connects at https://mcp.agensi.io/mcp/auth and signs in with an Agensi account; setup for every agent: https://www.agensi.io/docs/mcp-setup. Append .md to any skill, guide or docs address on agensi.io for its markdown version.
