Security Checklist
Purpose
This is a reference checklist, not an agent. Any agent — code-simplifier,
test-writer, verify-app, or the main session — can consult this when they
encounter security-relevant code. The dedicated security-reviewer agent
does deeper analysis; this checklist catches the obvious issues.
Quick Scan (30 seconds)
Before committing any code that handles user input, authentication, or
external data, check these five things:
- No hardcoded secrets — grep for API keys, passwords, tokens, connection strings
- Input is validated — user input goes through validation before use
- Queries are parameterized — no string concatenation in SQL/NoSQL queries
- Output is escaped — user content is not rendered as raw HTML
- Auth is checked — protected endpoints have authentication middleware
If any fail, stop and fix before committing.
OWASP Top 10 Reference
A01: Broken Access Control
- Every endpoint checks authentication AND authorization
- Users cannot access other users' resources by changing IDs in URLs
- File paths from user input are sanitized (no path traversal)
- CORS is configured to allow only expected origins
- Directory listing is disabled on static file servers
A02: Cryptographic Failures
- Passwords hashed with bcrypt, scrypt, or argon2 — never MD5/SHA for passwords
- Sensitive data encrypted at rest (PII, payment info)
- HTTPS enforced in production — no mixed content
- API keys and secrets stored in environment variables, not source code
- Random values use crypto-secure generators, not Math.random()
A03: Injection
- SQL: parameterized queries or ORM — never string concatenation
- NoSQL: no user input in $where, $regex operators
- OS commands: use dedicated libraries, not shell execution with user input
- LDAP: parameterized queries if applicable
- Template engines: auto-escaping enabled by default
A04: Insecure Design
- Rate limiting on authentication endpoints
- Account lockout after repeated failures
- No sensitive data in URLs or query parameters
- Session tokens regenerated after login
- Passwords have minimum complexity requirements
A05: Security Misconfiguration
- Debug mode disabled in production
- Default credentials changed
- Security headers set: X-Content-Type-Options, X-Frame-Options, Strict-Transport-Security
- Error messages don't expose stack traces or internal details to users
- Unused features and endpoints removed
A06: Vulnerable Components
- Dependencies up to date — no known CVEs
- Lock files committed (package-lock.json, yarn.lock, etc.)
- Dependency audit clean:
npm audit, pip audit, cargo audit
- No abandoned packages with no maintenance
A07: Authentication Failures
- Passwords not stored in plaintext
- JWT tokens validated on every request (signature, expiry, issuer)
- Session management uses secure cookies (HttpOnly, Secure, SameSite)
- Password reset tokens are single-use and time-limited
- Multi-factor authentication available for sensitive operations
A08: Data Integrity Failures
- Deserialization of user input uses safe libraries
- CI/CD pipelines verify integrity of dependencies
- Software updates use signed packages
A09: Logging Failures
- Security events are logged (login attempts, access denied, input validation failures)
- Logs do NOT contain passwords, tokens, or PII
- Log injection is prevented (user input in logs is sanitized)
- Alerts configured for suspicious patterns
A10: Server-Side Request Forgery (SSRF)
- URLs from user input are validated against an allowlist
- Internal network addresses blocked (127.0.0.1, 10.x, 169.254.x, etc.)
- DNS rebinding protection if URL resolution is involved
- Response from fetched URLs is not returned raw to the user
When to Consult This
- Writing code that handles user input
- Implementing authentication or authorization
- Adding new API endpoints
- Handling file uploads
- Integrating with external services
- Updating dependencies
- Before any release
Common False Positives
Not everything is a security issue:
- Test credentials in test files (clearly marked as test-only)
- Public API keys that are designed to be public (e.g., Stripe publishable key)
- SHA-256/MD5 used for checksums or cache keys (not for password hashing)
- Environment variables in .env.example (templates, not real secrets)
- Self-signed certificates in development environments
1---2name: security-checklist3description: OWASP-based security checklist any agent can reference when reviewing or writing code4---56# Security Checklist78## Purpose910This is a reference checklist, not an agent. Any agent — code-simplifier,11test-writer, verify-app, or the main session — can consult this when they12encounter security-relevant code. The dedicated security-reviewer agent13does deeper analysis; this checklist catches the obvious issues.1415## Quick Scan (30 seconds)1617Before committing any code that handles user input, authentication, or18external data, check these five things:19201. **No hardcoded secrets** — grep for API keys, passwords, tokens, connection strings212. **Input is validated** — user input goes through validation before use223. **Queries are parameterized** — no string concatenation in SQL/NoSQL queries234. **Output is escaped** — user content is not rendered as raw HTML245. **Auth is checked** — protected endpoints have authentication middleware2526If any fail, stop and fix before committing.2728## OWASP Top 10 Reference2930### A01: Broken Access Control31- Every endpoint checks authentication AND authorization32- Users cannot access other users' resources by changing IDs in URLs33- File paths from user input are sanitized (no path traversal)34- CORS is configured to allow only expected origins35- Directory listing is disabled on static file servers3637### A02: Cryptographic Failures38- Passwords hashed with bcrypt, scrypt, or argon2 — never MD5/SHA for passwords39- Sensitive data encrypted at rest (PII, payment info)40- HTTPS enforced in production — no mixed content41- API keys and secrets stored in environment variables, not source code42- Random values use crypto-secure generators, not Math.random()4344### A03: Injection45- SQL: parameterized queries or ORM — never string concatenation46- NoSQL: no user input in $where, $regex operators47- OS commands: use dedicated libraries, not shell execution with user input48- LDAP: parameterized queries if applicable49- Template engines: auto-escaping enabled by default5051### A04: Insecure Design52- Rate limiting on authentication endpoints53- Account lockout after repeated failures54- No sensitive data in URLs or query parameters55- Session tokens regenerated after login56- Passwords have minimum complexity requirements5758### A05: Security Misconfiguration59- Debug mode disabled in production60- Default credentials changed61- Security headers set: X-Content-Type-Options, X-Frame-Options, Strict-Transport-Security62- Error messages don't expose stack traces or internal details to users63- Unused features and endpoints removed6465### A06: Vulnerable Components66- Dependencies up to date — no known CVEs67- Lock files committed (package-lock.json, yarn.lock, etc.)68- Dependency audit clean: `npm audit`, `pip audit`, `cargo audit`69- No abandoned packages with no maintenance7071### A07: Authentication Failures72- Passwords not stored in plaintext73- JWT tokens validated on every request (signature, expiry, issuer)74- Session management uses secure cookies (HttpOnly, Secure, SameSite)75- Password reset tokens are single-use and time-limited76- Multi-factor authentication available for sensitive operations7778### A08: Data Integrity Failures79- Deserialization of user input uses safe libraries80- CI/CD pipelines verify integrity of dependencies81- Software updates use signed packages8283### A09: Logging Failures84- Security events are logged (login attempts, access denied, input validation failures)85- Logs do NOT contain passwords, tokens, or PII86- Log injection is prevented (user input in logs is sanitized)87- Alerts configured for suspicious patterns8889### A10: Server-Side Request Forgery (SSRF)90- URLs from user input are validated against an allowlist91- Internal network addresses blocked (127.0.0.1, 10.x, 169.254.x, etc.)92- DNS rebinding protection if URL resolution is involved93- Response from fetched URLs is not returned raw to the user9495## When to Consult This9697- Writing code that handles user input98- Implementing authentication or authorization99- Adding new API endpoints100- Handling file uploads101- Integrating with external services102- Updating dependencies103- Before any release104105## Common False Positives106107Not everything is a security issue:108- Test credentials in test files (clearly marked as test-only)109- Public API keys that are designed to be public (e.g., Stripe publishable key)110- SHA-256/MD5 used for checksums or cache keys (not for password hashing)111- Environment variables in .env.example (templates, not real secrets)112- Self-signed certificates in development environments