api-security-hardening
REST API security hardening with authentication, rate limiting, input validation, security headers. Use for production APIs, security audits, defense-in-depth, or encountering vulnerabilities, injection attacks, CORS issues.
By secondsky · 438 installs
npx skills add secondsky/claude-skills --skill api-security-hardening
Source repository · Upstream listing
API Security Hardening
Protect REST APIs against common vulnerabilities with multiple security layers.
Security Middleware Stack (Express)
Input Validation
Security Headers
Security Checklist
[ ] HTTPS everywhere
[ ] Authentication on all protected routes
[ ] Input validation and sanitization
[ ] Rate limiting enabled
[ ] Security headers configured
[ ] CORS restricted to allowed origins
[ ] No stack traces in production errors
[ ] Audit logging enabled
[ ] Dependencies regularly updated
Additional Implementations
See [references/python nginx.md](references/python nginx.md) for:
Python FastAPI security middleware
Pydantic input validation with password rules
Nginx SSL/TLS and security headers configuration
HTTP Parameter Pollution prevention
Never Do
Trust user input without validation
Return detailed errors in production
Store secrets in code
Use GET for state changing operations
Disable security for convenience