Repository navigation
Architecture
iomi edited this page Nov 25, 2026
·
23 revisions
Dep-Vet is one Rust binary: a CLI, a library, a Claude Code hook, and an MCP server. Nothing executes package code.
command
-> parse spec / lockfile / config
-> registry client(s) (npm, PyPI, crates, Go, JSR, RubyGems, NuGet, Maven, Composer)
-> OSV + EPSS + CISA KEV (per version, batched where possible)
-> deps.dev Scorecard (per repository, weekly cache)
-> signals (pure: PackageMeta + now -> findings)
-> allowlist / policy (downgrade or add findings, still visible)
-> report (human, JSON, SARIF, SBOM)
Two branches never fetch metadata:
-
treereads a resolvedpackage-lock.jsongraph. -
workflowsandmcp-configread local text and never start a server.
plan is the only resolver, and it never downloads a tarball: npm reads
packuments, Maven reads POMs.
| Area | Files |
|---|---|
| Surface |
cli.rs, main.rs, report.rs, progress.rs, branding.rs
|
| Model |
model.rs, date.rs, version.rs, cache.rs, http.rs, netpolicy.rs
|
| Registry clients |
registry.rs, pypi.rs, crates.rs, go.rs, jsr.rs, rubygems.rs, nuget.rs, maven.rs, composer.rs
|
| Trees |
lockfile.rs, graph.rs, plan.rs, maven_plan.rs
|
| Intelligence |
osv.rs, exploit.rs, scorecard.rs, license.rs, typosquat.rs, signals.rs
|
| Archives |
archive/, rules.rs, inspect.rs, provenance.rs
|
| Automation |
guard.rs, intent.rs, hook/, mcp.rs, workflows.rs, mcp_config.rs
|
| Output/integration |
sarif.rs, sbom.rs, watch.rs, update.rs
|
-
Exit
3means could not check. It is never folded into0/1/2. -
Missing signals are labelled.
not checkedappears in human and JSON reports; absence is not agreement. - Every finding cites evidence. A rule without a linkable source does not ship.
- No execution. Archives are extracted in memory with caps; package code is never run.
- Untrusted input stays untrusted. Registry JSON drives URL validation, archive caps, path checks, and bounded parsing.
-
The cache policy is deliberate. Fresh entries skip the network; stale
entries only cover transient failures;
404never falls back.
- Registry metadata: 24 hours.
- Advisories: five minutes, with a 24-hour stale cap and disclosure.
- Scorecard: weekly.
- Verified archives: 30 days, re-verified on load.
- Update hint: 24 hours, one attempt, two seconds, six-hour negative cache.
- All archive/provenance URLs pass
netpolicy: https, ecosystem allowlists, public IPs, DNS filtering, manual bounded redirects. -
DEPVET_*_BASEoverrides are gated byDEPVET_ALLOW_INSECURE_BASES=1or--dev-registry.
-
guardparses an install command (best effort) and audits named packages. -
hook claudespawnsguard --check --jsonwith an 8-second budget and maps verdicts to Claude's permission protocol. -
mcpspeaks newline-delimited JSON-RPC over stdio with three tools and never draws progress output on stdout.
tests/cli.rs runs the real binary against a local fake registry and fake OSV,
EPSS, KEV, Scorecard, and archive servers. No test reaches the public internet
or the real cache. The suite also covers worktree/ref handling, Windows paths,
and inotify watch behavior per platform.