eresus-python-audit

A detailed security-review skill for Python code, covering more than 50 vulnerability checks across seven categories and common Python web frameworks such as Django, Flask, and FastAPI.

In plain words
What is it for?
Use it to audit Python applications, review Flask, Django, or FastAPI projects, and investigate issues such as unsafe pickle use, dynamic code execution, and insecure assertions.
Why use it?
It gives an agent a repeatable way to find security weaknesses in Python applications, including dangerous dependencies, entry points, and risky code patterns.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/eresussecurity/appsec-skills/eresus-python-audit
Any agent
npx skills add EresusSecurity/appsec-skills --skill eresus-python-audit
Clone the repo
git clone --depth 1 https://github.com/EresusSecurity/appsec-skills

Made for: Claude Code, Codex.

Per session 101 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,752 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 2 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00101 $0.02752
Opus 5 $0.00051 $0.01376
Sonnet 5 $0.00020 $0.00550
Haiku 4.5 $0.00010 $0.00275

Measured 2d ago against content hash f2ec06c4c21c, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

eresus-python-audit scanned grade A with 2 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

| B113 | `request_without_timeout` | Medium | `requests.get/post()` without `timeout=` parameter — DoS via hang |

Runs shell commandslowCapability

Expected in a hook, worth knowing in a rule or an instructions file.

| B602 | `subprocess_popen_with_shell_equals_true` | High | `subprocess.Popen(cmd, shell=True)` — command injection |
skills/eresus-python-audit/SKILL.md · 236 lines

How it starts

The opening of the file, as written. The whole thing — 236 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Python Security Audit

Purpose

Perform a comprehensive, depth-first security audit of Python codebases. This skill provides the complete knowledge of Bandit's 50+ security checks, organized by category and severity, plus framework-specific patterns for Django, Flask, FastAPI, and emerging ML/AI attack surfaces.

Use view_file and grep_search exclusively. No terminal commands.


Audit Workflow

Phase 1: Reconnaissance

  1. Identify the Python framework in use (Django, Flask, FastAPI, Tornado, aiohttp, raw stdlib)
  2. Check requirements.txt / pyproject.toml / Pipfile for dangerous dependencies
  3. Map entry points: URL routes, CLI commands, message consumers, scheduled tasks
  4. Identify configuration files and secrets management approach

Phase 2: Systematic Check — By Category

Work through each category below. For each check, use grep_search to find all instances, then view_file to trace the data flow and confirm exploitability.


B1xx — Miscellaneous Checks

ID Name Severity What to Search
B101 assert_used Low assert statements used for security checks (removed with -O flag)
B102 exec_used Medium exec() calls — trace if input is user-controlled
B103 set_bad_file_permissions Medium os.chmod() with overly permissive modes (0o777, 0o666)
B104 hardcoded_bind_all_interfaces Medium Binding to 0.0.0.0 — exposes service on all interfaces
B105 hardcoded_password_string Low Strings assigned to variables named password, secret, key, token
B106 hardcoded_password_funcarg Low Password-like strings passed as function arguments
B107 hardcoded_password_default Low Default parameter values containing password-like strings
B108 hardcoded_tmp_directory Low Hardcoded /tmp paths — race conditions, symlink attacks
B109 password_config_option_not_marked_secret Low Config options with password/secret that aren't marked as sensitive
B110 try_except_pass Low except: pass — silently swallowing errors including security exceptions
B111 execute_with_run_as_root_equals_true Medium Functions called with run_as_root=True
B112 try_except_continue Low except: continue — same problem as B110
B113 request_without_timeout Medium requests.get/post() without timeout= parameter — DoS via hang

Read the full file on GitHub · 236 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 236 lines · 101 tokens per session scan A f2ec06c4c21c

Subscribe to this mod's changes

eresus-python-audit is a skill published in the GitHub repository EresusSecurity/appsec-skills (6 stars, last pushed 4mo ago), licensed Apache-2.0. It adds 101 tokens to every session and 2,752 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 2 findings (makes network calls, runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.