Overview
Runs and interprets automated vulnerability scans across code (SAST), dependencies (SCA), containers/images, and infrastructure. Covers tool selection (Snyk, Trivy, Bandit, npm/pip audit, OWASP Dependency-Check, Semgrep), command reference, output interpretation, CVSS severity, remediation priority, CI integration, and a pre-deploy security gate workflow.
When to Use This Skill
- Before merging or deploying code that touches dependencies or infrastructure.
- After adding or updating third-party packages.
- As part of regular security hygiene or compliance prep.
- The user mentions "scan for vulnerabilities", "security audit", "CVE", or "Snyk/Trivy".
Prerequisites
- The codebase or container image to scan.
- Tools installed or available via Docker (Trivy, etc.).
- (Recommended) CI pipeline to run scans on every PR and on main.
Steps
Choose the right tool(s) for the target:
- Dependencies (SCA): Snyk,
npm audit, pip-audit, cargo audit, OWASP Dependency-Check.
- Code (SAST): Semgrep, Bandit (Python),
gosec (Go), SonarQube, CodeQL.
- Containers / IaC: Trivy (images + Terraform/K8s), Checkov, Terrascan.
- Secrets: gitleaks, truffleHog (see
secret-detector skill).
Run the scan (examples):
trivy image myapp:latest
snyk test (after snyk auth)
bandit -r src/
npm audit --audit-level=moderate
Interpret results:
- CVSS 3.x / 4.0 scoring (Critical 9.0-10, High 7.0-8.9, etc.).
- Reachability / exploitability (Snyk and some tools show this).
- False positive filtering (common in SAST).
Prioritize remediation:
- Critical/High with known exploits in your environment → immediate.
- Medium → within sprint or before next release.
- Low → backlog or accept with justification.
CI integration:
- Fail the build on Critical/High (configurable threshold).
- Upload reports as artifacts.
- Comment on PRs with findings (or use Snyk PR checks).
Output:
- Exact commands for the languages/tools in the project.
- Sample output + how to read it.
- Recommended CI step (GitHub Action example).
- Remediation workflow (how to fix a vulnerable dependency safely).
- Policy: "No Critical or High in main".
Examples
Full commands + GitHub Actions job for a typical Node + Python + Docker project using Trivy + Snyk + Bandit, with severity thresholds and artifact upload, plus a sample remediation PR description are included.
Edge Cases & Error Handling
- False positives: Document how to suppress with justification (
.snyk policy, # nosec, etc.).
- Transitive dependencies: Tools usually surface them; focus on direct where possible.
- No internet in CI: Use local vulnerability DBs or cached scans where possible.
Verification
- Run the scanner(s) on the current codebase — results are produced.
- CI job fails (or warns) on injected high-severity issues.
- A known vulnerable dependency is detected and a fix PR is created.
- Reports are attached to the build for audit.
- Success: Critical and High vulnerabilities are caught before they reach production, and the team has a clear process to remediate.
References
1---2name: vulnerability-scanner3description: Runs automated vulnerability scans on codebases, dependencies, and containers. Use when auditing security before deployment or after adding new dependencies.4license: Apache-2.05compatibility: Claude Code, Codex, Gemini CLI6metadata:7 author: ai-skills8 version: "1.0"9 category: security10 tags: security, vulnerability, snyk, trivy, bandit, npm-audit, cve11---1213## Overview1415Runs and interprets automated vulnerability scans across code (SAST), dependencies (SCA), containers/images, and infrastructure. Covers tool selection (Snyk, Trivy, Bandit, npm/pip audit, OWASP Dependency-Check, Semgrep), command reference, output interpretation, CVSS severity, remediation priority, CI integration, and a pre-deploy security gate workflow.1617## When to Use This Skill1819- Before merging or deploying code that touches dependencies or infrastructure.20- After adding or updating third-party packages.21- As part of regular security hygiene or compliance prep.22- The user mentions "scan for vulnerabilities", "security audit", "CVE", or "Snyk/Trivy".2324## Prerequisites2526- The codebase or container image to scan.27- Tools installed or available via Docker (Trivy, etc.).28- (Recommended) CI pipeline to run scans on every PR and on main.2930## Steps31321. **Choose the right tool(s) for the target**:33 - Dependencies (SCA): Snyk, `npm audit`, `pip-audit`, `cargo audit`, OWASP Dependency-Check.34 - Code (SAST): Semgrep, Bandit (Python), `gosec` (Go), SonarQube, CodeQL.35 - Containers / IaC: Trivy (images + Terraform/K8s), Checkov, Terrascan.36 - Secrets: gitleaks, truffleHog (see `secret-detector` skill).37382. **Run the scan** (examples):39 - `trivy image myapp:latest`40 - `snyk test` (after `snyk auth`)41 - `bandit -r src/`42 - `npm audit --audit-level=moderate`43443. **Interpret results**:45 - CVSS 3.x / 4.0 scoring (Critical 9.0-10, High 7.0-8.9, etc.).46 - Reachability / exploitability (Snyk and some tools show this).47 - False positive filtering (common in SAST).48494. **Prioritize remediation**:50 - Critical/High with known exploits in your environment → immediate.51 - Medium → within sprint or before next release.52 - Low → backlog or accept with justification.53545. **CI integration**:55 - Fail the build on Critical/High (configurable threshold).56 - Upload reports as artifacts.57 - Comment on PRs with findings (or use Snyk PR checks).58596. **Output**:60 - Exact commands for the languages/tools in the project.61 - Sample output + how to read it.62 - Recommended CI step (GitHub Action example).63 - Remediation workflow (how to fix a vulnerable dependency safely).64 - Policy: "No Critical or High in main".6566## Examples6768Full commands + GitHub Actions job for a typical Node + Python + Docker project using Trivy + Snyk + Bandit, with severity thresholds and artifact upload, plus a sample remediation PR description are included.6970## Edge Cases & Error Handling7172- **False positives**: Document how to suppress with justification (`.snyk` policy, `# nosec`, etc.).73- **Transitive dependencies**: Tools usually surface them; focus on direct where possible.74- **No internet in CI**: Use local vulnerability DBs or cached scans where possible.7576## Verification77781. Run the scanner(s) on the current codebase — results are produced.792. CI job fails (or warns) on injected high-severity issues.803. A known vulnerable dependency is detected and a fix PR is created.814. Reports are attached to the build for audit.825. Success: Critical and High vulnerabilities are caught before they reach production, and the team has a clear process to remediate.8384## References8586- [Snyk](https://snyk.io/)87- [Trivy](https://trivy.dev/)88- [Bandit](https://bandit.readthedocs.io/)89- [Semgrep](https://semgrep.dev/)90- [OWASP Dependency-Check](https://owasp.org/www-project-dependency-check/)91- [CVSS](https://www.first.org/cvss/)