Python sast

From vladkesler/initrunner · View interactive version

Python sast is an AI agent skill from the GitHub repository vladkesler/initrunner. Python static analysis using bandit. Identifies injection, deserialization, unsafe exec/eval, weak crypto, and hardcoded credentials in Python code.

How to use this skill

Skill file

Python static analysis skill using bandit.

When to activate

Use this skill when the repository contains Python code: pyproject.toml,

setup.py, requirements.txt, or .py files in the source tree.

Scanner command

bandit -r . -f json -ll --exclude .venv,tests,node_modules

The -ll flag filters to medium and higher confidence. The -f json flag

returns structured output for parsing.

Parsing output

Bandit JSON output has a results array. Each result contains:

Key test IDs

| Test ID | Category |

|---------|----------|

| B101 | assert used (usually test-only) |

| B102 | exec() used |

| B301-B324 | Deserialization, SQL injection, unsafe YAML |

| B501-B507 | SSL/TLS issues |

| B601-B612 | Shell injection, subprocess |

Verification steps

For each finding:

  1. Read 10 lines of context around the flagged line using read_file.
  2. Trace backwards: where does the input come from? Follow the variable

to its source (function parameter, request object, file read, etc.).

  1. If the input comes from user/network input (request.args, sys.argv,

file read, socket, etc.), classify as HIGH confidence.

  1. If the input comes from a constant, config file, or environment

variable, classify as MEDIUM or skip.

MUST flag

MUST NOT flag

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.