skills/security-audit/SKILL.md
Proactive security audit: OWASP top 10, dependency vulnerabilities, secrets detection, input validation, auth patterns, and secure defaults. MUST BE USED when user mentions: "security", "vulnerability", "audit", "OWASP", "CVE", "security review", "pentest", "injection", "XSS", "CSRF", "authentication", "authorization", "secrets", "hardcoded password", "secure", "npm audit", "pip-audit", "check security", "is this secure", "security risk", "data leak", "SQL injection", "command injection", "path traversal", "SSRF", "RCE", "privilege escalation", "supply chain", "dependency scan", "snyk", "trivy", "semgrep", "bandit". Scans code for vulnerabilities, checks dependencies, verifies auth patterns. NOT for explaining security concepts (use pedagogical-explain), or general code review (use code-review).
npx skillsauth add aedelon/claude-code-blueprint security-auditInstall 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.
Systematic security review covering OWASP Top 10, dependency vulnerabilities, secrets, and secure patterns.
Phase 1: SCAN -> Automated scans (deps, secrets, patterns)
Phase 2: ANALYZE -> Manual review of high-risk areas
Phase 3: CLASSIFY -> Rate findings by severity
Phase 4: RECOMMEND -> Propose fixes with priority
# JavaScript/TypeScript
npm audit
# Python
uv run pip-audit
# Rust
cargo audit
Search for hardcoded secrets using Grep:
Patterns to search for:
- API keys: long alphanumeric strings in config files
- Credentials: password/token/secret assignments with literal values
- Cloud provider keys: AWS access key patterns (starts with AKIA)
- Private key headers: PEM format key blocks
- Connection strings: database URIs containing embedded credentials
- .env files: verify .env is listed in .gitignore
Use Grep tool to search for these patterns across the codebase. Focus on:
Search with Grep for:
| Pattern | Risk | What to Search |
|---------|------|----------------|
| eval/exec | Code injection | eval(, exec(, Function( |
| SQL concatenation | SQL injection | String concatenation in SQL queries |
| Shell execution | Command injection | subprocess.call, os.system, child_process.exec |
| Unsafe HTML | XSS | dangerouslySetInnerHTML, innerHTML =, v-html |
| Unsafe deserialization | RCE | pickle.load, yaml.load without SafeLoader |
| Open redirect | Phishing | Redirects using user-controlled input |
| Path traversal | File access | ../ patterns in user-controlled paths |
| # | Vulnerability | What to Check | |---|--------------|---------------| | A01 | Broken Access Control | Auth middleware on all routes, RBAC, CORS | | A02 | Cryptographic Failures | TLS, proper password hashing (bcrypt/argon2), no weak hashing for passwords | | A03 | Injection | SQL parameterized queries, XSS escaping, command injection | | A04 | Insecure Design | Business logic flaws, missing rate limiting | | A05 | Security Misconfiguration | Default credentials, verbose errors in prod, CORS wildcard | | A06 | Vulnerable Components | Outdated deps, known CVEs | | A07 | Auth Failures | Session management, brute force protection, MFA | | A08 | Data Integrity | Unsigned updates, CI/CD pipeline security | | A09 | Logging Failures | Missing audit logs, PII in logs | | A10 | SSRF | Unvalidated URLs, internal network access |
Check:
- Password storage -> bcrypt/argon2 (NOT md5/sha1/sha256)
- Session management -> Secure, HttpOnly, SameSite cookies
- JWT -> Algorithm validation, expiry, refresh tokens
- Rate limiting -> Login attempts, API endpoints
- CORS -> Not wildcard for authenticated routes
- CSRF -> Tokens on state-changing operations
Check:
- User inputs -> Validated and sanitized at entry
- File uploads -> Type validation, size limits, no path traversal
- API parameters -> Schema validation (zod, pydantic, joi)
- Database queries -> Parameterized, no string concatenation
- Redirects -> Whitelist-only destinations
| Severity | Criteria | Action | |----------|----------|--------| | CRITICAL | Remote code execution, auth bypass, data leak | Fix immediately | | HIGH | XSS, SQL injection, broken access control | Fix before deploy | | MEDIUM | Missing headers, weak validation, info disclosure | Fix soon | | LOW | Best practice violations, minor misconfigs | Plan fix | | INFO | Suggestions, hardening opportunities | Optional |
## Security Audit Report
**Scope**: [files/directories audited]
**Date**: [date]
### Executive Summary
[2-3 sentences: overall posture, critical findings count]
### Findings
#### CRITICAL
| # | Finding | File:Line | Description | Fix |
|---|---------|-----------|-------------|-----|
| 1 | [type] | path:42 | [detail] | [remediation] |
#### HIGH
| # | Finding | File:Line | Description | Fix |
|---|---------|-----------|-------------|-----|
#### MEDIUM
[...]
#### LOW
[...]
### Dependency Audit
| Package | Version | Vulnerability | Severity | Fix Version |
|---------|---------|---------------|----------|-------------|
### Positive Security Practices Found
- [What's already well done]
### Recommendations (Priority Order)
1. **[Action]** -- Addresses [finding], estimated effort: [S/M/L]
2. **[Action]** -- Addresses [finding], estimated effort: [S/M/L]
### Confidence: [LEVEL]
[Based on scope coverage and tool results]
tools
Master uv package manager for Python: project setup, dependency management, virtual environments, lockfiles, CI/CD integration, Docker builds, and migration from pip/poetry. MUST BE USED when user mentions: "uv", "uv add", "uv run", "uv sync", "uv init", "uv lock", "uv venv", "uv pip", "pyproject.toml", "python project setup", "python dependencies", "virtual environment", "venv", "pip install", "poetry to uv", "migrate from pip", "lockfile python", "requirements.txt", "setup.py", "pip freeze", "uv tool", "install package", "add dependency", "python environment", "new python project", "package manager python", "create project", "uv export", "uv cache", "uv python". 10-100x faster than pip. Covers init, add, sync, lock, run, Docker, CI/CD. NOT for npm/pnpm/yarn (JS toolchain), Rust cargo, or deployment (use deployment-assistant).
development
Conduct rigorous research with proper citations (DOI, arXiv, PMID) and source triangulation. MUST BE USED when user asks: "what is SOTA", "recent developments", "compare X vs Y", "is it true that", "research says", "latest papers on", "scientific evidence", "studies show", "state of the art", "literature review", "find papers", "academic research", "benchmark results", "who published", "when was X released", "current best", "what does the research say", "evidence for", "peer reviewed". Searches multiple sources, evaluates reliability, states confidence level. NOT for verifying API signatures (use anti-hallucination) or general web search (use WebSearch directly).
development
Debug errors systematically by searching first, then analyzing, then proposing verified solutions. MUST BE USED when user reports: "error", "bug", "doesn't work", "fails", "crash", stack traces, exception messages, or any troubleshooting scenario. Triggers: "TypeError", "ImportError", "undefined is not a function", "segfault", "panic", "broken", "not working", "unexpected behavior", "regression", "failing", "exception", "traceback", "stack trace", "debug this", "why does this fail", "help me fix". Also enforces confidence levels and output templates. Prevents guessing solutions without research.
development
Ship workflow: review changes, generate conventional commit messages, push, and create PRs. MUST BE USED when user says: "commit", "git commit", "commit this", "save changes", "commit message", "ship", "ship it", "push", "create PR", "pull request", "ready to merge", "deploy this", "stage changes", "what changed", "review my changes", "conventional commit", or after completing a coding task. Reviews changes, generates commit, optionally pushes and creates PR. NOT for git branching/rebasing (use git-workflow), code review (use review command), or deployment configuration (use deployment-assistant).