security-audit
Skill419 starsChanged 4 months agoMITView on GitHub
RLS validation, security audits, OWASP compliance, and vulnerability scanning. Use when validating RLS policies, auditing API routes for auth, scanning for vulnerabilities, reviewing for exposed credentials, or performing pre-deployment security review. Do NOT use for routine feature development.
- 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 · 1
- adyba/pi-safe-workflow★ 0100% same
Edited · 0
None found.
Wrote their own version · 139
- 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
129 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 repository60 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .cursor/rules/00-core-principles.mdcCursor rule
- .cursor/rules/01-git-workflow.mdcCursor rule
- .cursor/rules/02-pattern-discovery.mdcCursor rule
- .cursor/rules/03-safe-ai-dlc.mdcCursor rule
- .cursor/rules/04-knowledge-vault.mdcCursor rule
- .cursor/rules/10-backend-python.mdcCursor rule
- .cursor/rules/11-frontend-react.mdcCursor rule
- .cursor/rules/12-database-sql.mdcCursor rule
- .cursor/rules/13-testing.mdcCursor rule
- .cursor/rules/14-spec-creation.mdcCursor rule
- .cursor/rules/15-deployment.mdcCursor rule
- .cursor/rules/16-stripe-payments.mdcCursor rule
- .cursor/rules/20-agent-architect.mdcCursor rule
- .cursor/rules/21-agent-backend.mdcCursor rule
- .cursor/rules/22-agent-qas.mdcCursor rule
- .cursor/rules/23-agent-security.mdcCursor rule
- .cursor/rules/30-background-agents.mdcCursor rule
- .cursor/rules/31-mcp-integration.mdcCursor rule
- .cursor/rules/README.mdCursor rule
- agent-coordinationSkill
- api-patternsSkill
- confluence-docsSkill
- deployment-sopSkill
- frontend-patternsSkill
- git-advancedSkill
- linear-sopSkill
- migration-patternsSkill
- orchestration-patternsSkill
- pattern-discoverySkill
- release-patternsSkill
- rls-patternsSkill
- safe-ai-dlcSkill
- safe-workflowSkill
- spec-creationSkill
- stripe-patternsSkill
- team-coordinationSkill
- testing-patternsSkill
- vault-syncSkill
- agent-coordinationSkill
- api-patternsSkill
- confluence-docsSkill
- deployment-sopSkill
- frontend-patternsSkill
- git-advancedSkill
- linear-sopSkill
- migration-patternsSkill
- orchestration-patternsSkill
- pattern-discoverySkill
- release-patternsSkill
- rls-patternsSkill
- safe-ai-dlcSkill
- safe-workflowSkill
- security-auditSkill
- spec-creationSkill
- stripe-patternsSkill
- team-coordinationSkill
- testing-patternsSkill
- vault-syncSkill
The file
We split this skill into the rules it gives an agent
1 rule. 0 are common, 1 is distinctive, and 0 are very specific to this project.
0
Common
Most of the 117 edited versions we read keep these.
1
Distinctive
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 158
Before ANY production deployment:
“Common” is measured: kept by at least 6 in 10 of the 117 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 Skill
TEMPLATE: This skill uses
{{PLACEHOLDER}}tokens. Replace with your project values before use.
Purpose
Guide security validation with RLS enforcement, OWASP compliance, and vulnerability detection following security-first architecture.
When This Skill Applies
- Validating RLS policies
- Auditing API routes for auth
- Vulnerability scanning
- Pre-deployment security review
- Checking for exposed credentials
- Reviewing database access patterns
Stop-the-Line Conditions
FORBIDDEN Patterns
// FORBIDDEN: Direct DB calls (bypass RLS)
const users = await db.user.findMany();
// Must use: withUserContext, withAdminContext, or withSystemContext
// FORBIDDEN: Missing authentication on protected routes
export async function GET(req: Request) {
return getUserData(); // No auth check before accessing user data
}
// FORBIDDEN: Exposed credentials
const API_KEY = "sk_live_abc123"; // Hardcoded secret
// FORBIDDEN: SQL injection vulnerability
const query = `SELECT * FROM users WHERE id = ${userId}`; // InterpolatedCORRECT Patterns
// CORRECT: RLS context wrapper
const users = await withUserContext(db, userId, async (client) => {
return client.user.findMany();
});
// CORRECT: Auth check before data access
export async function GET(req: Request) {
const { userId } = await auth();
if (!userId) {
return new Response("Unauthorized", { status: 401 });
}
return getUserData(userId);
}
// CORRECT: Environment variables for secrets
const API_KEY = process.env.STRIPE_SECRET_KEY;
// CORRECT: Parameterized queries
const user = await db.$queryRaw`SELECT * FROM users WHERE id = ${userId}`;Security Audit Checklist
1. RLS Validation
- All database operations use context wrappers
- No direct DB calls in route handlers
- User isolation verified (user A cannot see user B's data)
- Admin operations properly scoped
# Find potential RLS bypasses
grep -r "db\." --include="*.ts" app/ lib/ | grep -v "withUserContext\|withAdminContext\|withSystemContext"2. Authentication Checks
- All protected routes verify authentication
- Auth provider called before data access
- Proper 401/403 responses for unauthorized
# Find routes missing auth checks
grep -r "export async function" --include="route.ts" app/ | head -20
# Manually verify each has auth check3. Credential Scanning
- No hardcoded secrets in code
- No API keys in client-side code
- Environment variables used correctly
# Scan for potential secrets
grep -rE "(sk_live|pk_live|password|secret|key)" --include="*.ts" --include="*.tsx" | grep -v "process.env\|.env"4. Dependency Vulnerabilities
# Run security audit
npm audit
# or
pip audit
# Check for high/critical vulnerabilities
npm audit --audit-level=high5. Input Validation
- User input validated with schemas (Zod, Pydantic, etc.)
- No raw query interpolation
- File upload restrictions in place
OWASP Top 10 Checklist
| Risk | Check | Status |
| A01 Broken Access | RLS enforced, auth on all routes | [ ] |
| A02 Crypto Failures | Secrets in env vars only | [ ] |
| A03 Injection | Parameterized queries, schemas | [ ] |
| A04 Insecure Design | Auth-first pattern followed | [ ] |
| A05 Misconfiguration | Prod env properly secured | [ ] |
| A06 Vulnerable Deps | Dependency audit clean | [ ] |
| A07 Auth Failures | Auth integration correct | [ ] |
| A08 Data Integrity | RLS prevents tampering | [ ] |
| A09 Logging Failures | Security events logged | [ ] |
| A10 SSRF | External URLs validated | [ ] |
Security Validation Commands
# Complete security check
{{SECURITY_AUDIT_COMMAND}}
# RLS bypass detection
grep -r "db\." --include="*.ts" app/ lib/ | wc -l
# Compare with context wrapper count
# Secret detection
grep -rE "sk_|pk_|password=" . --include="*.ts"Pre-Deployment Security Review
Before ANY production deployment:
- Dependency audit shows no high/critical issues
- RLS policies validated
- No new direct DB calls
- Environment variables documented
- Backup taken before migration
- Rollback plan documented
Security Audit Report Template
## Security Audit Report - {{TICKET_PREFIX}}-XXX
### Summary
- **Date**: [date]
- **Auditor**: Security Engineer
- **Scope**: [what was audited]
### Findings
| Severity | Issue | Location | Status |
| -------- | ----- | -------- | ------ |
| HIGH | ... | ... | FIXED |
| MEDIUM | ... | ... | OPEN |
### RLS Validation
- [x] All tables have RLS enabled
- [x] User isolation verified
- [x] Admin policies scoped correctly
### Recommendations
1. [recommendation]
2. [recommendation]
### Approval
- [ ] Security Engineer approves
- [ ] Ready for deploymentAuthoritative References
- Security Architecture:
docs/guides/SECURITY_FIRST_ARCHITECTURE.md - RLS Implementation:
docs/database/RLS_IMPLEMENTATION_GUIDE.md - RLS Policies:
docs/database/RLS_POLICY_CATALOG.md - OWASP Top 10: https://owasp.org/Top10/
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.

