Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Perform standalone security audits covering OWASP Top 10, dependency scanning, secret detection, input validation, and authentication review. Use when: the user asks for a security review, vulnerability assessment, audit, or wants to check for security issues in code or dependencies. Do NOT use when: the user wants a general code review (use pr-review), is asking about deploying to production, or wants penetration testing guidance.
| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-11 | ✗→✓ | ▲ Improved | 107% | 0% |
| case-12 | ✗→✓ | ▲ Improved | 118% | 0% |
| case-19 | ✗→✓ | ▲ Improved | 130% | 0% |
| case-04 | ✓→✓ | = Same ✓ | 986% | 0% |
| case-06 | ✓→✓ | = Same ✓ | 544% | 0% |
Conduct systematic security reviews of codebases to identify vulnerabilities, misconfigurations, and compliance gaps.
Ensure the following tools are available:
bash# Check for security tools (install if missing) command -v gitleaks >/dev/null 2>&1 || echo "Install gitleaks: brew install gitleaks" command -v trivy >/dev/null 2>&1 || echo "Install trivy: brew install trivy" command -v semgrep >/dev/null 2>&1 || echo "Install semgrep: brew install semgrep"
Optional but recommended:
npm audit / yarn audit (for Node.js projects)pip-audit (for Python projects)bundler-audit (for Ruby projects)pr-review)Gather project context:
bash# Identify project type and stack cat package.json 2>/dev/null | head -20 cat requirements.txt 2>/dev/null | head -20 cat go.mod 2>/dev/null | head -20 # Find configuration files find . -maxdepth 3 -name "*.env*" -o -name "config.*" -o -name ".env*" | grep -v node_modules | head -20 # Check for security-related files ls -la .github/dependabot.yml .snyk 2>/dev/null ls -la SECURITY.md 2>/dev/null
Review each category systematically:
bash# Find authentication/authorization middleware grep -r "auth\|permission\|role\|admin\|middleware" --include="*.ts" --include="*.js" --include="*.py" | grep -v node_modules | head -20 # Check for unprotected routes grep -r "router\.\(get\|post\|put\|delete\)" --include="*.ts" --include="*.js" | grep -v "auth\|protect\|secure" | head -20 # Look for IDOR vulnerabilities grep -r "req\.params\|req\.query\|params\[" --include="*.ts" --include="*.js" | head -15
Checklist:
* in production)bash# Find hardcoded secrets or weak crypto grep -rn "secret\|password\|api.key\|token" --include="*.ts" --include="*.js" --include="*.py" | grep -v "node_modules\|test\|spec" | head -20 # Check for deprecated algorithms grep -rn "md5\|sha1\|des\|rc4" --include="*.ts" --include="*.js" --include="*.py" | grep -v node_modules | head -10 # Find encryption usage grep -rn "encrypt\|decrypt\|hash\|cipher" --include="*.ts" --include="*.js" --include="*.py" | grep -v node_modules | head -15
Checklist:
bash# Find SQL queries (look for string concatenation) grep -rn "SELECT\|INSERT\|UPDATE\|DELETE" --include="*.ts" --include="*.js" --include="*.py" | grep -E "\+|`|\"|\$" | head -20 # Find command execution grep -rn "exec\|spawn\|system\|eval\|Function(" --include="*.ts" --include="*.js" --include="*.py" | grep -v node_modules | head -15 # Find template literal usage in queries grep -rn "\`\s*SELECT\|\`\s*INSERT" --include="*.ts" --include="*.js" | head -10
Checklist:
eval() or dynamic code executionbash# Look for business logic patterns grep -rn "TODO.*security\|FIXME.*security\|HACK\|XXX" --include="*.ts" --include="*.js" --include="*.py" | head -10 # Find rate limiting configuration grep -rn "rate.limit\|throttle\|rateLimit" --include="*.ts" --include="*.js" | head -10 # Check for security headers grep -rn "helmet\|csp\|Content-Security-Policy\|X-Frame" --include="*.ts" --include="*.js" | head -10
Checklist:
bash# Find configuration files find . -maxdepth 3 -name "*.config.*" -o -name "docker-compose*" -o -name "Dockerfile" | grep -v node_modules | head -15 # Check for default credentials grep -rn "admin\|password\|default" --include="*.yml" --include="*.yaml" --include="*.json" | grep -v node_modules | head -15 # Find debug mode flags grep -rn "debug.*true\|DEBUG\|verbose" --include="*.ts" --include="*.js" --include="*.py" | grep -v node_modules | head -10
Checklist:
bash# Check for outdated dependencies npm audit 2>/dev/null || echo "Not a Node.js project" yarn audit 2>/dev/null || echo "Not a Yarn project" pip-audit 2>/dev/null || echo "Not a Python project" # Look for known vulnerable packages grep -rn "lodash.*4\.17\.1[0-5]\|express.*4\.17\.\|minimist.*1\.2" package.json 2>/dev/null | head -10
Checklist:
bash# Find authentication logic grep -rn "login\|authenticate\|password\|bcrypt\|jwt" --include="*.ts" --include="*.js" --include="*.py" | grep -v node_modules | head -20 # Check for session management grep -rn "session\|cookie\|jwt\|token" --include="*.ts" --include="*.js" | grep -v node_modules | head -15 # Look for brute force protection grep -rn "attempt\|lockout\|brute\|rate.limit" --include="*.ts" --include="*.js" | head -10
Checklist:
bash# Find dependency lock files ls -la package-lock.json yarn.lock poetry.lock go.sum 2>/dev/null # Check for CI/CD integrity ls -la .github/workflows/ 2>/dev/null | head -10 # Find auto-update mechanisms grep -rn "auto.update\|self.update" --include="*.ts" --include="*.js" --include="*.py" | head -10
Checklist:
bash# Find logging patterns grep -rn "console.log\|logger\.\|log\.\|winston\|pino" --include="*.ts" --include="*.js" --include="*.py" | grep -v node_modules | head -20 # Check for security event logging grep -rn "audit\|security\|unauthorized\|forbidden" --include="*.ts" --include="*.js" | grep -i "log" | head -15
Checklist:
bash# Find HTTP client usage grep -rn "fetch\|axios\|request\|http\." --include="*.ts" --include="*.js" --include="*.py" | grep -v node_modules | head -20 # Check for URL validation grep -rn "url\|href\|redirect\|proxy" --include="*.ts" --include="*.js" | grep -v node_modules | head -15
Checklist:
bash# Using gitleaks (recommended) gitleaks detect --source . --verbose # Or using trufflehog trufflehog filesystem --directory . # Manual pattern search grep -rn --include="*.ts" --include="*.js" --include="*.py" --include="*.env*" \ -E "(AKIA|AGPA|AIDA|AROA|AIPA|ANPA|ANVA|ASIA)[A-Z0-9]{16}" . | head -10
Look for these patterns in source code:
# AWS Keys
AKIA[0-9A-Z]{16}
# GitHub/GitLab Tokens
ghp_[A-Za-z0-9]{36}
glpat-[A-Za-z0-9\-]{20,}
# Slack Tokens
xox[bpsar]-[A-Za-z0-9\-]+
# Private Keys
-----BEGIN (RSA |EC )?PRIVATE KEY-----
# Generic patterns
password\s*[:=]\s*['"][^'"]+['"]
secret\s*[:=]\s*['"][^'"]+['"]
api[_-]?key\s*[:=]\s*['"][^'"]+['"]bash# Check .gitignore for sensitive files cat .gitignore | grep -E "\.env|secret|credential|key" # Verify secrets are in environment variables, not code grep -rn "process\.env\|os\.environ\|os\.getenv" --include="*.ts" --include="*.js" --include="*.py" | head -15
bash# Find validation libraries grep -rn "zod\|joi\|yup\|ajv\|class-validator\|validator" --include="*.ts" --include="*.js" | head -10 # Find manual validation grep -rn "\.trim\(\)\|\.length\|\.match\|\.test\|regex" --include="*.ts" --include="*.js" | grep -v node_modules | head -15 # Find sanitization grep -rn "sanitize\|escape\|encode\|xss\|DOMPurify" --include="*.ts" --include="*.js" | head -10
bash# Find auth-related code find . -type f \( -name "*auth*" -o -name "*login*" -o -name "*session*" \) | grep -v node_modules | head -15 # Check password handling grep -rn "bcrypt\|argon2\|scrypt\|hash" --include="*.ts" --include="*.js" --include="*.py" | head -10 # Find JWT usage grep -rn "jwt\|jsonwebtoken\|jose" --include="*.ts" --include="*.js" --include="*.py" | head -15
Create a structured report:
markdown# Security Audit Report **Date:** YYYY-MM-DD **Scope:** [application name and version] **Auditor:** [AI Agent] ## Executive Summary - Critical: X findings - High: X findings - Medium: X findings - Low: X findings - Informational: X findings ## Findings ### [CRITICAL] Finding Title **Category:** OWASP A0X **File(s):** path/to/file.ts:line **Description:** ... **Impact:** ... **Remediation:** ... **Reference:** [CWE-XXX] [link] ## OWASP Top 10 Compliance | Category | Status | Notes | |----------|--------|-------| | A01: Broken Access Control | Pass/Fail | ... | | A02: Cryptographic Failures | Pass/Fail | ... | | ... | ... | ... | ## Recommendations 1. Priority-ordered remediation steps 2. Quick wins vs long-term fixes 3. Tools/processes to prevent recurrence
markdown# Security Audit Report **Date:** 2024-01-15 **Scope:** api.example.com v2.1.0 ## Executive Summary - Critical: 1 findings - High: 2 findings - Medium: 3 findings - Low: 2 findings ## Findings ### [CRITICAL] SQL Injection in User Search **Category:** OWASP A03:2021 - Injection **File:** src/api/users.ts:45 **Description:** User search endpoint concatenates input directly into SQL query. **Impact:** Attacker can extract entire database, modify data, or execute commands. **Remediation:** Use parameterized queries or ORM.
// Before (vulnerable) const query = SELECT * FROM users WHERE name = '${name}';
// After (secure) const user = await db.user.findUnique({ where: { name } });
### [HIGH] Hardcoded JWT Secret
**Category:** OWASP A02:2021 - Cryptographic Failures
**File:** src/config/auth.ts:12
**Description:** JWT secret hardcoded in source code.
**Impact:** Token forgery if source code is compromised.
**Remediation:** Move to environment variable, rotate immediately.For older codebases without modern tooling:
When dependencies have vulnerabilities:
For distributed systems:
bash# Install missing tools brew install gitleaks trivy semgrep # Or use Docker docker run --rm -v $(pwd):/src ghcr.io/gitleaks/gitleaks:latest detect -s /src
If audit produces overwhelming results:
Common false positives to ignore:
Other measured skills in the registry, with their headline benchmark lift.