security-review
OWASP Top 10 vulnerability detection. Use PROACTIVELY for code handling user input, auth, APIs, payments, or sensitive data.
What this skill does
# Security Review Skill
## When to Activate
- Code handles user input (forms, query params, request body)
- Authentication or authorization logic added/changed
- API endpoints created or modified
- Payment or financial logic implemented
- Sensitive data (PII, credentials, tokens) processed
- External API integrations added
- File upload or download functionality
- Before deploying to production
## Security Checklist
### 1. Secrets Management
**BAD:**
```
API_KEY = "sk-abc123def456"
db_url = "postgres://admin:password@prod-db:5432/app"
```
**GOOD:**
```
API_KEY = env("API_KEY")
db_url = env("DATABASE_URL")
```
**Verify:**
- [ ] No hardcoded API keys, passwords, or tokens in code
- [ ] Secrets loaded from environment variables or secret manager
- [ ] `.env` files listed in `.gitignore`
- [ ] No secrets leaked in logs, error messages, or stack traces
- [ ] Different secrets for dev/staging/prod
### 2. Input Validation
**BAD:**
```
def get_user(request):
id = request.query("id") # No validation
db.query("SELECT * FROM users WHERE id = " + id) # SQL injection!
```
**GOOD:**
```
def get_user(request):
id = parse_int(request.query("id"))
if id is None or id <= 0:
return error_response(400, "Invalid ID")
db.query("SELECT * FROM users WHERE id = $1", [id]) # Parameterized
```
**Verify:**
- [ ] All user input validated at system boundaries
- [ ] Type checking on all inputs
- [ ] Length and range limits enforced
- [ ] Allowlist approach over denylist
- [ ] File upload: type, size, and name validated
### 3. SQL Injection Prevention
**Verify:**
- [ ] Parameterized queries only (no string concatenation)
- [ ] ORM queries don't use raw SQL without parameters
- [ ] Database user follows least privilege principle
- [ ] No dynamic table/column names from user input
### 4. Authentication & Authorization
**Verify:**
- [ ] Passwords hashed with bcrypt/argon2 (never MD5/SHA1)
- [ ] Session tokens cryptographically random (min 128 bits)
- [ ] JWT validated: signature, expiry, issuer, audience
- [ ] Role-based access control on every protected endpoint
- [ ] Password reset tokens single-use and time-limited
- [ ] Account lockout after repeated failed attempts
### 5. XSS Prevention
**BAD:**
```
# Rendering raw user HTML without sanitization
render_html(user_comment)
```
**GOOD:**
```
# Sanitize before rendering, or render as plain text
render_html(sanitize(user_comment))
# Or better: render as plain text (no HTML interpretation)
render_text(user_comment)
```
**Verify:**
- [ ] User content HTML-escaped before rendering
- [ ] CSP headers configured and restrictive
- [ ] No dynamic code execution (eval, exec) with user input
- [ ] URL parameters sanitized before use
### 6. CSRF Protection
**Verify:**
- [ ] CSRF tokens on all state-changing requests
- [ ] `SameSite` cookie attribute set to `Strict` or `Lax`
- [ ] `Origin` header validated on API endpoints
### 7. Rate Limiting
**Verify:**
- [ ] Rate limits on authentication endpoints (login, register, reset)
- [ ] Rate limits on public API endpoints
- [ ] Progressive delays or account lockout on failures
- [ ] Rate limit headers returned to clients
### 8. Sensitive Data Exposure
**Verify:**
- [ ] PII encrypted at rest (database-level or field-level)
- [ ] HTTPS enforced (HSTS headers set)
- [ ] API responses don't leak internal fields (IDs, timestamps, stack traces)
- [ ] Minimal data collection — only collect what's needed
- [ ] Proper data retention and deletion policies
### 9. Dependency Security
**Verify:**
- [ ] No known vulnerable dependencies (run your language's audit tool)
- [ ] Dependencies pinned to specific versions
- [ ] Lock files committed to version control
- [ ] Regular dependency updates scheduled
## Pre-Deployment Checklist
- [ ] All security checklist items verified
- [ ] No `TODO: fix security` or `HACK` comments left
- [ ] Error pages don't expose stack traces in production
- [ ] Debug mode disabled in production config
- [ ] Logging doesn't include sensitive data
- [ ] CORS configured restrictively (not `*`)
- [ ] HTTP security headers set (X-Frame-Options, X-Content-Type-Options, etc.)
- [ ] Database migrations reviewed for data safety
- [ ] Backup and recovery tested
## Report Format
```markdown
## Security Review: [Component/Feature]
### Critical — Fix Immediately
[Vulnerabilities that could lead to data breach or system compromise]
- **Location:** `file:line`
- **Issue:** [Description]
- **Risk:** [Impact if exploited]
- **Fix:** [Specific remediation]
### High — Fix Before Deploy
[Issues that weaken security posture]
### Medium — Fix Soon
[Best practice violations]
### Recommendations
[Hardening suggestions]
**Overall Risk Level:** [Critical / High / Medium / Low]
```
Related in Security
mac-ops
IncludedComprehensive macOS workstation operations — diagnose kernel panics, identify failing drives, audit launchd startup items, decode wake reasons, triage TCC permission denials, manage APFS snapshots, recover from no-boot. Use for: Mac is slow, slow bootup, won't boot, kernel panic, kernel_task hot, mds_stores CPU, photoanalysisd, cloudd, login loop, gray screen, sleep wake failure, drive failing, IO errors, APFS snapshots eating space, Time Machine local snapshots, Spotlight indexing, launchd, LaunchAgent, LaunchDaemon, login items, TCC permissions, Full Disk Access, Screen Recording denied, Gatekeeper, quarantine, com.apple.quarantine, app is damaged, helper tool, /Library/PrivilegedHelperTools, pmset, wake reasons, dark wake, sysdiagnose, panic.ips, DiagnosticReports, configuration profile, MDM profile, remote diagnostics over SSH.
a11y-audit
IncludedRun accessibility audits on web projects combining automated scanning (axe-core, Lighthouse) with WCAG 2.1 AA compliance mapping, manual check guidance, and structured reporting. Output is configurable: markdown report only, markdown plus machine-readable JSON, or markdown plus issue tracker integration. Use this skill whenever the user mentions "accessibility audit", "a11y audit", "WCAG audit", "accessibility check", "compliance scan", or asks to check a web project for accessibility issues. Also trigger when the user wants to verify WCAG conformance or map findings to a specific standard (CAN-ASC-6.2, EN 301 549, ADA/AODA).
erpclaw
IncludedAI-native ERP system with self-extending OS. Full accounting, invoicing, inventory, purchasing, tax, billing, HR, payroll, advanced accounting (ASC 606/842, intercompany, consolidation), and financial reporting. 413 actions across 14 domains, 43 expansion modules. Constitutional guardrails, adversarial audit, schema migration. Double-entry GL, immutable audit trail, US GAAP.
assess
IncludedAssesses and rates quality 0-10 across multiple dimensions (correctness, maintainability, security, performance, testability, simplicity) with pros/cons analysis. Compares against project conventions and prior decisions from memory. Produces structured evaluation reports with actionable improvement suggestions. Use when evaluating code, designs, architectures, or comparing alternative approaches.
spring-boot-security-jwt
IncludedProvides JWT authentication and authorization patterns for Spring Boot 3.5.x covering token generation with JJWT, Bearer/cookie authentication, database/OAuth2 integration, and RBAC/permission-based access control using Spring Security 6.x. Use when implementing authentication or authorization in Spring Boot applications.
code-hardcode-audit
IncludedDetect hardcoded values, magic numbers, and leaked secrets. TRIGGERS - hardcode audit, magic numbers, PLR2004, secret scanning.