/SKILL.md
Use when generating Python code for web applications, APIs, or handling user input - prevents OWASP Top 10 vulnerabilities in Django, Flask, FastAPI
npx skillsauth add subhashdasyam/security-antipatterns-python security-antipatterns-pythonInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Code generation guard that prevents security vulnerabilities while writing Python web application code. Covers OWASP Top 10 Web (2021), OWASP API Security Top 10 (2023), with CWE references throughout.
Stack: Python, Django, Flask, FastAPI, SQLAlchemy, Pydantic
Activate when generating code that:
.format() in SQL queries - use parameterized queries or ORMpickle.loads() on untrusted data - use JSON with schema validationeval(), exec(), or compile() on user inputos.system() or shell=True with user data - use subprocess.run() with list argsyaml.load() - use yaml.safe_load()random for security - use secrets modulemd5 or sha1 for passwords - use bcrypt or argon2pathlib and check resolved path| Module | Focus | Key Vulnerabilities | |--------|-------|---------------------| | references/injection.md | SQL, Command, Template, LDAP | CWE-89, CWE-78, CWE-90, CWE-1336 | | references/deserialization.md | pickle, yaml, marshal | CWE-502 | | references/xss-output.md | XSS, template escaping | CWE-79 | | references/auth-access.md | BOLA, BFLA, sessions | CWE-862, CWE-863, CWE-287 | | references/crypto-secrets.md | Secrets, hashing, encryption | CWE-798, CWE-327, CWE-916 | | references/input-validation.md | Pydantic, forms, uploads | CWE-20, CWE-434, CWE-915 | | references/file-operations.md | Path traversal, temp files | CWE-22, CWE-377 | | references/django-security.md | CSRF, settings, ORM | Django-specific | | references/fastapi-flask.md | Auth, CORS, validation | FastAPI/Flask-specific | | references/dependencies.md | pip audit, typosquatting | CWE-1104, CWE-1357 | | references/python-runtime.md | eval/exec, ReDoS | CWE-94, CWE-1333 |
User input involved?
├─ Database query → See references/injection.md (use ORM/parameterized)
├─ File path → See references/file-operations.md (use pathlib + resolve check)
├─ Command execution → See references/injection.md (subprocess with list args)
├─ Deserialization → See references/deserialization.md (NEVER pickle untrusted)
├─ Template rendering → See references/xss-output.md (auto-escape enabled)
└─ API endpoint → See references/auth-access.md + references/input-validation.md
Storing/generating secrets?
├─ API keys → See references/crypto-secrets.md (env vars)
├─ Passwords → See references/crypto-secrets.md (bcrypt/argon2)
└─ Tokens → See references/crypto-secrets.md (secrets module)
Framework-specific?
├─ Django → See references/django-security.md
├─ FastAPI → See references/fastapi-flask.md
└─ Flask → See references/fastapi-flask.md
development
Maintainer-only workflow for handling GitHub Secret Scanning alerts on OpenClaw. Use when Codex needs to triage, redact, clean up, and resolve secret leakage found in issue comments, issue bodies, PR comments, or other GitHub content.
development
Maintainer workflow for OpenClaw releases, prereleases, changelog release notes, and publish validation. Use when Codex needs to prepare or verify stable or beta release steps, align version naming, assemble release notes, check release auth requirements, or validate publish-time commands and artifacts.
development
Run, watch, debug, and extend OpenClaw QA testing with qa-lab and qa-channel. Use when Codex needs to execute the repo-backed QA suite, inspect live QA artifacts, debug failing scenarios, add new QA scenarios, or explain the OpenClaw QA workflow. Prefer the live OpenAI lane with regular openai/gpt-5.4 in fast mode; do not use gpt-5.4-pro or gpt-5.4-mini unless the user explicitly overrides that policy.
development
End-to-end Parallels smoke, upgrade, and rerun workflow for OpenClaw across macOS, Windows, and Linux guests. Use when Codex needs to run, rerun, debug, or interpret VM-based install, onboarding, gateway smoke tests, latest-release-to-main upgrade checks, fresh snapshot retests, or optional Discord roundtrip verification under Parallels.