security-practices
Security practices including secrets management, input validation, SSRF prevention, and production hardening. Use for security-sensitive code.
When & Why to Use This Skill
This Claude skill serves as a comprehensive DevSecOps guide designed to fortify software applications against common vulnerabilities. It provides actionable patterns for secrets management, SSRF prevention, and production hardening, ensuring that security-sensitive code meets industry standards for safety and resilience.
Use Cases
- Secure Secrets Management: Transitioning from hardcoded configurations to environment-based secrets management to prevent credential leaks.
- Web Attack Prevention: Implementing SSRF protection by blocking internal IP ranges and enforcing strict input validation at system boundaries.
- Production Environment Hardening: Sanitizing error responses to prevent stack trace exposure and ensuring HTTPS-only external connections.
- Security-First Code Reviews: Using the skill as a benchmark to audit existing codebases for security gaps and architectural weaknesses.
| name | security-practices |
|---|---|
| description | Security practices including secrets management, input validation, SSRF prevention, and production hardening. Use for security-sensitive code. |
security-practices
Quick Start
- All secrets in environment variables (never in config files)
- Validate inputs at system boundaries
- Sanitize error responses (no stack traces in production)
- Use HTTPS for all external connections
Key Principles
- Environment variables for all secrets
- SSRF prevention (block internal IP ranges)
- Development vs Production mode separation
- Rigorous input validation
References
See rules.md for complete conventions.