security-audit
Skill72 starsChanged 7 months agoMITView on GitHub
Systematic security review using static analysis tools available in the codebase. Covers OWASP Top 10, secrets exposure, auth patterns, and dependency risk. Flag: any hardcoded credential or unignored .env file is a P0 finding. Review each — does the handler verify resource.userId === req.user.id?
- Reads credentials
140 other projects use a version of this.
Adopted by
Most recently taken up by
- HunLuanZhiZhu/Game-Studios-Plugintheir own version, first seen Oct 5, 2026
- morodomi/dev-crewtheir own version, first seen Oct 5, 2026
- PostHog/posthogtheir own version, first seen Oct 4, 2026
- PostHog/posthog-fosstheir own version, first seen Oct 4, 2026
- louisbrulenaudet/monorepo-templatetheir own version, first seen Oct 2, 2026
- MaxMiksa/Auto-Companytheir own version, first seen Oct 2, 2026
Used with
Projects with it also use asset-spec, create-control-manifest 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.
cenconq25Skillasset-spec
Generates per-asset visual specifications and AI-generation prompts from PRDs and the design bible. Produces structured spec files and updates a master asset manifest. Use after design bible is approved and a UX spec or PRD identifies assets to produce. Output: design/assets/<asset>.md plus design/assets/manifest.md.
Also in 5 projects that use this
cenconq25Skillcreate-control-manifest
Produces a flat, immediately-actionable rules sheet — do this, never do that, per system and per layer — extracted from accepted ADRs, technical preferences, and framework reference docs. More directly usable than ADRs for day-to-day implementation. Run after /architecture-review passes.
Also in 5 projects that use this
- +10 more from cenconq25
Other versions140 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 140
- ruvnet/ruflo★ 74ksame name
- PostHog/posthog★ 40ksame name
- Donchitos/Claude-Code-Game-Studios★ 26ksame name
- cloudflare/security-audit-skill★ 24ksame name
- maximhq/bifrost★ 8.6ksame name
- MaxMiksa/Auto-Company★ 3.1ksame name
- marketcalls/openalgo★ 2.8ksame name
- theopenco/llmgateway★ 1.7ksame name
- laolaoshiren/claude-code-skills-zh★ 876same name
- decebals/claude-code-java★ 747same name
130 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 repository117 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- agent-healthSkill
- agent-styleSkill
- angular-best-practicesSkill
- annotateSkill
- api-designSkill
- architecture-decision-recordsSkill
- aws-serverlessSkill
- backend-architectSkill
- backend-patternsSkill
- brainstormSkill
- bug-reportSkill
- changelogSkill
- claude-apiSkill
- cloud-architectSkill
- cloud-run-puppeteerSkill
- code-review-checklistSkill
- code-reviewSkill
- code-simplificationSkill
- codex-sddSkill
- commitSkill
- context-engineeringSkill
- database-architectSkill
- db-reviewSkill
- deep-interviewSkill
- design-reviewSkill
- design-systemSkill
- devops-deploySkill
- diagnoseSkill
- django-patternsSkill
- docker-patternsSkill
- dotnet-backend-patternsSkill
- dreamSkill
- drizzle-orm-expertSkill
- estimateSkill
- event-sourcing-architectSkill
- fastapi-proSkill
- fork-joinSkill
- freezeSkill
- frontend-designSkill
- frontend-patternsSkill
- frontend-ui-dark-tsSkill
- gate-checkSkill
- gemini-api-integrationSkill
- gitlab-ci-patternsSkill
- guardSkill
- handoffSkill
- hotfixSkill
- hybrid-cloud-architectSkill
- kubernetes-architectSkill
- laravel-patternsSkill
- launch-checklistSkill
- learnerSkill
- llm-app-patternsSkill
- localizeSkill
- map-systemsSkill
- map-workflowSkill
- markdown-injection-scannerSkill
- microservices-patternsSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
6 rules. 0 are common, 4 are distinctive, and 2 are very specific to this project.
0
Common
Most of the 118 edited versions we read keep these.
4
Distinctive
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 207
When the audit finds a vulnerability and the fix requires hands-on secure coding guidance, apply the following patterns inline (no separate …
- Distinctive: line 217
Error handling: never expose stack traces or internal paths to API consumers
- Distinctive: line 218
Secrets: never hardcode; use env vars + secret manager.
- Very specific: line 221
XSS: prefer textContent over innerHTML.
- Very specific: line 225
SRI: use integrity= attribute on all third-party script/style tags from CDN
- Distinctive: line 227
Open redirect: never use raw query params as redirect destinations.
“Common” is measured: kept by at least 6 in 10 of the 118 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 Auditing Workflow
Systematic security review using static analysis tools available in the codebase. Covers OWASP Top 10, secrets exposure, auth patterns, and dependency risk.
Phase 1: Reconnaissance — Map the Attack Surface
Identify entry points — list all routes/controllers:
grep -rn "app\.\(get\|post\|put\|delete\|patch\)\|@app\.route\|router\." src/ --include="*.{js,ts,py}" | head -60Identify auth middleware — check which routes are protected:
grep -rn "auth\|middleware\|guard\|require_login\|jwt\|bearer" src/ -i --include="*.{js,ts,py}" | head -40Map external dependencies — check package files for known-risky libs:
cat package.json 2>/dev/null || cat requirements.txt 2>/dev/null || cat go.mod 2>/dev/null- Note findings — list: total endpoints found, unprotected routes, third-party auth libs.
Phase 2: Secrets & Sensitive Data Exposure
Scan for hardcoded secrets:
grep -rn "password\s*=\s*['\"][^'\"]\|api_key\s*=\s*['\"][^'\"]\|secret\s*=\s*['\"][^'\"]" src/ -i | grep -v ".example" | head -30Scan for tokens/keys in source:
grep -rEn "(sk-|AIza|AKIA|ghp_|xox[baprs]-)[A-Za-z0-9]+" src/ | head -20Check .env files are gitignored:
cat .gitignore | grep -i "\.env" ; ls -la .env* 2>/dev/nullCheck for secrets in logs:
grep -rn "console\.log.*password\|logger.*token\|print.*secret" src/ -i | head -20
Flag: any hardcoded credential or unignored .env file is a P0 finding.
Phase 3: Injection & Input Validation
SQL injection risk — look for string concatenation in queries:
grep -rn "query.*+\|execute.*f\"\|raw.*%s\|SELECT.*\$\{" src/ --include="*.{js,ts,py}" | head -30Command injection risk — shell execution with user input:
grep -rn "exec(\|spawn(\|subprocess\|os\.system\|child_process" src/ --include="*.{js,ts,py}" | head -20XSS risk — unescaped HTML rendering:
grep -rn "innerHTML\|dangerouslySetInnerHTML\|v-html\|\.html(" src/ --include="*.{js,ts,jsx,tsx,vue}" | head -20Check for input validation middleware — is there a schema validator at boundaries?
grep -rn "joi\|zod\|yup\|pydantic\|cerberus\|marshmallow" src/ --include="*.{js,ts,py}" | head -10
Phase 4: Authentication & Authorization
JWT / token handling — check for weak configs:
grep -rn "algorithm.*HS256\|expiresIn\|verify\|decode" src/ --include="*.{js,ts,py}" | head -20Password hashing — confirm bcrypt/argon2, not MD5/SHA1:
grep -rn "md5\|sha1\|hashSync\|bcrypt\|argon2\|pbkdf2" src/ -i --include="*.{js,ts,py}" | head -20CORS config — check for wildcard origins:
grep -rn "cors\|Access-Control-Allow-Origin\|\*" src/ --include="*.{js,ts,py}" | head -20Authorization checks — look for missing ownership checks in update/delete:
grep -rn "findById\|findOne\|get_object_or_404" src/ --include="*.{js,ts,py}" | head -20Review each — does the handler verify
resource.userId === req.user.id?
Phase 5: Security Headers & Config
HTTP security headers — check if helmet/similar is configured:
grep -rn "helmet\|Content-Security-Policy\|X-Frame-Options\|Strict-Transport" src/ --include="*.{js,ts}" | head -10Rate limiting — check for brute-force protection on auth routes:
grep -rn "rateLimit\|throttle\|rate_limit\|slowDown" src/ --include="*.{js,ts,py}" | head -10HTTPS enforcement — check redirect config:
grep -rn "http://\|forceHttps\|redirectToHttps\|SECURE_SSL_REDIRECT" src/ --include="*.{js,ts,py}" | head -10
Phase 6: Report Findings
For each finding, record:
| Severity | Category | File:Line | Description | Remediation |
| P0 Critical | ||||
| P1 High | ||||
| P2 Medium | ||||
| P3 Low / Info |
Severity guide:
- P0: Hardcoded credential, remote code execution, auth bypass
- P1: SQL injection, XSS, IDOR, broken auth
- P2: Missing rate limit, weak hashing, CORS wildcard
- P3: Missing security header, verbose errors, info disclosure
Save report to docs/technical/security-audit-{YYYY-MM-DD}.md.
Security Checklist
OWASP Top 10
- A01 Broken Access Control — ownership checks on every mutation
- A02 Cryptographic Failures — no hardcoded secrets, strong hashing
- A03 Injection — parameterized queries, no string concat in SQL/shell
- A04 Insecure Design — auth required on all sensitive routes
- A05 Security Misconfiguration — security headers, CORS, HTTPS
- A06 Vulnerable Components — no known-CVE dependencies
- A07 Auth & Session — JWT config, expiry, refresh token rotation
- A08 Integrity Failures — no unverified package installs in CI
- A09 Logging & Monitoring — no secrets in logs, audit trail exists
- A10 SSRF — no unvalidated URL-fetch from user input
Protocol
- Question: Reads target scope from argument (
api/frontend/backend/infra/full) - Options: Skip
- Decision: Skip — audit is comprehensive; scope from argument
- Draft: Findings table shown in conversation before saving report
- Approval: "May I write to
docs/technical/security-audit-[YYYY-MM-DD].md?"
Output
Deliver exactly:
- Findings table with severity (P0–P3), file:line, description, and remediation for each issue
- OWASP Top 10 checklist — 10 items marked pass / fail / N/A
- Report file saved to
docs/technical/security-audit-{YYYY-MM-DD}.md - Verdict:
CLEAN/LOW RISK/MEDIUM RISK/HIGH RISK — DO NOT DEPLOY
Secure Coding Reference
When the audit finds a vulnerability and the fix requires hands-on secure coding guidance, apply the following patterns inline (no separate skill needed).
Backend Secure Coding Patterns
- Input validation: allowlist approach — reject anything not explicitly allowed
- Injection prevention: parameterized queries only; never string-concat into SQL/shell
- Auth: bcrypt or Argon2 for passwords; JWT with expiry + rotation; PKCE for OAuth
- CORS: explicit origin allowlist; never
Access-Control-Allow-Origin: *on credentialed routes - CSRF: HttpOnly + SameSite=Strict cookies; double-submit or synchronizer token for mutations
- SSRF: URL allowlist before any server-side fetch; block internal IP ranges
- Error handling: never expose stack traces or internal paths to API consumers
- Secrets: never hardcode; use env vars + secret manager; rotate on suspected exposure
Frontend Secure Coding Patterns
- XSS: prefer
textContentoverinnerHTML; sanitize with DOMPurify if HTML is required - CSP: configure
Content-Security-Policywith nonce-based script restrictions; report-only first - Token storage: HttpOnly cookies over localStorage for session tokens
- Redirects: validate destination against allowlist before any client-side navigation
- SRI: use
integrity=attribute on all third-party script/style tags from CDN - Clickjacking: set
X-Frame-Options: DENYor CSPframe-ancestors 'none'at server level - Open redirect: never use raw query params as redirect destinations; use identifier mapping
Related Skills
code-review— line-by-line review with security lensguard— freeze check before deploying a fix
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.

