// Run comprehensive security vulnerability scans when reviewing code. Automatically uses basic mode (fast, high/medium severity only) for first reviews, advanced mode (comprehensive, all severities) for iterations. Detects SQL injection, XSS, hardcoded secrets, insecure dependencies. Use before approving any code changes or pull requests.
| name | security-scan |
| description | Run comprehensive security vulnerability scans when reviewing code. Automatically uses basic mode (fast, high/medium severity only) for first reviews, advanced mode (comprehensive, all severities) for iterations. Detects SQL injection, XSS, hardcoded secrets, insecure dependencies. Use before approving any code changes or pull requests. |
| version | 1.0.0 |
| allowed-tools | ["Bash","Read"] |
You are the security-scan skill. When invoked, you run appropriate security scanners based on project language and provide structured security reports.
Invoke this skill when:
Do NOT invoke when:
When invoked:
Use the Bash tool to run the pre-built security scanning script.
On Unix/macOS:
bash .claude/skills/security-scan/scripts/scan.sh
On Windows (PowerShell):
pwsh .claude/skills/security-scan/scripts/scan.ps1
Cross-platform detection: Check if running on Windows (
$env:OScontains "Windows" orunamedoesn't exist) and run the appropriate script.
The script automatically determines scan mode:
Mode selection is controlled by SECURITY_SCAN_MODE environment variable (set by Tech Lead based on revision count).
The script will:
bazinga/artifacts/{SESSION_ID}/skills/security_scan.jsonUse the Read tool to read:
bazinga/artifacts/{SESSION_ID}/skills/security_scan.json
Extract key information:
scan_mode - Basic or advancedstatus - success/partial/errorcritical_issues, high_issues, medium_issues - Issue countsissues - Array of security findings with file/line/recommendationReturn a concise summary to the calling agent:
Security Scan Report ({mode} mode):
- Tool: {tool_name}
- Critical issues: {count}
- High issues: {count}
- Medium issues: {count}
{If issues found:}
Top issues:
1. {severity}: {issue title} ({file}:{line})
2. {severity}: {issue title} ({file}:{line})
3. {severity}: {issue title} ({file}:{line})
Details saved to: bazinga/artifacts/{SESSION_ID}/skills/security_scan.json
Scenario: First Review (Basic Mode)
Input: Tech Lead reviewing auth changes before deployment
Expected output:
Security Scan Report (basic mode):
- Tool: bandit
- Critical issues: 0
- High issues: 2
- Medium issues: 5
Top issues:
1. HIGH: SQL injection risk (auth.py:45)
2. HIGH: Hardcoded secret detected (config.py:12)
3. MEDIUM: Weak random number generation (token.py:89)
Details saved to: bazinga/artifacts/{SESSION_ID}/skills/security_scan.json
Scenario: Persistent Issues (Advanced Mode)
Input: Tech Lead reviewing after 2nd revision
Expected output:
Security Scan Report (advanced mode):
- Tool: bandit + semgrep
- Critical issues: 1
- High issues: 3
- Medium issues: 8
- Low issues: 12
Top issues:
1. CRITICAL: Remote code execution vulnerability (upload.py:156)
2. HIGH: Authentication bypass possible (middleware.py:78)
3. HIGH: XSS vulnerability in user input (forms.py:45)
Details saved to: bazinga/artifacts/{SESSION_ID}/skills/security_scan.json
If security tool not installed:
If scan fails:
status field in report (will be "error" or "partial")If no issues found:
status field before interpreting results