.claude/skills/security-scan/SKILL.md
Run dependency audits, secrets detection, and static analysis to find CVEs, leaked credentials, and insecure code patterns. Use at phase checkpoints or before releases.
npx skillsauth add benjaminshoemaker/ai_coding_project_base security-scanInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Scan the codebase for security issues across three categories:
/phase-checkpoint/security-scan/verify-task for security-critical tasksCopy this checklist and track progress:
Security Scan Progress:
- [ ] Step 1: Discover security tooling from project docs
- [ ] Step 2: Run dependency audit
- [ ] Step 3: Run secrets detection
- [ ] Step 4: Run static analysis
- [ ] Step 5: Aggregate and deduplicate findings
- [ ] Step 6: Present issues with severity
- [ ] Step 7: Offer to apply fixes
Read project documentation and task runners to find the correct commands:
README.mdCONTRIBUTING.mdSECURITY.mdMakefileTaskfile.ymljustfilescripts/Extract any documented commands for:
If nothing is documented, ask the human to provide the correct commands.
Run a pattern-based secrets scan (stack-agnostic) unless the project documents its own secrets tool. If a project-specific tool exists, use it instead.
| Pattern | Regex | Severity |
|---------|-------|----------|
| AWS Access Key | AKIA[0-9A-Z]{16} | CRITICAL |
| AWS Secret Key | (?i)aws_secret_access_key\s*=\s*['"][^'"]+['"] | CRITICAL |
| GitHub Token | ghp_[a-zA-Z0-9]{36} | CRITICAL |
| GitHub Token (old) | github_pat_[a-zA-Z0-9]{22}_[a-zA-Z0-9]{59} | CRITICAL |
| Generic API Key | (?i)(api[_-]?key|apikey)\s*[:=]\s*['"][a-zA-Z0-9]{20,}['"] | HIGH |
| Generic Secret | (?i)(secret|password|passwd|pwd)\s*[:=]\s*['"][^'"]{8,}['"] | HIGH |
| Private Key | -----BEGIN (RSA|DSA|EC|OPENSSH) PRIVATE KEY----- | CRITICAL |
| JWT Token | eyJ[a-zA-Z0-9_-]*\.eyJ[a-zA-Z0-9_-]*\.[a-zA-Z0-9_-]* | HIGH |
| Slack Token | xox[baprs]-[0-9a-zA-Z]{10,48} | HIGH |
| Stripe Key | sk_live_[0-9a-zA-Z]{24} | CRITICAL |
node_modules/.git/vendor/venv/, .venv/, env/dist/, build/*.min.js, *.bundle.jsCollect all findings into a unified format:
SECURITY SCAN RESULTS
=====================
Scanned: {timestamp}
Checks Run: Dependencies | Secrets | Static Analysis
CRITICAL (N)
------------
[issue details]
HIGH (N)
--------
[issue details]
MEDIUM (N)
----------
[issue details]
LOW (N)
-------
[issue details]
Summary: {N} critical, {N} high, {N} medium, {N} low
For CRITICAL and HIGH issues, present interactively with resolution options. If a fix command is documented, offer it as the primary option.
Propose fixes to the user. Do not apply fixes automatically — present each fix for user approval before making changes.
For each fix, show a preview:
Apply fixes based on user choices:
When invoked by any skill (/phase-checkpoint, /verify-task, or others), return:
Security Scan: PASSED | FAILED | PASSED WITH NOTES
Issues: X critical, Y high, Z medium
Fixed: N issues
Skipped: M checks (documented)
Blocking: Yes/No
This format is the same regardless of the caller. The calling skill decides
how to interpret it (e.g., /phase-checkpoint may block on FAILED;
/verify-task may log it as a note).
Show the structured result above followed by the full report with all findings and interactive fix options (Step 6 and Step 7).
| Severity | Meaning | Action | |----------|---------|--------| | CRITICAL | Exploitable vulnerability, exposed secrets | BLOCKS checkpoint | | HIGH | Significant security risk | BLOCKS checkpoint | | MEDIUM | Should be addressed | Note, doesn't block | | LOW | Minor issue or informational | Note only |
If required tools are missing, instruct the user to install them based on the project's documentation or security policy.
If no project documentation is found:
If a security tool returns a non-zero exit code:
npm audit, pip-audit, etc.), treat as SUCCESS_WITH_FINDINGSIf tool is not installed:
If secrets scan finds too many results (>100):
If project has no package manager (dependency scan N/A):
If scan is interrupted:
/security-scan # Full scan
/security-scan --deps # Dependencies only
/security-scan --secrets # Secrets detection only
/security-scan --code # Static analysis only
/security-scan --fix # Auto-fix where possible
testing
Audit project alignment with VISION.md, identify SDLC gaps, and generate feature proposals. Use when reviewing strategic direction or planning new features.
development
Run code-verification on a specific task. Use to verify a single task's acceptance criteria after implementation.
testing
Resolve Vercel preview deployment URL for the current git branch. Invoked by browser-verification when deployment.enabled is true, or directly to check deployment status. Use to check deployment status or when browser verification needs a URL.
tools
Discover and sync all toolkit-using projects with the latest skills. Use when skills are modified, after the post-commit hook reminds you, or to batch-sync multiple projects.