/cve-scan - Dependency CVE Scanner
$ARGUMENTS
Detect project ecosystems and scan dependencies for known vulnerabilities using native audit tools. Zero external dependencies — uses tools already installed in the project environment.
Usage
/cve-scan # Auto-detect all ecosystems, scan all
/cve-scan --ecosystem npm # Force specific ecosystem
/cve-scan --fix # Auto-fix where possible (npm audit fix, etc.)
/cve-scan --json # Machine-readable JSON output
What This Command Does
- Detect package managers by lock/manifest files in the project
- Run the native audit command for each detected ecosystem
- Parse results into a unified severity-based report
- Report CVE IDs, affected packages, installed vs fixed versions, advisory links
- Fix automatically when
--fix is passed (where the tool supports it)
Ecosystem Detection & Commands
| Manifest File |
Lock File |
Ecosystem |
Audit Command |
CVE Database |
package.json |
package-lock.json / yarn.lock / pnpm-lock.yaml |
npm/yarn/pnpm |
npm audit --json / yarn audit --json / pnpm audit --json |
GitHub Advisory DB |
requirements.txt / pyproject.toml / setup.py |
requirements.txt |
pip |
pip-audit --format=json |
OSV / PyPI Advisory |
composer.json |
composer.lock |
composer |
composer audit --format=json |
Packagist / FriendsOfPHP |
Cargo.toml |
Cargo.lock |
cargo |
cargo audit --json |
RustSec Advisory DB |
go.mod |
go.sum |
go |
govulncheck ./... |
Go Vulnerability DB |
Gemfile |
Gemfile.lock |
bundler |
bundle-audit check |
Ruby Advisory DB |
pubspec.yaml |
pubspec.lock |
dart/flutter |
dart pub outdated --json |
pub.dev |
Steps
- Detect ecosystems: Glob for manifest/lock files at project root and common subdirectories
- Check tool availability: Verify audit tool is installed for each detected ecosystem
- Run audit: Execute native audit command, capture JSON output where available
- Parse results: Extract CVE ID, package name, installed version, fixed version, severity, advisory URL
- Unified report: Merge all ecosystems into single report sorted by severity
- Fix mode: If
--fix passed, run npm audit fix, pip-audit --fix, cargo audit fix etc.
- Exit code: Non-zero if any CRITICAL or HIGH vulnerabilities found
Detection Script
Run the bundled detection script to quickly identify ecosystems and tool availability:
python3 ${CLAUDE_SKILL_DIR}/scripts/cve_scan.py
Options:
python3 ${CLAUDE_SKILL_DIR}/scripts/cve_scan.py --json # JSON output
python3 ${CLAUDE_SKILL_DIR}/scripts/cve_scan.py --fix # Auto-fix mode
python3 ${CLAUDE_SKILL_DIR}/scripts/cve_scan.py --ecosystem npm # Specific ecosystem
Output Format
## CVE Scan Report
### Ecosystems Detected
- npm (package-lock.json) — `npm audit` available ✓
- pip (requirements.txt) — `pip-audit` not installed ⚠️
### Summary
| Severity | Count |
|----------|-------|
| CRITICAL | 1 |
| HIGH | 3 |
| MEDIUM | 5 |
| LOW | 2 |
### Findings
#### [CRITICAL] lodash@4.17.20 (npm)
- **CVE**: CVE-2021-23337
- **Title**: Prototype Pollution
- **Fixed in**: 4.17.21
- **Advisory**: https://github.com/advisories/GHSA-35jh-r3h4-6jhm
#### [HIGH] django@3.2.0 (pip)
- **CVE**: CVE-2023-36053
- **Title**: Potential ReDoS in EmailValidator
- **Fixed in**: 3.2.20
- **Advisory**: https://osv.dev/vulnerability/PYSEC-2023-100
### Tool Availability
| Ecosystem | Tool | Status | Install Hint |
|-----------|------|--------|--------------|
| npm | npm audit | ✓ installed | — |
| pip | pip-audit | ✗ missing | `pip install pip-audit` |
| cargo | cargo-audit | ✗ missing | `cargo install cargo-audit` |
Handling Missing Tools
When an audit tool is not installed, the skill:
- Reports it as a warning (not a failure)
- Provides the install command for the missing tool
- Continues scanning other detected ecosystems
Install hints per ecosystem:
| Tool |
Install Command |
pip-audit |
pip install pip-audit |
cargo-audit |
cargo install cargo-audit |
govulncheck |
go install golang.org/x/vuln/cmd/govulncheck@latest |
bundle-audit |
gem install bundler-audit |
composer |
Built-in since Composer 2.4 |
Rules
- Never modify
package-lock.json, Cargo.lock, or other lock files without --fix flag
- Always report tool availability — missing tool is a finding, not a failure
- Parse JSON output when available for structured data; fall back to text parsing
- CRITICAL and HIGH findings should be highlighted prominently
- Include advisory URLs for every CVE when available
- This skill is READ-ONLY by default (no installs, no upgrades) unless
--fix is passed
- Respect
.auditrc, .nsprc, or equivalent ignore files if present
1---
2name: cve-scan
3description: "Scan project dependencies for known CVEs using native audit tools (npm, pip, composer, cargo, go, bundler, dart)"
4user-invocable: true
5effort: medium
6argument-hint: "[--ecosystem npm|pip|composer|cargo|go|ruby|dart] [--fix] [--json]"
7allowed-tools: Read, Grep, Glob, Bash
8metadata:
9 source: https://skillmd.com/skills/aibot88/cve-scan
10---
11
12# /cve-scan - Dependency CVE Scanner
13
14$ARGUMENTS
15
16Detect project ecosystems and scan dependencies for known vulnerabilities using native audit tools. Zero external dependencies — uses tools already installed in the project environment.
17
18## Usage
19
20```
21/cve-scan # Auto-detect all ecosystems, scan all
22/cve-scan --ecosystem npm # Force specific ecosystem
23/cve-scan --fix # Auto-fix where possible (npm audit fix, etc.)
24/cve-scan --json # Machine-readable JSON output
25```
26
27## What This Command Does
28
291. **Detect** package managers by lock/manifest files in the project
302. **Run** the native audit command for each detected ecosystem
313. **Parse** results into a unified severity-based report
324. **Report** CVE IDs, affected packages, installed vs fixed versions, advisory links
335. **Fix** automatically when `--fix` is passed (where the tool supports it)
34
35## Ecosystem Detection & Commands
36
37| Manifest File | Lock File | Ecosystem | Audit Command | CVE Database |
38|---------------|-----------|-----------|---------------|--------------|
39| `package.json` | `package-lock.json` / `yarn.lock` / `pnpm-lock.yaml` | npm/yarn/pnpm | `npm audit --json` / `yarn audit --json` / `pnpm audit --json` | GitHub Advisory DB |
40| `requirements.txt` / `pyproject.toml` / `setup.py` | `requirements.txt` | pip | `pip-audit --format=json` | OSV / PyPI Advisory |
41| `composer.json` | `composer.lock` | composer | `composer audit --format=json` | Packagist / FriendsOfPHP |
42| `Cargo.toml` | `Cargo.lock` | cargo | `cargo audit --json` | RustSec Advisory DB |
43| `go.mod` | `go.sum` | go | `govulncheck ./...` | Go Vulnerability DB |
44| `Gemfile` | `Gemfile.lock` | bundler | `bundle-audit check` | Ruby Advisory DB |
45| `pubspec.yaml` | `pubspec.lock` | dart/flutter | `dart pub outdated --json` | pub.dev |
46
47## Steps
48
491. **Detect ecosystems**: Glob for manifest/lock files at project root and common subdirectories
502. **Check tool availability**: Verify audit tool is installed for each detected ecosystem
513. **Run audit**: Execute native audit command, capture JSON output where available
524. **Parse results**: Extract CVE ID, package name, installed version, fixed version, severity, advisory URL
535. **Unified report**: Merge all ecosystems into single report sorted by severity
546. **Fix mode**: If `--fix` passed, run `npm audit fix`, `pip-audit --fix`, `cargo audit fix` etc.
557. **Exit code**: Non-zero if any CRITICAL or HIGH vulnerabilities found
56
57## Detection Script
58
59Run the bundled detection script to quickly identify ecosystems and tool availability:
60
61```bash
62python3 ${CLAUDE_SKILL_DIR}/scripts/cve_scan.py
63```
64
65Options:
66```bash
67python3 ${CLAUDE_SKILL_DIR}/scripts/cve_scan.py --json # JSON output
68python3 ${CLAUDE_SKILL_DIR}/scripts/cve_scan.py --fix # Auto-fix mode
69python3 ${CLAUDE_SKILL_DIR}/scripts/cve_scan.py --ecosystem npm # Specific ecosystem
70```
71
72## Output Format
73
74```markdown
75## CVE Scan Report
76
77### Ecosystems Detected
78- npm (package-lock.json) — `npm audit` available ✓
79- pip (requirements.txt) — `pip-audit` not installed ⚠️
80
81### Summary
82| Severity | Count |
83|----------|-------|
84| CRITICAL | 1 |
85| HIGH | 3 |
86| MEDIUM | 5 |
87| LOW | 2 |
88
89### Findings
90
91#### [CRITICAL] lodash@4.17.20 (npm)
92- **CVE**: CVE-2021-23337
93- **Title**: Prototype Pollution
94- **Fixed in**: 4.17.21
95- **Advisory**: https://github.com/advisories/GHSA-35jh-r3h4-6jhm
96
97#### [HIGH] django@3.2.0 (pip)
98- **CVE**: CVE-2023-36053
99- **Title**: Potential ReDoS in EmailValidator
100- **Fixed in**: 3.2.20
101- **Advisory**: https://osv.dev/vulnerability/PYSEC-2023-100
102
103### Tool Availability
104| Ecosystem | Tool | Status | Install Hint |
105|-----------|------|--------|--------------|
106| npm | npm audit | ✓ installed | — |
107| pip | pip-audit | ✗ missing | `pip install pip-audit` |
108| cargo | cargo-audit | ✗ missing | `cargo install cargo-audit` |
109```
110
111## Handling Missing Tools
112
113When an audit tool is not installed, the skill:
1141. Reports it as a warning (not a failure)
1152. Provides the install command for the missing tool
1163. Continues scanning other detected ecosystems
117
118Install hints per ecosystem:
119
120| Tool | Install Command |
121|------|----------------|
122| `pip-audit` | `pip install pip-audit` |
123| `cargo-audit` | `cargo install cargo-audit` |
124| `govulncheck` | `go install golang.org/x/vuln/cmd/govulncheck@latest` |
125| `bundle-audit` | `gem install bundler-audit` |
126| `composer` | Built-in since Composer 2.4 |
127
128## Rules
129
130- Never modify `package-lock.json`, `Cargo.lock`, or other lock files without `--fix` flag
131- Always report tool availability — missing tool is a finding, not a failure
132- Parse JSON output when available for structured data; fall back to text parsing
133- CRITICAL and HIGH findings should be highlighted prominently
134- Include advisory URLs for every CVE when available
135- This skill is READ-ONLY by default (no installs, no upgrades) unless `--fix` is passed
136- Respect `.auditrc`, `.nsprc`, or equivalent ignore files if present