security_audit
SKILL.md
Security Audit Protocol
1. Critical "Guard" Files
WARNING: The following files are OFF-LIMITS for modification without explicit user approval.
scripts/ai-diff-gate.ts.github/workflows/**- Any file with
midlaworpolicyin the name.
2. Database Security (Supabase)
- RLS (Row Level Security):
- EVERY table must have RLS enabled.
- Policies must explicitly define
USINGandWITH CHECKclauses. - NEVER use
service_rolekey in frontend client code.
- SQL Injection:
- Use parameterized queries or ORM methods (Supabase JS client) only.
- Avoid raw SQL string concatenation.
3. API Security
- Authentication:
- Verify
userexists inreq(usually populated by middleware/auth helper). - Check permissions before performing actions (e.g.
checkPermission(user.id, 'post.create')).
- Verify
- Input Validation:
- Validate ALL inputs using
zodschemas. - Sanitize HTML inputs if rendering user content (use
DOMPurify).
- Validate ALL inputs using
4. Audit Checklist
- Are guards/policies untouched?
- Is RLS enabled and tested?
- Is input validation (
zod) in place? - Are no secrets committed to code?
- Did I run
/security-review(if available) or manual check?
Weekly Installs
2
Repository
cityfish91159/maihousesInstalled on
opencode2
codex2
claude-code2
antigravity2
gemini-cli2
windsurf1