Detect and report known vulnerabilities in your project's dependency tree.
Supports npm, pip (Python), Cargo (Rust), and Go out of the box.
No API keys. No config. Just point it at a project.
This skill activates when the user mentions:
permissions:
exec: true # Required to run audit CLIs
read: true # Read lockfiles
write: on-request # SBOM generation writes sbom.cdx.json when user asks
network: true # Tools fetch advisory DBs
Follow this sequence exactly:
Run the detection script to discover lockfiles and available tools:
bash <skill_dir>/scripts/detect.sh <target_directory>
If no target directory is given, use the current working directory (.).
Parse the JSON output. Note which ecosystems have lockfiles and which tools are available.
For each ecosystem detected in Step 1:
```bash
bash
bash
bash
bash
```
> Note: yarn.lock and pnpm-lock.yaml are detected as yarn and pnpm ecosystems respectively. Audit support is npm-only in v0.1.x (package-lock.json). If only a yarn.lock or pnpm-lock.yaml is present, inform the user that dedicated yarn/pnpm audit is not yet supported and suggest running yarn audit or pnpm audit manually.
Each script outputs normalized JSON to stdout.
Pipe or pass all per-ecosystem JSON results to the aggregator:
bash <skill_dir>/scripts/aggregate.sh <npm_result.json> <pip_result.json> ... 1>unified.json 2>report.md
The aggregator outputs unified JSON to stdout and a Markdown report to stderr.
Capture both: 2>report.md for the Markdown, 1>unified.json for the JSON.
Show the user the Markdown report from the aggregator. Highlight:
If zero vulnerabilities found: report "✅ No known vulnerabilities found."
If no lockfiles found: report "No lockfiles found in
When the user is in a Discord channel:
Show Full ReportShow Fix CommandsGenerate SBOMIf the user asks to fix vulnerabilities:
git checkout -b dep-audit-fixesExample interaction:
I found these fix commands:
1. cd /home/user/project && npm audit fix
2. pip install requests>=2.31.0
I recommend creating a branch first:
git checkout -b dep-audit-fixes
Shall I run them? (yes/no)
bash <skill_dir>/scripts/sbom.sh <directory>
Report the file location and component count.
| Situation | Behavior |
|---|---|
| ----------- | ---------- |
| Tool not found | Print which tool is missing + install command. Continue with available tools. |
| Audit tool fails | Capture stderr, report "audit failed for [ecosystem]: [error]". Continue with others. |
| Timeout (>30s per tool) | When timeout/gtimeout is available, report "audit timed out for [ecosystem], skipping". Continue. |
| Invalid target directory | Report "directory not found or not accessible" and stop that ecosystem scan (do not report false "clean"). |
| No lockfiles found | Report "No lockfiles found" + list supported ecosystems. |
jq not available | Detection works without jq. Audit and aggregation require jq — install it first. |
| Malformed lockfile | Report parse error for that ecosystem. Continue with others. |
aggregate.sh now tolerates mixed inputs (valid results + error objects).errors in unified JSON and rendered in a "Skipped / Error Inputs" Markdown section.status: "error" instead of crashing.npm audit fix, pip install --upgrade) are printed as suggestions. The agent will ask for confirmation before running them.共 1 个版本