security-audit
Skill11 starsChanged 3 months agoMITView on GitHub
Full codebase security audit. Use when the user says "security audit", "security check", "check security", or periodically as a recurring review. Scans for OWASP top 10, secret exposure, dependency vulnerabilities, auth gaps, and unprotected endpoints. Unlike pr-reviewer (branch diffs only), this audits the entire codebase.
- Reads credentials
192 other projects use a version of this.
Adopted by
Most recently taken up by
- argos-ci/argostheir own version, first seen Nov 9, 2026
- classroomio/classroomiotheir own version, first seen Nov 9, 2026
- dio-az/dotfilestheir own version, first seen Nov 8, 2026
- roke22/Squadratheir own version, first seen Nov 8, 2026
- qwwiwi/agentos-skills-publictheir own version, first seen Nov 8, 2026
- craigcossairt/trellistheir own version, first seen Nov 8, 2026
Used with
Projects with it also use create-stories, story-done and 10 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.
lilangMaxSkillcreate-stories
Break a single epic into implementable story files. Reads the epic, its GDD, governing ADRs, and control manifest. Each story embeds its GDD requirement TR-ID, ADR guidance, acceptance criteria, story type, and test evidence path. Run after /create-epics for each epic.
Also in 11 projects that use this
lilangMaxSkillstory-done
End-of-story completion review. Reads the story file, verifies each acceptance criterion against the implementation, checks for GDD/ADR deviations, prompts code review, updates story status to Complete, and surfaces the next ready story from the sprint.
Also in 11 projects that use this
nicepkgSkillcommunity-led-growth
Expert in community-led growth (CLG) - leveraging user communities to drive acquisition, retention, and expansion. Covers building developer communities, user groups, ambassador programs, and turning customers into advocates. Knows the difference between community as a feature vs community as a growth engine, and how to measure community ROI. Use when "community-led, CLG, ambassador program, champion program, user community, developer community, word of mouth, user group, " mentioned.
Also in 5 projects that use this
nicepkgSkillph-community-outreach
Engage Reddit, Indie Hackers, Hacker News and other communities for Product Hunt launches. Use this skill to identify relevant communities, craft appropriate posts, and drive cross-platform engagement without appearing spammy.
Also in 5 projects that use this
- +7 more from lilangMax
- +1 more from nicepkg
Other versions192 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 192
- ruvnet/claude-flow★ 80ksame name
- ruvnet/ruflo★ 79ksame name
- PostHog/posthog★ 40ksame name
- Donchitos/Claude-Code-Game-Studios★ 27ksame name
- cloudflare/security-audit-skill★ 18ksame name
- rommapp/romm★ 14ksame name
- kubeshark/kubeshark★ 12ksame name
- maximhq/bifrost★ 9.4ksame name
- mono/SkiaSharp★ 5.6ksame name
- MaxMiksa/Auto-Company★ 3.2ksame name
182 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 repository14 other files it gives its agents.
- llms.txtllms.txt
- check-mcpSkill
- deployment-completeness-auditSkill
- designSkill
- papi-advancedSkill
- papi-autoSkill
- papi-buildSkill
- papi-ideaSkill
- papi-integration-recipeSkill
- papi-planSkill
- papi-strategySkill
- papi-verifySkill
- pr-reviewerSkill
- usage-reporterSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
18 rules. 0 are common, 13 are distinctive, and 5 are very specific to this project.
0
Common
Most of the 173 edited versions we read keep these.
13
Distinctive
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 17
After major security-related changes (auth, RLS, API keys)
- Distinctive: line 18
Before onboarding external users
- Very specific: line 19
When the user explicitly requests /security-audit
- Distinctive: line 25
Search for hardcoded secrets, API keys, tokens, and credentials in source code.
- Very specific: line 29
Check all .ts, .tsx, .js files for process.env usage — verify each env var is listed in .env.example
- Distinctive: line 30
Check for secrets in: git history (recent 10 commits), config files, test fixtures
- Very specific: line 31
Check that .env and .env.local are in .gitignore
- Distinctive: line 33
IMPORTANT: Never include actual secret values in the report.
- Distinctive: line 57
Check for unsafe database queries.
- Distinctive: line 70
Check React components for XSS vectors.
- Very specific: line 82
Read next.config.ts or next.config.js for security headers.
- Distinctive: line 89
Do not recommend X-XSS-Protection.
- Distinctive: line 108
Check for configuration security issues.
- Distinctive: line 123
Check every auth and data-scoping path for what happens when a dependency is unavailable:
- Distinctive: line 126
Every API route/handler that scopes data by user or tenant — does it return an error (fail closed) or fall back to a default/global value …
- Very specific: line 140
Required behaviour: If a request is authenticated but the system cannot verify its scope (tenant/user/project), the response MUST be an …
- Distinctive: line 209
Never include actual secret values in the report
- Distinctive: line 211
If a finding was already addressed (e.g., a scoping/RLS migration already applied), note it as resolved rather than re-flagging it
“Common” is measured: kept by at least 6 in 10 of the 173 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 — Full Codebase Review
Perform a comprehensive security audit of the entire codebase. This is NOT a branch diff review — it scans all source files for security issues.
When to Run
- Periodically as a recurring check (e.g. before a major release)
- After major security-related changes (auth, RLS, API keys)
- Before onboarding external users
- When the user explicitly requests
/security-audit
Steps
1. Secret Exposure Scan
Search for hardcoded secrets, API keys, tokens, and credentials in source code.
Patterns to check:
grep -rfor patterns:sk-,sk_live,sk_test,SUPABASE_SERVICE_ROLE,eyJ(JWT prefixes),ghp_,npm_,Bearer- Check all
.ts,.tsx,.jsfiles forprocess.envusage — verify each env var is listed in.env.example - Check for secrets in: git history (recent 10 commits), config files, test fixtures
- Check that
.envand.env.localare in.gitignore
IMPORTANT: Never include actual secret values in the report. Reference file:line only.
Severity: Critical if secrets found in source, Warning if env var not in .env.example
2. Authentication & Authorization
Review auth middleware and access control.
Files to read:
middleware.ts— auth middleware, route protectionlib/auth.tsor similar — auth helper functionsapp/api/**/route.ts— every API route
Check for:
- API routes without auth checks (missing
getServerSessionor equivalent) - Admin endpoints accessible to non-admin users
- Missing CSRF protection on state-changing endpoints
- Session token handling (httpOnly, secure, sameSite flags)
- RLS policies — verify
user_idscoping on all tables with user data
Severity: Critical for unprotected endpoints, High for weak auth patterns
3. SQL Injection & Data Access
Check for unsafe database queries.
Check for:
- Raw SQL string concatenation (template literals with user input)
- Missing parameterized queries
- Supabase client usage without RLS context
- Service role key usage outside server-side code
- Data returned to client that shouldn't be (PII, internal IDs, other users' data)
Severity: Critical for SQL injection vectors, High for data exposure
4. XSS & Client-Side Security
Check React components for XSS vectors.
Check for:
dangerouslySetInnerHTMLusage — verify input is sanitized- User-supplied data rendered without escaping
eval(),new Function(), or dynamic script injection- Unvalidated URL parameters used in redirects (open redirect)
Severity: High for XSS vectors, Medium for potential issues
5. HTTP Security Headers
Read next.config.ts or next.config.js for security headers.
Required headers:
Content-Security-Policy— verify it's not too permissiveStrict-Transport-Security(HSTS)X-Content-Type-Options: nosniffX-Frame-Options: DENYorSAMEORIGIN- Do not recommend X-XSS-Protection; it is deprecated. Verify supported CSP and modern browser protections instead.
Referrer-Policy
Severity: Medium for missing headers, Low for suboptimal values
6. Dependency Vulnerabilities
Use the project's authorized dependency audit path and existing dependency tree. Keep its complete JSON and exit code in a quoted, uniquely owned TASK_STAGING path, then summarize. Do not truncate the source or install a scanner. Apply framework-specific checks only where that framework exists.
npm audit --json > $TASK_STAGING/dependency-audit.jsonReport: Count of critical/high/moderate/low vulnerabilities. Flag any with known exploits.
Severity: Critical/High matching npm audit severity
7. Environment & Configuration
Check for configuration security issues.
Check for:
- Debug mode enabled in production config
- Verbose error messages exposed to client (stack traces)
- CORS configuration — verify it's not
*in production - Rate limiting on API routes (especially auth endpoints)
- File upload limits and validation
Severity: High for exposed debug info, Medium for missing rate limits
8. Degraded-Mode Analysis (Fail Open vs Fail Closed)
Background: A common latent vulnerability class: a fix adds proper user/tenant scoping only for the happy path — when the auth or DB client initializes successfully — and leaves the unhappy path (the dependency is unavailable, misconfigured, or an env var is missing) falling through to an unscoped or default-tenant response. The app then fails open in exactly the condition where it should fail closed.
Check every auth and data-scoping path for what happens when a dependency is unavailable:
What to check:
- Every API route/handler that scopes data by user or tenant — does it return an error (fail closed) or fall back to a default/global value (fail open) when the DB or auth client comes back null/undefined?
- Your DB/session client factory (e.g.
getDbClient(),getSupabaseServer(),getSession()) — what does it return when required env vars or connections are missing? - Your auth middleware — what happens if the session/token lookup throws? Does it redirect to login (fail closed) or let the request through (fail open)?
- Any code path that resolves a tenant/project/user ID from request context — what happens if that resolution is ambiguous or fails mid-request?
Pattern to flag: Any code path of the form:
const client = getScopedClient();
if (client) {
// scope data by user_id / tenant_id
}
// falls through here WITHOUT scoping if client is null/undefinedRequired behaviour: If a request is authenticated but the system cannot verify its scope (tenant/user/project), the response MUST be an error (e.g. 503) — never a fallback to a default, global, or owner-level dataset.
Severity: Critical if fail-open exposes another user's/tenant's data, High if fail-open exposes any unscoped data
9. Route-Guard / Public-Path Audit
Background: Many frameworks gate auth with an allowlist of "public" paths matched by prefix (e.g. PUBLIC_PATHS.some(p => pathname.startsWith(p))). A broad prefix like /api/auth makes every future route added under that prefix public by default — a developer (or LLM) adding a new route there won't know they just created an unauthenticated endpoint.
Files to check:
- Your auth middleware / route guard file (e.g.
middleware.ts,proxy.ts, or your framework's equivalent) — find the public-path/allowlist definition.
Check for:
- Any entry that is a directory-level prefix (ends without a filename, e.g.
/api/auth,/api/internal) rather than a specific path - Any path in the allowlist that wasn't explicitly audited when it was added
- Compare the allowlist against the actual routes in your API directory — flag any route directory that could have new files added that would inherit public status
Required pattern: Each entry in the allowlist must be a specific, fully-qualified path (e.g. /api/auth/callback), not a prefix that would match a whole directory of routes.
Also check: Any PR or recent commit that modified the allowlist — these changes are high-risk and should always be reviewed manually.
Severity: High if broad prefix found that covers routes not intended to be public, Medium if path was added without documented rationale
Output Format
Present findings as a structured report:
# Security Audit Report — [date]
## Summary
- Critical: N findings
- High: N findings
- Medium: N findings
- Low: N findings
## Critical Findings
### [CRIT-1] Title
- **File:** path/to/file.ts:line
- **Issue:** Description
- **Fix:** Recommended remediation
## High Findings
### [HIGH-1] Title
...
## Medium Findings
...
## Low Findings
...
## What Was Checked
- [ ] Secret exposure scan
- [ ] Auth & authorization review
- [ ] SQL injection & data access
- [ ] XSS & client-side security
- [ ] HTTP security headers
- [ ] Dependency vulnerabilities
- [ ] Environment & configuration
- [ ] Degraded-mode analysis (fail open vs fail closed)
- [ ] Route-guard / public-path audit
## Recommendations
Prioritized list of next actions.Important Notes
- This skill does NOT fix issues — it reports them only
- Never include actual secret values in the report
- Focus on actionable findings, not theoretical risks
- If a finding was already addressed (e.g., a scoping/RLS migration already applied), note it as resolved rather than re-flagging it
Patterns Worth Checking (derived from real-world incidents)
These are real vulnerability classes found in production multi-tenant apps. Use them as a checklist baseline, not a complete list:
| Pattern | Root Cause | Fix |
| Permissive fallback policies override scoped ones | A base/default schema or policy created broad-access rules that a later, narrower rule didn't fully replace | Audit and remove all default-allow policies once scoped ones exist |
| Cross-tenant data leak via missing scoping | A route falls back to a default/global ID when the request-specific ID is absent | Add explicit scoping with no fallback; return empty/error instead |
| Latent fail-open on dependency unavailability | Scoping logic only runs in the if (client) branch; the implicit else path serves unscoped data | Fail closed (e.g. 503) before the scoping check, not after |
| Broad prefix in a public-path allowlist | A prefix like /api/auth was added for convenience and never revisited as new routes were added under it | Replace prefixes with explicit, fully-qualified paths |
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.

