Context
- Repository: !
git rev-parse --show-toplevel 2>/dev/null || pwd
- Languages detected: !
find . -type f \( -name "*.py" -o -name "*.ts" -o -name "*.js" -o -name "*.go" -o -name "*.rb" -o -name "*.java" \) | sed 's/.*\.//' | sort | uniq -c | sort -rn | head -10
- Target: $ARGUMENTS
Task
Perform a security audit of the codebase (or the path specified in $ARGUMENTS) covering the OWASP Top 10:
A01 - Broken Access Control: Look for missing authorization checks, IDOR patterns, direct object references, insecure direct database access without ownership checks.
A02 - Cryptographic Failures: Find hardcoded secrets, API keys, passwords in source code. Check for use of weak algorithms (MD5, SHA1 for passwords, ECB mode). Look for unencrypted sensitive data in logs or responses.
A03 - Injection: Search for SQL queries built with string concatenation, unsanitized shell commands, template injection, LDAP injection, and XSS sinks.
A04 - Insecure Design: Identify missing rate limiting on auth endpoints, no CSRF protection on state-changing forms, missing input length limits.
A05 - Security Misconfiguration: Check for debug mode enabled, verbose error messages exposing internals, permissive CORS headers, default credentials in config files.
A06 - Vulnerable Components: Note any obviously outdated dependency versions or known-vulnerable packages in package.json, requirements.txt, go.mod, or Gemfile.
A07 - Authentication Failures: Look for weak session management, missing account lockout, insecure password reset flows, JWT with weak or no signature verification.
A08 - Software Integrity Failures: Check for use of untrusted CDN resources without integrity hashes, insecure deserialization of user-supplied data.
A09 - Logging Failures: Verify that authentication events are logged, that logs do not contain passwords or tokens, and that errors are logged without exposing stack traces to users.
A10 - SSRF: Find URL parameters or user-controlled values passed to HTTP clients, file readers, or DNS lookups without validation.
For each finding, read the surrounding code to confirm it is a real issue, not a false positive.
Output Format
Executive Summary
Total findings by severity. One-paragraph risk assessment.
Findings
For each vulnerability:
- ID: VULN-001, VULN-002, ...
- Category: OWASP category (e.g., A03 - Injection)
- Severity: Critical / High / Medium / Low / Informational
- File:
path/to/file.py:42
- Description: what the vulnerability is
- Evidence: the specific code snippet or pattern found
- Remediation: concrete steps to fix it
No Issues Found
List categories where no issues were detected (to show coverage).
Out of Scope
Note any areas not checked (e.g., third-party libraries, infrastructure config not present in the repo).
1---
2name: security-scan
3description: >
4 Scan the codebase for security vulnerabilities based on the OWASP Top 10.
5 Use when the user asks to audit security, find vulnerabilities, check for
6 security issues, or says "security scan", "audit this", "find security bugs".
7context: fork
8agent: Explore
9allowed-tools: Read, Grep, Glob, Bash(find *), Bash(git *)
10metadata:
11 source: https://skillmd.com/skills/aibot88/security-scan
12---
13
14## Context
15
16- Repository: !`git rev-parse --show-toplevel 2>/dev/null || pwd`
17- Languages detected: !`find . -type f \( -name "*.py" -o -name "*.ts" -o -name "*.js" -o -name "*.go" -o -name "*.rb" -o -name "*.java" \) | sed 's/.*\.//' | sort | uniq -c | sort -rn | head -10`
18- Target: $ARGUMENTS
19
20## Task
21
22Perform a security audit of the codebase (or the path specified in $ARGUMENTS) covering the OWASP Top 10:
23
241. **A01 - Broken Access Control**: Look for missing authorization checks, IDOR patterns, direct object references, insecure direct database access without ownership checks.
25
262. **A02 - Cryptographic Failures**: Find hardcoded secrets, API keys, passwords in source code. Check for use of weak algorithms (MD5, SHA1 for passwords, ECB mode). Look for unencrypted sensitive data in logs or responses.
27
283. **A03 - Injection**: Search for SQL queries built with string concatenation, unsanitized shell commands, template injection, LDAP injection, and XSS sinks.
29
304. **A04 - Insecure Design**: Identify missing rate limiting on auth endpoints, no CSRF protection on state-changing forms, missing input length limits.
31
325. **A05 - Security Misconfiguration**: Check for debug mode enabled, verbose error messages exposing internals, permissive CORS headers, default credentials in config files.
33
346. **A06 - Vulnerable Components**: Note any obviously outdated dependency versions or known-vulnerable packages in `package.json`, `requirements.txt`, `go.mod`, or `Gemfile`.
35
367. **A07 - Authentication Failures**: Look for weak session management, missing account lockout, insecure password reset flows, JWT with weak or no signature verification.
37
388. **A08 - Software Integrity Failures**: Check for use of untrusted CDN resources without integrity hashes, insecure deserialization of user-supplied data.
39
409. **A09 - Logging Failures**: Verify that authentication events are logged, that logs do not contain passwords or tokens, and that errors are logged without exposing stack traces to users.
41
4210. **A10 - SSRF**: Find URL parameters or user-controlled values passed to HTTP clients, file readers, or DNS lookups without validation.
43
44For each finding, read the surrounding code to confirm it is a real issue, not a false positive.
45
46## Output Format
47
48### Executive Summary
49Total findings by severity. One-paragraph risk assessment.
50
51### Findings
52
53For each vulnerability:
54- **ID**: VULN-001, VULN-002, ...
55- **Category**: OWASP category (e.g., A03 - Injection)
56- **Severity**: Critical / High / Medium / Low / Informational
57- **File**: `path/to/file.py:42`
58- **Description**: what the vulnerability is
59- **Evidence**: the specific code snippet or pattern found
60- **Remediation**: concrete steps to fix it
61
62### No Issues Found
63List categories where no issues were detected (to show coverage).
64
65### Out of Scope
66Note any areas not checked (e.g., third-party libraries, infrastructure config not present in the repo).