audit-security
Skill5 starsChanged 4 months agoMITView on GitHub
Performs a multi-agent security audit checking authentication, input validation, data exposure, and infrastructure. This skill should be used when the user asks to "audit security", "run a security review", "check for vulnerabilities", "security scan", "check auth", "find security issues", or "harden security", or when the transmute-pipeline agent reaches Stage 6A of the pipeline.
- Reads credentials
16 other projects use a version of this.
Adopted by
Most recently taken up by
- tounsils/claude-code-skillstheir own version, first seen Oct 25, 2026
- VelimirMueller/ai-development-skillstheir own version, first seen Oct 25, 2026
- ChariereFiedler/ronce-racinetheir own version, first seen Oct 22, 2026
- krixon/skillstheir own version, first seen Oct 11, 2026
- VelimirMueller/claude-skillstheir own version, first seen Oct 11, 2026
- JoseArron/skillstheir own version, first seen Oct 11, 2026
Used with
Projects with it also use retro, tdd and 1 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
AWSSkillretro
Conduct a retrospective on a coding session.
Also in 4 projects that use this
GoogleSkilltdd
Test-driven development. Use when the user wants to build features or fix bugs test-first, mentions "red-green-refactor", or wants integration tests.
Also in 3 projects that use this
MicrosoftSkillhandoff
Compact the current conversation into a handoff document for another agent to pick up.
Also in 3 projects that use this
Other versions16 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 16
- ChariereFiedler/ronce-racine★ 9same name
- kensaurus/cursor-kenji★ 9same name
- kensaurus/skills★ 9same name
- VelimirMueller/ai-development-skills★ 7same name
- VelimirMueller/claude-skills★ 7same name
- daanvandenbergh/claudekit★ 2same name
- engineering-workshops/react-alicante-agentic-workflow★ 2same name
- jasonmichaelbell78-creator/sonash-v0★ 2same name
- JoseArron/skills★ 2same name
- mik2win/foureyes★ 2same name
6 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository24 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- templates/CLAUDE.mdCLAUDE.md
- audit-a11ySkill
- audit-completenessSkill
- brdSkill
- docsSkill
- feedbackSkill
- hardenSkill
- implementSkill
- maintainSkill
- optimizeSkill
- polishSkill
- prdSkill
- prelaunchSkill
- redesignSkill
- refactorSkill
- remediateSkill
- scaffoldSkill
- seed-dataSkill
- smokeSkill
- tech-stackSkill
- user-guideSkill
- validate-specsSkill
- verifySkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
36 rules. 0 are common, 25 are distinctive, and 11 are very specific to this project.
0
Common
Most of the 15 edited versions we read keep these.
25
Distinctive
This author's own choices. Worth a look.
11
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 16
Read the detailed guide at ${CLAUDE_SKILL_DIR}/references/audit-security-detailed-guide.md for the complete audit procedures, teammate …
- Distinctive: line 24
Before any audit work, verify:
- Distinctive: line 27
If 5B shows FAIL, STOP — the codebase has unresolved implementation gaps that must be fixed before security auditing.
- Very specific: line 28
Read ./CLAUDE.md and ./plancasting/tech-stack.md for project conventions.
- Distinctive: line 29
Read the relevant PRD sections for implementation context.
- Distinctive: line 33
Read and reference these files throughout the audit:
- Very specific: line 43
Check ./plancasting/tech-stack.md for the Session Language setting.
- Distinctive: line 53
Read CLAUDE.md Part 2 (Backend Rules, Frontend Rules) for project-specific conventions.
- Very specific: line 71
Read ./CLAUDE.md, ./plancasting/tech-stack.md, and all security/compliance requirements from BRD/PRD.
- Very specific: line 73
Write ./plancasting/_audits/security/checklist.md with the full checklist.
- Distinctive: line 74
Create a task list for all teammates with dependency tracking.
- Distinctive: line 87
Check authorization logic for horizontal and vertical privilege escalation.
- Very specific: line 96
Verify ALL backend function arguments use proper validators.
- Distinctive: line 98
Check for XSS vectors: unsafe innerHTML usage, unescaped user content, file upload validation.
- Distinctive: line 106
Verify error messages do not leak internal details (stack traces, table names, query patterns).
- Distinctive: line 107
Check for sensitive data in localStorage/sessionStorage, hardcoded API keys, improperly prefixed env vars.
- Distinctive: line 114
Verify Content-Security-Policy, HSTS, X-Frame-Options, X-Content-Type-Options, and Referrer-Policy.
- Very specific: line 115
Check CORS configuration — flag Access-Control-Allow-Origin: *.
- Very specific: line 119
If Stage 6G report already exists (./plancasting/_audits/resilience/report.md), verify no scope overlap.
- Distinctive: line 120
Verify security-sensitive operations are logged and logs contain no sensitive data.
- Distinctive: line 125
When a violation cannot be fixed without architectural changes or would break another feature:
- Distinctive: line 127
Document the full conflict with evidence (what the violation is, what fixing it would break).
- Very specific: line 140
Run the full test suite using commands from CLAUDE.md (e.g., bun run typecheck, bun run lint, bun run build, bun run test, bun run …
- Very specific: line 141
If unfixable violations were documented, verify ./plancasting/_audits/security/unfixable-violations.md exists and is referenced from …
- Distinctive: line 157
PASS: All Critical and High severity vulnerabilities fixed.
- Distinctive: line 158
CONDITIONAL PASS: All Critical fixed; remaining High issues documented with mitigations.
- Distinctive: line 166
Verify all file modifications are saved and committed.
- Distinctive: line 170
Use these consistently — do not deflate:
- Distinctive: line 178
never mark a vulnerability as "acceptable risk" without documenting specific threat model justification.
- Distinctive: line 179
never delete a security test to make the suite pass — fix the vulnerability instead.
- Distinctive: line 180
never introduce new auth bypass patterns as part of a fix.
- Distinctive: line 181
always run the full test suite after security changes — security fixes that break functionality are not fixes.
- Distinctive: line 182
always verify custom API routes have CSRF protection for state-changing operations.
- Very specific: line 184
always verify SSRF blocklist: check all outbound fetch() or HTTP client calls triggered by user input.
- Distinctive: line 185
always verify rate limiting on auth endpoints.
- Distinctive: line 186
Use commands from CLAUDE.md for running tests.
“Common” is measured: kept by at least 6 in 10 of the 15 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Security Audit — Stage 6A
Read the detailed guide at ${CLAUDE_SKILL_DIR}/references/audit-security-detailed-guide.md for the complete audit procedures, teammate spawn prompts, vulnerability fix patterns, and report templates.
Lead a multi-agent security audit of the complete codebase against BRD security requirements and PRD security specifications. Identify vulnerabilities and fix them.
Stage Sequence (recommended ordering): Stage 5B → (6A (this stage) ‖ 6B ‖ 6C) → 6E → 6F → 6G → 6D → 6H → 6V → 6R → 6P/6P-R → 7 (Deploy). Note: 6A, 6B, and 6C run in parallel (each in a separate session). If running in parallel, commit 6A changes as soon as 6A completes to avoid config file conflicts — see CLAUDE.md § "Stage 6 ordering".
Prerequisite Checks
Before any audit work, verify:
- Check that
./plancasting/_audits/implementation-completeness/report.mdexists and shows PASS or CONDITIONAL PASS. If missing, STOP: 'Stage 5B report not found — run Stage 5B before starting Stage 6 audits. Proceeding without 5B wastes effort on incomplete code.' (Override: if the operator explicitly confirms 5B was intentionally skipped, proceed with a WARN in the report noting unverified implementation completeness.) - If 5B shows FAIL, STOP — the codebase has unresolved implementation gaps that must be fixed before security auditing. If CONDITIONAL PASS, note the documented Category C issues — skip security auditing for those incomplete features.
- Read
./CLAUDE.mdand./plancasting/tech-stack.mdfor project conventions. - Read the relevant PRD sections for implementation context.
Inputs
Read and reference these files throughout the audit:
- Codebase: Backend directory and
./src/(adapt paths per tech stack) - Tech Stack:
./plancasting/tech-stack.md - Security Requirements:
./plancasting/brd/13-security-requirements.md - Compliance Requirements:
./plancasting/brd/12-regulatory-and-compliance-requirements.md - PRD Security Architecture:
./plancasting/prd/10-system-architecture.md(auth/authz section) - PRD API Specs:
./plancasting/prd/12-api-specifications.md(auth scheme, rate limiting) - Project Rules:
./CLAUDE.md
Check ./plancasting/tech-stack.md for the Session Language setting. Generate all reports and user-facing output in that language. Keep code, technical identifiers, and file names in English.
Stack Adaptation
Prompts reference Convex + Next.js as defaults. Adapt all paths and patterns to the actual stack in plancasting/tech-stack.md:
convex/becomes your backend directoryconvex/schema.tsbecomes your schema/migration files- Convex functions become your backend functions/endpoints
src/app/becomes your frontend pages directory
Read CLAUDE.md Part 2 (Backend Rules, Frontend Rules) for project-specific conventions.
Package Manager: Commands use bun run as default. Replace with your project's package manager as specified in CLAUDE.md.
Known Failure Patterns
- Severity deflation: Agent marks everything as "Medium" to avoid escalation. Use clear definitions: Critical = data breach possible without auth, High = privilege escalation possible, Medium = defense-in-depth gap, Low = best practice deviation.
- Symptom fixing: Agent adds auth check to a function but doesn't notice the function is also exported publicly. Fix root cause, not symptoms.
- Regression from security fixes: Agent adds auth check that breaks a legitimate unauthenticated flow. always verify fixes don't break existing tests.
- Skipping generated files' consumers: Agent correctly skips
_generated/but also skips files that import from_generated/— these may contain security-relevant code. - Missing CORS/CSP checks: Focusing only on code-level auth while ignoring HTTP-level security headers.
- Blind framework trust: Agent assumes a framework handles security correctly without verification (e.g., 'Next.js handles CSRF'). always verify framework security defaults are actually enabled in configuration.
- Zero-day normalization: Agent marks an unpatched CVE as 'acceptable risk' without documenting threat model justification. always document: 'We accept this risk because [mitigation] is in place.'
Phase 1: Analysis and Planning
Complete these steps before spawning any teammates:
- Read
./CLAUDE.md,./plancasting/tech-stack.md, and all security/compliance requirements from BRD/PRD. - Build a Security Checklist mapping each BRD security requirement (SR-xxx) to specific code patterns to verify. For each entry include: (a) Scope — affected files/functions, (b) Check — what to verify, (c) Code pattern — correct implementation example, (d) Status — "Not checked yet".
- Write
./plancasting/_audits/security/checklist.mdwith the full checklist. - Create a task list for all teammates with dependency tracking.
Scope Boundary — Rate Limiting: See Teammate 4 for the 6A/6G rate limiting scope boundary.
Phase 2: Spawn Audit Teammates
Spawn 4 parallel teammates. Each teammate's prompt must include the security checklist and instructions to read CLAUDE.md first.
Teammate 1: auth-auditor
Scope: Authentication and authorization.
- Scan every exported backend function (excluding generated code). Verify auth checks are called where required. Flag mutations/actions modifying data without auth. Flag queries returning sensitive data without auth. Verify role/permission checks match BRD requirements.
- Check authorization logic for horizontal and vertical privilege escalation.
- Review middleware/route protection for completeness and role-based access.
- Adapt auth checks to the stack's auth pattern (session-based, JWT-based, or auth provider SDK). For JWT: verify JWKS endpoint security,
algwhitelist (rejectalg: none), audience/issuer validation, JWKS cache headers, token expiry validation. - Fix each vulnerability with inline comment:
// SECURITY FIX: [description] — SR-xxx
Teammate 2: input-validation-auditor
Scope: Input validation and injection prevention.
- Verify ALL backend function arguments use proper validators. Flag overly permissive validators (e.g.,
v.any()). Verify string length constraints and typed ID validators. - Scan form components for client-side validation consistency with server.
- Check for XSS vectors: unsafe innerHTML usage, unescaped user content, file upload validation.
- Fix each vulnerability found.
Teammate 3: data-exposure-auditor
Scope: Data leakage and privacy.
- Flag queries returning entire documents when subsets suffice. Flag queries returning sensitive fields (email, phone, payment info) unnecessarily. Verify PII is not logged or exposed in error messages.
- Verify error messages do not leak internal details (stack traces, table names, query patterns).
- Check for sensitive data in localStorage/sessionStorage, hardcoded API keys, improperly prefixed env vars.
- Fix each issue found.
Teammate 4: infrastructure-security-auditor
Scope: HTTP security headers, CORS, CSP, dependencies, rate limiting, audit logging.
- Verify Content-Security-Policy, HSTS, X-Frame-Options, X-Content-Type-Options, and Referrer-Policy.
- Check CORS configuration — flag
Access-Control-Allow-Origin: *. Verify credentials mode is correctly configured. - Run dependency vulnerability scan. For Bun projects: use
bunx audit-ci,npx better-npm-audit audit, ornpx snyk test. For npm/yarn:npm audit. For pnpm:pnpm audit. If none can be installed, document that scanning could not be performed and recommend manual review. Flag critical/high severity issues and known CVEs. Verify lock file integrity. - Rate Limiting — 6A/6G Scope Boundary: Rate limiting for AUTH endpoints (login, signup, password reset, forgot password, MFA challenge/verify, token refresh, session management — logout, session revocation) is Stage 6A's responsibility — implement these now. Rate limiting for DATA-MUTATION endpoints (create, update, delete, file uploads) is Stage 6G's responsibility. Flag data-mutation rate limiting gaps for Stage 6G to implement.
- Edge case classifications: Password change = AUTH (6A). User profile update = DATA-MUTATION (6G). Email verification re-send = AUTH (6A). MFA device management = AUTH (6A). Invitation acceptance = AUTH (6A). Account linking = AUTH (6A). Signup = AUTH (6A). Password-reset email send = AUTH (6A, auth flow).
- If Stage 6G report already exists (
./plancasting/_audits/resilience/report.md), verify no scope overlap. If ambiguous, flag as a decision point for the lead to reconcile.
- Verify security-sensitive operations are logged and logs contain no sensitive data.
- Fix each issue found.
Unfixable Violation Protocol
When a violation cannot be fixed without architectural changes or would break another feature:
- Document the full conflict with evidence (what the violation is, what fixing it would break).
- Mark as REQUIRES HUMAN DECISION — do not attempt fixes that create regressions.
- Include recommended approach and estimated effort.
- If CRITICAL severity (e.g., architectural security flaw, missing encryption at rest, broken auth model): the audit must recommend NOT LAUNCHING until resolved. Document required architectural changes and estimated remediation scope. Record in
./plancasting/_audits/security/unfixable-violations.md(separate file fromreport.md) AND summarize in the mainreport.mdunder a "Blocking Issues" section — critical violations block Stage 6H. Use these headings in the unfixable violations file:### [Issue ID],**Severity**: [CRITICAL/HIGH],**Description**: [what the issue is],**Evidence**: [code location and proof],**Recommended Approach**: [how to fix with architectural changes],**Estimated Effort**: [hours/days]. - Continue with remaining fixable violations.
Phase 3: Coordination
- Facilitate cross-team findings: auth gaps inform input-validation checks; PII exposure informs auth requirements; CSP gaps inform data-exposure risk; rate limiting gaps inform brute-force risk.
- Resolve file conflicts: first teammate to complete claims the file; second must re-read before applying changes. If both changes are in different functions/sections, both apply. If they touch the same code block, the lead decides — security correctness over team structure.
Phase 4: Review and Report
- Run the full test suite using commands from CLAUDE.md (e.g.,
bun run typecheck,bun run lint,bun run build,bun run test,bun run test:e2e). Fix any test failures caused by security changes. - If unfixable violations were documented, verify
./plancasting/_audits/security/unfixable-violations.mdexists and is referenced from report.md.
The ## Gate Decision heading in the generated report is parsed by Stage 6H. Use this EXACT heading — do not rename or restructure it.
Generate
./plancasting/_audits/security/report.mdcontaining:- Executive summary
- Vulnerabilities by category and severity (Critical/High/Medium/Low)
- Fixes applied with code references
- BRD security requirement compliance matrix (SR-xxx to Pass/Fail)
- Infrastructure security results (HTTP headers, CORS, CSP, dependencies, rate limiting, audit logging)
- Data-Mutation Rate Limiting Gaps (for Stage 6G): List all data-mutation endpoints flagged by Teammate 4 that lack rate limiting. Format:
- [endpoint] ([reason]). Stage 6G reads this section. - Remaining risks requiring human decision
- Recommendations for ongoing security practices
Gate Decision
[PASS | CONDITIONAL PASS | FAIL]
- PASS: All Critical and High severity vulnerabilities fixed; all tests pass; no unfixable blocking issues
- CONDITIONAL PASS: All Critical fixed; remaining High issues documented with mitigations; Stage 6H review required
- FAIL: Critical vulnerabilities remain unresolved; blocks Stage 6H
- Output summary: total vulnerabilities found, total fixed, total requiring human review.
Phase 5: Shutdown
- Request shutdown for all teammates.
- Verify all file modifications are saved and committed.
Severity Definitions
Use these consistently — do not deflate:
- Critical: Data breach possible without authentication
- High: Privilege escalation possible
- Medium: Defense-in-depth gap
- Low: Best practice deviation
Critical Rules
- never mark a vulnerability as "acceptable risk" without documenting specific threat model justification.
- never delete a security test to make the suite pass — fix the vulnerability instead.
- never introduce new auth bypass patterns as part of a fix.
- always run the full test suite after security changes — security fixes that break functionality are not fixes.
- always verify custom API routes have CSRF protection for state-changing operations.
- always check for secrets in git history:
git log --all -p -G "(sk-|sk_|Bearer |password=|PRIVATE KEY|AWS_SECRET|STRIPE_SECRET|DATABASE_URL=|-----BEGIN|api[_-]?key|client[_-]?secret)" --max-count=500. For large repos add--since='6 months ago'. Use-Gwith regex alternation, NOT multiple-Sflags (git only processes the last-Sflag, silently ignoring earlier ones). If ANY secret is found, document as CRITICAL in./plancasting/_audits/security/unfixable-violations.mdrequiring immediate key rotation — secrets in git history cannot be fixed by code changes alone. This is a pipeline blocker: do not proceed to Stage 6H until key rotation is confirmed by the operator. Verify.env.local.examplecontains only placeholder values (no real API keys, no real passwords). - always verify SSRF blocklist: check all outbound
fetch()or HTTP client calls triggered by user input. Reject private IP ranges (10.x, 172.16-31.x, 192.168.x), localhost (127.0.0.1, ::1), link-local (169.254.x, fe80::/10), IPv6 unique local (fc00::/7), and cloud metadata endpoints (169.254.169.254). - always verify rate limiting on auth endpoints. Flag data-mutation gaps for Stage 6G. See the 6A/6G scope boundary: 6A = auth-protecting endpoints; 6G = data-mutation endpoints. Do not implement data-mutation rate limiting in Stage 6A.
- Use commands from CLAUDE.md for running tests.
- Reference Stage 5B output to avoid auditing stub/incomplete features.
- For safety-critical rules and pipeline-level security constraints, see CLAUDE.md § Pipeline Execution Guide → Safety-Critical Rules (or execution-guide.md if CLAUDE.md defers to it).
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

