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.05---67## Overview89Runs 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.1011## When to Use This Skill1213- Before merging or deploying code that touches dependencies or infrastructure.14- After adding or updating third-party packages.15- As part of regular security hygiene or compliance prep.16- The user mentions "scan for vulnerabilities", "security audit", "CVE", or "Snyk/Trivy".1718## Prerequisites1920- The codebase or container image to scan.21- Tools installed or available via Docker (Trivy, etc.).22- (Recommended) CI pipeline to run scans on every PR and on main.2324## Steps25261. **Choose the right tool(s) for the target**:27 - Dependencies (SCA): Snyk, `npm audit`, `pip-audit`, `cargo audit`, OWASP Dependency-Check.28 - Code (SAST): Semgrep, Bandit (Python), `gosec` (Go), SonarQube, CodeQL.29 - Containers / IaC: Trivy (images + Terraform/K8s), Checkov, Terrascan.30 - Secrets: gitleaks, truffleHog (see `secret-detector` skill).31322. **Run the scan** (examples):33 - `trivy image myapp:latest`34 - `snyk test` (after `snyk auth`)35 - `bandit -r src/`36 - `npm audit --audit-level=moderate`37383. **Interpret results**:39 - CVSS 3.x / 4.0 scoring (Critical 9.0-10, High 7.0-8.9, etc.).40 - Reachability / exploitability (Snyk and some tools show this).41 - False positive filtering (common in SAST).42434. **Prioritize remediation**:44 - Critical/High with known exploits in your environment → immediate.45 - Medium → within sprint or before next release.46 - Low → backlog or accept with justification.47485. **CI integration**:49 - Fail the build on Critical/High (configurable threshold).50 - Upload reports as artifacts.51 - Comment on PRs with findings (or use Snyk PR checks).52536. **Output**:54 - Exact commands for the languages/tools in the project.55 - Sample output + how to read it.56 - Recommended CI step (GitHub Action example).57 - Remediation workflow (how to fix a vulnerable dependency safely).58 - Policy: "No Critical or High in main".5960## Examples6162Full 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.6364## Edge Cases & Error Handling6566- **False positives**: Document how to suppress with justification (`.snyk` policy, `# nosec`, etc.).67- **Transitive dependencies**: Tools usually surface them; focus on direct where possible.68- **No internet in CI**: Use local vulnerability DBs or cached scans where possible.6970## Verification71721. Run the scanner(s) on the current codebase — results are produced.732. CI job fails (or warns) on injected high-severity issues.743. A known vulnerable dependency is detected and a fix PR is created.754. Reports are attached to the build for audit.765. Success: Critical and High vulnerabilities are caught before they reach production, and the team has a clear process to remediate.7778## References7980- [Snyk](https://snyk.io/)81- [Trivy](https://trivy.dev/)82- [Bandit](https://bandit.readthedocs.io/)83- [Semgrep](https://semgrep.dev/)84- [OWASP Dependency-Check](https://owasp.org/www-project-dependency-check/)85- [CVSS](https://www.first.org/cvss/)