wdm0006/python-skills/security-audit
Claude Code and agent skill by wdm0006/python-skills
- community
- ext:[{"type":"hook","description":"Pre/post lifecycle hooks"}]
Checking that the SKILL.md file is still in the repository.
Audits Python libraries for security vulnerabilities using Bandit, pip-audit, Semgrep, and detect-secrets. Identifies SQL injection, command injection, hardcoded credentials, secrets exposed through tracebacks, weak cryptography, and insecure deserialization. Use when reviewing library security, setting up security scanning in CI, or implementing secure coding patterns.
Install
npx vskill@latest install wdm0006/python-skills/security-auditSemi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard
SKILL.md
Python Security Auditing
Quick Start
Tool Configuration
Bandit (.bandit):
pip-audit:
Common Vulnerabilities
| Issue | Bandit ID | Fix | |
|---|---|---|---|
| SQL injection | B608 | Use parameterized queries | |
| Command injection | B602 | subprocess without shell=True | |
| Hardcoded secrets | B105, B106 | Environment variables | |
| Weak crypto | B303 | Use SHA-256+, bcrypt for passwords | |
| Pickle untrusted data | B301 | Use JSON instead | |
| Path traversal | B108 | Validate with Path.resolve() |
Secure Patterns
Tracebacks Must Not Dump Frame Locals
Rich exception renderers can print every local variable in every stack frame. That turns an ordinary unhandled exception into a credential leak: API tokens, authorization headers, request bodies, and decrypted configuration commonly live in locals when the traceback is rendered to a terminal or CI log.
Keep local-variable rendering disabled anywhere logs can leave the developer's machine:
Do not stop at asserting the configuration call. Exercise the installed exception hook with a sentinel secret and inspect the rendered output. This catches a later refactor that replaces the hook or re-enables locals elsewhere:
Use a unique sentinel, never a real credential. Assert both that the exception was rendered and that the sentinel was absent; an empty or bypassed output path must not make the security test pass vacuously.
CI Integration
For detailed patterns, see:
- scripts/security_scan.py — runs all four scanners and exits non-zero on blocking findings (exit 1) or on a requested scanner that could not run (exit 2, opt out with
--allow-scanner-failure) (uv run python scripts/security_scan.py .) - [VULNERABILITIES.md](VULNERABILITIES.md) - Vulnerability classes with vulnerable→fixed pairs
- [CI_SECURITY.md](CI_SECURITY.md) - Complete CI workflow, pre-commit, Dependabot, triage
Audit Checklist
Learn More
This skill is based on the Security section of the Guide to Developing High-Quality Python Libraries by Will McGinnis. See these posts for deeper coverage:
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/python/security-audit/SKILL.md
Popularity
- Repository stars
- 95
- Repository forks
- 14
- 7-day trend score
- 23
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 19 May 2026, 5 months ago.
Extension points
hookPre/post lifecycle hooks
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/wdm0006/python-skills/security-audit)