OWASP Top 10 Security Reviewer
This skill is designed to perform a comprehensive security code review based on the OWASP Top 10 vulnerabilities. Use this skill when the user asks for a security audit, code review for vulnerabilities, or specifically mentions OWASP.
Core Mandates
- Prioritize Critical Vulnerabilities: Focus on high-impact issues that could lead to data breaches or system compromise.
- Context-Aware Analysis: Understand the language, framework, and deployment context to identify relevant threats (e.g., SQL injection is relevant for SQL databases, XSS for web frontends).
- Actionable Remediation: Provide clear, specific code examples or configuration changes to fix identified issues.
- No False Positives: Verify findings to the best of your ability. If unsure, mark as "Potential" or "Requires Manual Verification".
OWASP Top 10 Checklist
When reviewing code, systematically check for the following categories:
A01:2021-Broken Access Control
- Check for missing authorization checks (e.g.,
is_admin, has_permission).
- Look for Insecure Direct Object References (IDOR) - exposing internal IDs in URLs/APIs without validation.
- Verify that restricted pages/endpoints are protected.
A02:2021-Cryptographic Failures
- Identify hardcoded secrets (API keys, passwords, tokens).
- Check for weak encryption algorithms (e.g., MD5, SHA1, DES).
- Ensure sensitive data (PII, passwords) is not stored or transmitted in plain text.
- Verify proper use of random number generators (CSPRNG).
A03:2021-Injection
- SQL Injection: Look for string concatenation in SQL queries. Ensure parameterized queries or ORMs are used correctly.
- Command Injection: Check for user input being passed to system commands (e.g.,
os.system, exec).
- LDAP/NoSQL Injection: Verify input sanitization for other data stores.
A04:2021-Insecure Design
- Assess if the architecture inherently supports security (e.g., threat modeling).
- Look for lack of rate limiting or anti-automation defenses.
A05:2021-Security Misconfiguration
- Check for default credentials or configurations.
- Look for verbose error messages exposing stack traces to users.
- Verify security headers (CSP, HSTS, X-Frame-Options).
- Check for unnecessary features or services enabled.
A06:2021-Vulnerable and Outdated Components
- Check
package.json, requirements.txt, etc., for known vulnerable dependencies (if version info is available).
- Advise on updating dependencies.
A07:2021-Identification and Authentication Failures
- Check for weak password policies.
- Verify session management (timeouts, secure cookies).
- Look for lack of multi-factor authentication (MFA) support where appropriate.
A08:2021-Software and Data Integrity Failures
- Verify code signing or integrity checks for updates/plugins.
- Check for insecure deserialization vulnerabilities (e.g.,
pickle.load in Python, ObjectInputStream in Java) with untrusted data.
A09:2021-Security Logging and Monitoring Failures
- Ensure critical events (logins, failed access, errors) are logged.
- Verify logs do not contain sensitive data.
A10:2021-Server-Side Request Forgery (SSRF)
- Check if user-supplied URLs are fetched by the server without validation (allowlisting).
Review Process & Output Format
- Analyze: Read the provided code thoroughly.
- Identify: Match patterns to the OWASP categories above.
- Report: specific findings using the format below.
Output Format
## Security Review Report (OWASP Top 10)
### Summary
[Brief overview of the security posture of the reviewed code.]
### Findings
#### [High/Medium/Low] <Vulnerability Name> (OWASP Category)
* **Location:** `path/to/file:line_number`
* **Description:** [Explain why this is a vulnerability.]
* **Remediation:** [Provide code fix or specific instruction.]
```language
// Secure code example
```
... (Repeat for other findings)
### General Recommendations
* [Broader security advice not tied to a specific line of code]
1---2name: security-reviewer3description: OWASP Top 10 Security Reviewer4---5# OWASP Top 10 Security Reviewer67This skill is designed to perform a comprehensive security code review based on the OWASP Top 10 vulnerabilities. Use this skill when the user asks for a security audit, code review for vulnerabilities, or specifically mentions OWASP.89## Core Mandates10111. **Prioritize Critical Vulnerabilities:** Focus on high-impact issues that could lead to data breaches or system compromise.122. **Context-Aware Analysis:** Understand the language, framework, and deployment context to identify relevant threats (e.g., SQL injection is relevant for SQL databases, XSS for web frontends).133. **Actionable Remediation:** Provide clear, specific code examples or configuration changes to fix identified issues.144. **No False Positives:** Verify findings to the best of your ability. If unsure, mark as "Potential" or "Requires Manual Verification".1516## OWASP Top 10 Checklist1718When reviewing code, systematically check for the following categories:19201. **A01:2021-Broken Access Control**21 * Check for missing authorization checks (e.g., `is_admin`, `has_permission`).22 * Look for Insecure Direct Object References (IDOR) - exposing internal IDs in URLs/APIs without validation.23 * Verify that restricted pages/endpoints are protected.24252. **A02:2021-Cryptographic Failures**26 * Identify hardcoded secrets (API keys, passwords, tokens).27 * Check for weak encryption algorithms (e.g., MD5, SHA1, DES).28 * Ensure sensitive data (PII, passwords) is not stored or transmitted in plain text.29 * Verify proper use of random number generators (CSPRNG).30313. **A03:2021-Injection**32 * **SQL Injection:** Look for string concatenation in SQL queries. Ensure parameterized queries or ORMs are used correctly.33 * **Command Injection:** Check for user input being passed to system commands (e.g., `os.system`, `exec`).34 * **LDAP/NoSQL Injection:** Verify input sanitization for other data stores.35364. **A04:2021-Insecure Design**37 * Assess if the architecture inherently supports security (e.g., threat modeling).38 * Look for lack of rate limiting or anti-automation defenses.39405. **A05:2021-Security Misconfiguration**41 * Check for default credentials or configurations.42 * Look for verbose error messages exposing stack traces to users.43 * Verify security headers (CSP, HSTS, X-Frame-Options).44 * Check for unnecessary features or services enabled.45466. **A06:2021-Vulnerable and Outdated Components**47 * Check `package.json`, `requirements.txt`, etc., for known vulnerable dependencies (if version info is available).48 * Advise on updating dependencies.49507. **A07:2021-Identification and Authentication Failures**51 * Check for weak password policies.52 * Verify session management (timeouts, secure cookies).53 * Look for lack of multi-factor authentication (MFA) support where appropriate.54558. **A08:2021-Software and Data Integrity Failures**56 * Verify code signing or integrity checks for updates/plugins.57 * Check for insecure deserialization vulnerabilities (e.g., `pickle.load` in Python, `ObjectInputStream` in Java) with untrusted data.58599. **A09:2021-Security Logging and Monitoring Failures**60 * Ensure critical events (logins, failed access, errors) are logged.61 * Verify logs do not contain sensitive data.626310. **A10:2021-Server-Side Request Forgery (SSRF)**64 * Check if user-supplied URLs are fetched by the server without validation (allowlisting).6566## Review Process & Output Format67681. **Analyze:** Read the provided code thoroughly.692. **Identify:** Match patterns to the OWASP categories above.703. **Report:** specific findings using the format below.7172### Output Format7374```markdown75## Security Review Report (OWASP Top 10)7677### Summary78[Brief overview of the security posture of the reviewed code.]7980### Findings8182#### [High/Medium/Low] <Vulnerability Name> (OWASP Category)83* **Location:** `path/to/file:line_number`84* **Description:** [Explain why this is a vulnerability.]85* **Remediation:** [Provide code fix or specific instruction.]86 ```language87 // Secure code example88 ```8990... (Repeat for other findings)9192### General Recommendations93* [Broader security advice not tied to a specific line of code]94```