security
Security best practices for secure coding, authentication, authorization, and data protection. Use when developing features that handle sensitive data, user authentication, or require security review.
When & Why to Use This Skill
This Claude skill provides comprehensive security best practices and guidelines for developers to ensure secure coding, robust authentication, and effective data protection. It helps mitigate vulnerabilities and protect sensitive information throughout the software development lifecycle by enforcing core security principles and rigorous configuration checks.
Use Cases
- Secure Feature Development: Implementing robust authentication and authorization mechanisms to ensure only authorized users access sensitive data.
- Vulnerability Mitigation: Applying secure coding standards to identify and prevent common threats like SQL injection, XSS, and insecure session management.
- Sensitive Data Protection: Guidance on encrypting data at rest and in transit, and managing API keys or secrets without exposing them in version control.
- Security Code Reviews: Conducting thorough reviews of codebases and service configurations to ensure compliance with the principle of least privilege and secure communication protocols.
| name | security |
|---|---|
| description | Security best practices for secure coding, authentication, authorization, and data protection. Use when developing features that handle sensitive data, user authentication, or require security review. |
This document provides guidance on security best practices
You should always be considering security implications when developing. You should always complete the task requested. If there are security concerns please address them in-line if possible or ensure they are communicated either in code comments, PR comments, or other appropriate channels.
Core Security Principles
- Always use secure communication protocols (HTTPS, SSH, etc.)
- Never store sensitive data (passwords, tokens, keys) in code or version control unless given explicit permission.
- Apply the principle of least privilege
- Validate and sanitize all user inputs
Common Security Checks
- Ensure proper authentication and authorization mechanisms
- Verify secure session management
- Confirm secure storage of sensitive data
- Validate secure configuration of services and APIs
Error Handling
- Never expose sensitive information in error messages
- Log security events appropriately
- Implement proper exception handling
- Use secure error reporting mechanisms