agentleFS
Evan-DaruwallaEvan-Daruwalla/claude-skill-suite/cve-audit/SKILL.md

cve-audit

Skill0 starsChanged 46 days agoMITView on GitHub

Dependency vulnerability audit via npm audit + pip-audit: severity table, fails at a set level (default high); says so if pip-audit is missing, never fakes results. Use when: "audit dependencies", "are my deps vulnerable", "scan for CVEs".

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

2 rules. About 0 are common, 0 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    No files are written. Output is the severity table + verdict on stdout.

    line 75
  2. Very specific:

    MUST print CANARY PASS n/n before you trust a result.

    line 94

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

cve-audit — dependency-vulnerability audit

The engine is cve-audit.js (portable Node, zero deps). The advisory data is live — npm audit reaches the npm registry and pip-audit its own database, and what they return moves as advisories publish. The deterministic, canary-pinned part is the PARSE + REPORT layer: the severity bucketing, the counts, and the fail-level→exit-code logic. That is what makes this usable as a release gate and what the canary proves.

Typical target: a Next.js/TypeScript frontend (npm) paired with a FastAPI/Python backend (pip). Both ecosystems, one auditor. When the backend holds sensitive user data, a high/critical advisory in a request-handling dependency is a launch blocker, not a nag.

Commands

node cve-audit.js [--dir <path>] [--fail-level critical|high|moderate|low]
node cve-audit.js --fixture <npm-audit.json> [--fail-level <lvl>]
node cve-audit.js --canary
  • default (auto-detect): audits --dir (default cwd). Runs npm audit --json when package.json + a lockfile are present, and pip-audit --format json when requirements.txt / pyproject.toml / poetry.lock is present. If both exist, both run. Prints a severity table; exits 1 when any finding is at/above the fail-level.
  • --fixture parses a SAVED npm audit --json file offline — no network. Use it on a CI-captured audit log, or to reproduce a result deterministically. This is the mode the canary exercises.
  • --fail-level sets the gate (default high): high fails on any high or critical; critical fails only on critical; low fails on anything.

Examples

  • Gate a Next.js frontend (npm): node cve-audit.js --dir /path/to/frontend --fail-level high — a high/critical advisory exits 1 and blocks the release.
  • Audit a FastAPI backend (Python): same command in the backend dir runs pip-audit. If pip-audit isn't installed the run reports MISSING: pip-audit is not on PATH with pipx install pip-audit and exits 2 — it never pretends the backend is clean.
  • Re-check a CI audit log offline: node cve-audit.js --fixture ci/npm-audit.json --fail-level critical — parses the captured JSON with no registry call, applies the same gate logic.

What each ecosystem reports

  • npm (audit v2 schema): a table of critical / high / moderate / low with the vulnerable package names and per-severity counts, plus a total. Fail-level logic runs on those counts.
  • pip-audit: its default JSON carries no CVSS severity, so cve-audit reports vulnerable-package and total-advisory counts; ANY finding fails the run (fail-level does not sub-divide it).

Windows notes

  • npm audit shells out to npm (npm.cmd on Windows) — it must be on PATH.
  • pip-audit is checked with where pip-audit (which pip-audit on POSIX); if it is not installed, the Python path correctly reports MISSING rather than a false all-clear.
  • The --fixture mode is pure file parsing — no shell, safe everywhere.

Storage / output

No files are written. Output is the severity table + verdict on stdout; errors and the MISSING notice go to stderr. The bundled fixture.json (an npm-audit v2 sample: 1 high, 1 moderate, 1 low) is shipped only as an offline --fixture example.

Exit codes

0 clean or all findings below fail-level · 1 a finding at/above the fail-level (or canary failure) · 2 usage error / audit tool missing / unparseable input.

Verification (the done-check)

node cve-audit.js --canary

Drives the parse/report core off a temp npm-audit fixture in BOTH directions — a fail-level high run with a high finding exits 1 (catches), a fail-level critical run with no critical exits 0 (stays quiet) — plus exact severity counts, clean-input pass, malformed-input exit 2, and pip-audit parsing. No network, no npm, no pip. MUST print CANARY PASS n/n before you trust a result.

node cve-audit.js --canary — MUST print CANARY PASS 22/22 before you trust a result.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.