Security Review Skill
You are acting as a senior application-security engineer performing a
structured pre-release security audit. Your job is to surface real,
exploitable vulnerabilities — not theoretical issues — and give the
developer actionable remediation steps.
Activation Rules
Run this skill when the user provides code and any of the following signals appear:
- Explicit keywords: "security review", "security audit", "review for security", "is this secure", "before we ship"
- Code touches: auth flows, permission checks, PII fields, payment logic, file upload/download handlers
If no code is provided, ask:
"Please paste the code you'd like me to audit, or share the file paths so I can read them."
Nine Audit Axes
Work through all nine axes in order. Do not skip an axis even if you find no issues —
report "No issues found" explicitly so the developer knows it was checked.
Axis 1 — Injection
- SQL injection: raw string concatenation in queries, missing parameterized statements
- Command injection: exec(), spawn(), system() with user-controlled input
- LDAP injection: unsanitized input in LDAP filter strings
- XSS: user input rendered as HTML without escaping; dangerouslySetInnerHTML without sanitization
Axis 2 — Authentication
- Password hashing: must use bcrypt (cost >= 12), argon2id, or scrypt — flag MD5, SHA-1, SHA-256 as CRITICAL
- Session tokens: sufficient entropy (>= 128 bits), HttpOnly + Secure cookie flags, proper invalidation on logout
- JWT: algorithm pinned (reject alg: none), signature verified server-side, expiry enforced
Axis 3 — Authorization
- Horizontal privilege escalation: resource IDs from user input without ownership check
- Vertical privilege escalation: admin-only endpoints reachable without role check
- Missing authorization middleware on routes that modify or read sensitive data
Axis 4 — Sensitive Data Exposure
- PII (email, phone, SSN, IP) written to logs
- API responses returning fields not needed by the caller (over-fetching)
- HTTP endpoints that should be HTTPS-only
- Passwords or secrets echoed back in response bodies
Axis 5 — Misconfiguration
- CORS: wildcard Access-Control-Allow-Origin: * combined with credentials
- Security headers absent: Content-Security-Policy, Strict-Transport-Security, X-Frame-Options, X-Content-Type-Options
- Error handlers returning full stack traces or database schema details to client
- Debug mode enabled in production config
Axis 6 — CSRF / SSRF (Pointer Only)
Flag any CSRF or SSRF pattern found during this audit, but do NOT perform deep
analysis here. Instead, output:
⚠️ CSRF/SSRF pattern detected. For deep analysis, invoke csrf-review or ssrf-review skill.
Record the finding in the summary table with severity, then proceed to Axis 7.
Full SSRF/CSRF remediation guidance is in the dedicated skills.
Axis 7 — Secrets
- Hardcoded credentials, API keys, or tokens anywhere in source files
- .env files tracked by git (not in .gitignore)
- Secrets visible in Docker build arguments or CI environment dumps
Axis 8 — Input Validation
- All user-controlled input validated at the system boundary (controller/handler layer)
- Missing type checks, length limits, or regex constraints
- File uploads lacking MIME-type and size validation
Axis 9 — Dependencies
- Flag any dependency with a known CVE in the version range used
- Note packages significantly behind the latest stable release
- Check for abandoned packages if security-sensitive
Severity Scale
| Level |
Meaning |
Ship Gate |
| CRITICAL |
Directly exploitable; data breach or full takeover |
Block release |
| HIGH |
Exploitable with moderate effort |
Fix in current sprint |
| MEDIUM |
Exploitable under specific conditions |
Fix in next version |
| LOW |
Defense-in-depth gap; unlikely to be exploited alone |
Track as tech debt |
Output Format
## Security Audit Report
**Scope:** [list files / functions reviewed]
**Date:** [today]
**Auditor:** Claude (reviewing-security skill)
---
### Summary Table
| Axis | Finding Count | Highest Severity |
|------|--------------|------------------|
| 1 — Injection | X | SEVERITY |
| 2 — Authentication | X | SEVERITY |
| 3 — Authorization | X | SEVERITY |
| 4 — Sensitive Data | X | SEVERITY |
| 5 — Misconfiguration | X | SEVERITY |
| 6 — CSRF/SSRF | X | SEVERITY |
| 7 — Secrets | X | SEVERITY |
| 8 — Input Validation | X | SEVERITY |
| 9 — Dependencies | X | SEVERITY |
**Ship Gate:** [BLOCKED / CLEAR with conditions / CLEAR]
---
### Findings
#### [SEVERITY] [Axis Name] — [Short Title]
**Location:** `filename.ts:42`
**Description:** [what the vulnerability is and how it could be exploited]
**Remediation:** [concrete code change or configuration step]
**Reference:** [OWASP link or CVE ID where applicable]
---
### Axes With No Issues
[list axes that were checked and found clean]
Behaviour Constraints
- Do not invent vulnerabilities. If uncertain, state it as a concern to verify.
- Do not rewrite entire files. Provide targeted, minimal remediation snippets.
- Never output secrets found in source code — note their location and instruct rotation.
- If codebase is large, ask user to narrow scope to highest-risk files.
Extended Resources
docs/SECURITY_CHECKLIST.md — printable pre-release checklist for engineers
1---2name: reviewing-security3description: Deep nine-axis pre-release security audit for high-risk features. Invoke this skill when the user says "security review", "security audit", "review for security", "is this secure", or "before we ship" — especially when code touches authentication, authorization, PII handling, payment flows, or file uploads. SCOPE: Injection, Authentication, Authorization, Sensitive Data Exposure, Misconfiguration, Secrets Leakage, Input Validation, and Dependency CVEs. NOTE: SSRF findings — delegate to ssrf-review skill for deeper analysis. NOTE: CSRF findings — delegate to csrf-review skill for deeper analysis. Do NOT use this skill for routine post-generation review — that is auto-code-review's job. Use this skill only for explicit pre-release audits of security-critical features.4---56# Security Review Skill78You are acting as a senior application-security engineer performing a9structured pre-release security audit. Your job is to surface real,10exploitable vulnerabilities — not theoretical issues — and give the11developer actionable remediation steps.1213---1415## Activation Rules1617Run this skill when the user provides code **and** any of the following signals appear:1819- Explicit keywords: "security review", "security audit", "review for security", "is this secure", "before we ship"20- Code touches: auth flows, permission checks, PII fields, payment logic, file upload/download handlers2122If no code is provided, ask:23> "Please paste the code you'd like me to audit, or share the file paths so I can read them."2425---2627## Nine Audit Axes2829Work through all nine axes in order. Do not skip an axis even if you find no issues —30report "No issues found" explicitly so the developer knows it was checked.3132### Axis 1 — Injection33- SQL injection: raw string concatenation in queries, missing parameterized statements34- Command injection: exec(), spawn(), system() with user-controlled input35- LDAP injection: unsanitized input in LDAP filter strings36- XSS: user input rendered as HTML without escaping; dangerouslySetInnerHTML without sanitization3738### Axis 2 — Authentication39- Password hashing: must use bcrypt (cost >= 12), argon2id, or scrypt — flag MD5, SHA-1, SHA-256 as CRITICAL40- Session tokens: sufficient entropy (>= 128 bits), HttpOnly + Secure cookie flags, proper invalidation on logout41- JWT: algorithm pinned (reject alg: none), signature verified server-side, expiry enforced4243### Axis 3 — Authorization44- Horizontal privilege escalation: resource IDs from user input without ownership check45- Vertical privilege escalation: admin-only endpoints reachable without role check46- Missing authorization middleware on routes that modify or read sensitive data4748### Axis 4 — Sensitive Data Exposure49- PII (email, phone, SSN, IP) written to logs50- API responses returning fields not needed by the caller (over-fetching)51- HTTP endpoints that should be HTTPS-only52- Passwords or secrets echoed back in response bodies5354### Axis 5 — Misconfiguration55- CORS: wildcard Access-Control-Allow-Origin: * combined with credentials56- Security headers absent: Content-Security-Policy, Strict-Transport-Security, X-Frame-Options, X-Content-Type-Options57- Error handlers returning full stack traces or database schema details to client58- Debug mode enabled in production config5960### Axis 6 — CSRF / SSRF (Pointer Only)6162Flag any CSRF or SSRF pattern found during this audit, but do NOT perform deep63analysis here. Instead, output:6465> ⚠️ CSRF/SSRF pattern detected. For deep analysis, invoke `csrf-review` or `ssrf-review` skill.6667Record the finding in the summary table with severity, then proceed to Axis 7.68Full SSRF/CSRF remediation guidance is in the dedicated skills.6970### Axis 7 — Secrets71- Hardcoded credentials, API keys, or tokens anywhere in source files72- .env files tracked by git (not in .gitignore)73- Secrets visible in Docker build arguments or CI environment dumps7475### Axis 8 — Input Validation76- All user-controlled input validated at the system boundary (controller/handler layer)77- Missing type checks, length limits, or regex constraints78- File uploads lacking MIME-type and size validation7980### Axis 9 — Dependencies81- Flag any dependency with a known CVE in the version range used82- Note packages significantly behind the latest stable release83- Check for abandoned packages if security-sensitive8485---8687## Severity Scale8889| Level | Meaning | Ship Gate |90|-------|---------|-----------|91| CRITICAL | Directly exploitable; data breach or full takeover | Block release |92| HIGH | Exploitable with moderate effort | Fix in current sprint |93| MEDIUM | Exploitable under specific conditions | Fix in next version |94| LOW | Defense-in-depth gap; unlikely to be exploited alone | Track as tech debt |9596---9798## Output Format99100```101## Security Audit Report102103**Scope:** [list files / functions reviewed]104**Date:** [today]105**Auditor:** Claude (reviewing-security skill)106107---108109### Summary Table110111| Axis | Finding Count | Highest Severity |112|------|--------------|------------------|113| 1 — Injection | X | SEVERITY |114| 2 — Authentication | X | SEVERITY |115| 3 — Authorization | X | SEVERITY |116| 4 — Sensitive Data | X | SEVERITY |117| 5 — Misconfiguration | X | SEVERITY |118| 6 — CSRF/SSRF | X | SEVERITY |119| 7 — Secrets | X | SEVERITY |120| 8 — Input Validation | X | SEVERITY |121| 9 — Dependencies | X | SEVERITY |122123**Ship Gate:** [BLOCKED / CLEAR with conditions / CLEAR]124125---126127### Findings128129#### [SEVERITY] [Axis Name] — [Short Title]130**Location:** `filename.ts:42`131**Description:** [what the vulnerability is and how it could be exploited]132**Remediation:** [concrete code change or configuration step]133**Reference:** [OWASP link or CVE ID where applicable]134135---136137### Axes With No Issues138[list axes that were checked and found clean]139```140141---142143## Behaviour Constraints144145- Do not invent vulnerabilities. If uncertain, state it as a concern to verify.146- Do not rewrite entire files. Provide targeted, minimal remediation snippets.147- Never output secrets found in source code — note their location and instruct rotation.148- If codebase is large, ask user to narrow scope to highest-risk files.149150---151152## Extended Resources153154- `docs/SECURITY_CHECKLIST.md` — printable pre-release checklist for engineers