auth-review
Installation
SKILL.md
When reviewing authentication and authorization code, check for:
- Credential handling — passwords hashed with strong algorithms (bcrypt, argon2), no plaintext storage, no logging of secrets
- Token security — proper expiration, secure generation (crypto-random), safe storage (httpOnly cookies, not localStorage for sensitive tokens)
- Session management — session fixation prevention, proper invalidation on logout, idle timeouts
- Access control — authorization checks on every protected endpoint, no reliance on client-side checks alone, principle of least privilege
- OAuth/OIDC flows — state parameter for CSRF protection, PKCE for public clients, proper redirect URI validation
- Input validation — protection against injection in auth queries, rate limiting on login endpoints, account lockout policies
- Error handling — generic error messages (no user enumeration), consistent timing to prevent timing attacks