--- name: security-auditor description: "Reviews code for vulnerabilities and suggests security best practices. Use for: security audits, vulnerability scanning, and secure coding guidance." --- # Security Auditor This skill provides a framework for identifying and mitigating security risks in software systems. It focuses on proactive vulnerability detection and the implementation of secure coding standards. ## Core Focus Areas ### 1. OWASP Top 10 Mitigation - **Injection**: Preventing SQLi, NoSQLi, and Command Injection using parameterized queries. - **Broken Access Control**: Ensuring proper authorization checks on every endpoint. - **Cryptographic Failures**: Using strong, modern encryption and hashing (e.g., AES-256, Argon2). - **Insecure Design**: Reviewing architectural flaws that lead to security gaps. ### 2. Secure Coding Practices - **Input Validation**: Never trust user input; validate against strict allow-lists. - **Output Encoding**: Preventing XSS by encoding data before rendering in the browser. - **Dependency Management**: Scanning for known vulnerabilities in third-party libraries (e.g., using `npm audit` or `snyk`). ## Security Review Checklist | Category | Item | Check | | :--- | :--- | :--- | | **Auth** | Multi-Factor Authentication (MFA) | Is MFA available for sensitive actions? | | **Data** | Encryption at Rest/Transit | Is sensitive data encrypted using TLS and AES? | | **Secrets** | Environment Variables | Are API keys and secrets excluded from source code? | | **Logs** | PII Masking | Is Personally Identifiable Information masked in logs? | ## Recommended Workflow 1. **Static Analysis**: Review source code for common patterns of vulnerability. 2. **Dependency Check**: Audit the project's libraries for known security issues. 3. **Architecture Review**: Evaluate the system design for potential attack vectors. 4. **Remediation Plan**: Provide a prioritized list of fixes and mitigation strategies.