What problem does it solve?
Prevents insecure authentication, authorization, secret handling, and transport/storage misconfigurations that lead to credential theft, privilege escalation, and data exposure for web and mobile services.
Core Features & Use Cases
- Authentication patterns: guidance for JWT, session-based auth, OAuth2/OIDC flows, refresh token handling, and secure cookie practices.
- Authorization models: RBAC and resource-level ownership checks to prevent horizontal privilege escalation.
- Secrets & encryption: best practices for environment-backed secrets, rotation strategies, encryption at rest and in transit, and vault integration.
- Operational controls: CORS configuration, rate limiting, security headers (CSP/HSTS), input validation, and anti-pattern avoidance.
- Use Case: Harden a login and API stack by switching from insecure token storage to httpOnly refresh cookies, adding per-key rate limits, enforcing TLS and CSP, and integrating secret rotation.
Quick Start
Use the security-patterns skill to review an authentication or API configuration and produce prioritized remediation steps for tokens, secrets, CORS, and rate limiting.