vetlock
Behavioral diff for dependency updates — what does this update do now that it didn't before? Runs on npm/yarn/pnpm and PyPI/Poetry/uv, ships as a CLI + GitHub Action + hosted HTTP API. 17 detectors across 10 security categories, 540 passing tests, 92.3% detection on the corpus vs npm audit's 53.8%. Zero telemetry.
Below: try the bundled demo, walk the 9-stage pipeline, see live metrics, and read the current release story.
00 Try vetlock — bundled fixture demo demo
Try vetlock on one of two bundled fixtures — the real
Shai-Hulud hijack, or a benign debug@4.3.4 → 4.3.5 bump —
with Try malicious / Try benign below. Scanning your own
lockfile stays off by default: this public page only submits the bundled
fixtures to the hosted relay, never a visitor's package file.
How it works ↓
- 1Submitted
- 2Workflow dispatched
- 3vetlock running
- 4Collecting result
- 5Ready
0s elapsed · typical scan takes 25–45s
· How vetlock works
Nine stages, grouped into six panels for readability — one guarantee: no package code ever runs. vetlock reads two lockfiles — the one you shipped and the one you're about to ship — and walks the dependency delta without running a single line of package code. What you see below is the actual pipeline: lockfile parse + diff, changed-set, recursive fetch + safe extraction, AST capability extraction + detectors, provenance + escalation, verdict + output.
-
stage 01 · lockfile parse + diff
Lockfile parse + diff
npm / yarn / pnpm / PyPI / Poetry / uv lockfiles in, one structural delta out. vetlock parses each lockfile deterministically for its ecosystem and emits added, removed, and version-changed entries — no network, no code, just the change-set of what actually shipped.
-
stage 02 · changed set
Changed set
The delta collapses into a small set of package@version pairs to investigate. Everything else in the tree is evidence of what didn't move and gets skipped — a scan is only ever as expensive as the change is wide.
-
stage 03 · recursive fetch + safe extraction
Recursive fetch + safe extraction
For each changed root, vetlock walks its full transitive closure — via
pacotefor npm, the PyPI JSON API for Python. Each tarball is unpacked through safe extraction that rejects zip-slip, symlink escape, and tarbomb paths. Nothing is executed; tarballs are only parsed. -
stage 04 · AST capability extraction + detectors
AST capability extraction + 17 detectors
Each tarball is parsed with Babel (constant folding + alias tracking) for JS/TS, and text-based extraction for Python — the never-execute invariant holds across both ecosystems. Then seventeen static detectors pass over the extracted capabilities behind an HMAC-authed cache: install-script shape, new endpoints, env-token harvest, obfuscation deltas, integrity tampering, typosquat neighbors, and more. Every detector emits evidence — file, line, capability. Never a claim without a citation.
-
stage 05 · provenance + escalation
Provenance + escalation
Findings alone aren't enough — every node in the changed closure carries its origin, integrity, and adjacency: which registry published it, which signatures match, and how close it lies to a known advisory or typosquat cluster. Explicit escalation rules then promote WARN → BLOCK when signals co-occur — a lone install-script is a WARN, an install-script beside an env-token harvester is a BLOCK. Provenance + escalation is what turns detector hits into decisions.
-
stage 06 · verdict + output
Verdict + output
A per-package severity (CLEAN, WARN, BLOCK) and a whole-scan exit code (0/1/2/3), rendered in four formats: TTY (colored, grouped), JSON (schema-stable), SARIF 2.1.0, and Markdown. Drop-in as a GitHub Action (
uses: OJ-Uday/vetlock/action@v0) with SARIF uploaded to code-scanning. The scan finishes with the same guarantee it started with: zero package code was run.
· vs. npm audit — same corpus, different signal
The reference corpus is 13 real supply-chain attacks (Shai-Hulud, ua-parser-js, node-ipc, event-stream, etc.). Both scanners run on the same before/after lockfile pairs.
- vetlock 92.3% · 12 of 13 caught
- npm audit 53.8% · 7 of 13 caught
npm audit relies on advisory-database matching after CVE publication. vetlock diffs the behavior of the packages themselves, so it catches attacks that haven't been catalogued yet.
· False-positive tuning — 48.1% → 14.3% across four releases
On the top-100 npm version bumps (routine, benign changes), an over-sensitive scanner is just as unusable as an under-sensitive one. Four point releases dropped the BLOCK rate on routine bumps from 48.1% to 14.3% while holding the corpus detection rate flat at 92.3%.
- v0.4.0 48.1% BLOCK
- v0.4.1 33.3% BLOCK
- v0.4.2 17.9% BLOCK
- v0.5.0 14.3% BLOCK
Corpus detection rate held at 92.3% (12/13) through the entire arc. Method: install.script severity tiering (INSTALL_TIER=BLOCK, PUBLISH_TIER=WARN, CI_TIER=INFO); URL AST context tags (network-arg vs config-value vs literal vs comment); obfuscation de-weighting for declared bundler entries.
· Hosted API — engine as a service
The same detection engine runs behind a small HTTP surface: three endpoints, async job queue, per-scan subprocess sandbox with SIGKILL-on-timeout, unconditional tmpdir teardown. Deployed on Fly.io scale-to-zero — ~$0/mo idle, ~$5/mo at 1,000 scans/day.
POST /scan → 202 { scanId }
GET /scan/:scanId → 202 pending | 200 done | 410 expired
GET /health → 200 { status: "ok" }
- Sandbox empty env · no shell · stdin closed · 4 MB stdout cap · --max-old-space-size=512 · SIGKILL on wall-clock timeout · unconditional tmpdir teardown
- Rate limit 5 req/min per IP · 1 MB body cap · 24h result TTL
- Zero new npm deps a supply-chain scanner adding express as a runtime dep would be self-contradictory
· Live proof.
every number here is fetched, not typed. missing data hides the tile.