Security Review Checklist
Security review checklist for Claude Code — covers auth, authorization, input validation, and data protection.
claude-codesecuritychecklistowasp
Prompt
Before completing any task that touches authentication, authorization, data handling, or API endpoints, verify: ## Authentication - [ ] Passwords are hashed (bcrypt/argon2), never stored in plain text - [ ] JWT tokens have appropriate expiration times - [ ] Refresh token rotation is implemented - [ ] Session invalidation works on logout ## Authorization - [ ] Every API endpoint checks user permissions - [ ] Users cannot access other users' data (IDOR check) - [ ] Admin routes are protected by role checks - [ ] RLS policies are enabled on new tables ## Input Validation - [ ] All user input is validated at the API boundary (Zod/Joi) - [ ] SQL queries use parameterized queries — no string concatenation - [ ] File uploads validate type, size, and scan for malware - [ ] URLs are validated before redirect (prevent open redirect) ## Data Protection - [ ] Sensitive data is encrypted at rest - [ ] API responses don't leak sensitive fields (passwords, tokens, internal IDs) - [ ] Logs don't contain PII or credentials - [ ] Error messages don't expose stack traces or internal details to clients ## Headers & Transport - [ ] HTTPS enforced (HSTS headers set) - [ ] CORS is configured narrowly (not wildcard *) - [ ] CSP headers are set appropriately - [ ] Rate limiting is applied to auth endpoints
Save this prompt to your library
Organize, version, and access your best prompts across ChatGPT, Claude, and Cursor.
Related prompts
Project Setup
A starter CLAUDE.md file for Next.js + Supabase projects. Defines tech stack, code style, and file conventions.
React Native Mobile AppCLAUDE.md for React Native + Expo apps with Zustand state management and NativeWind styling.
Monorepo with TurborepoCLAUDE.md for Turborepo monorepos with Next.js frontend, Hono API, and shared TypeScript packages.
AWS Lambda ServerlessCLAUDE.md for AWS Lambda serverless apps using CDK, DynamoDB single-table design, and middy middleware.