Ask what the code does
CVE scanners answer "any known bug?". pkgxray reads the tarball's bytes for credential access, exfiltration, obfuscated payloads, install hooks, and persistence — including in a package nobody has reported yet.
npm · MCP · AI agents
Analyze packages before you install them.
One command reads the code, cites the evidence, and returns SAFE, REVIEW, or BLOCK — with a stable exit code your CI and your agent can act on.
The 30-second version
Three things, in order, every time you point it at a package.
CVE scanners answer "any known bug?". pkgxray reads the tarball's bytes for credential access, exfiltration, obfuscated payloads, install hooks, and persistence — including in a package nobody has reported yet.
Every finding names a file and a line. The verdict path is deterministic heuristics — there is no LLM in it, so text planted in a README can't argue its way to a pass.
The package sits in quarantine and is promoted only if policy
allows. Exit 0, 2, or 3
wires straight into CI, an install hook, or an agent's tool call.
The threat
Agents install packages and connect to MCP servers at machine speed. The registry they pull from is under industrial-scale attack. Pick a number for the detail behind it.
npm shipped 7.97 trillion downloads in 2025 — about 21.8 billion a day.
That is over 80% of all traffic across npm, PyPI, Maven Central, and NuGet combined. The registry holds 5.59 million packages and shipped 11.18 million new releases last year.
Sonatype 2026 State of the Software Supply Chain. npm downloads up 65% year over year.
CVE scanners find known bugs. pkgxray asks what the code does — before a single line runs on your machine.
Each figure links to its supporting report from the panel above. Sources include Sonatype's 2026 State of the Software Supply Chain, its open-source malware chapter and Q4 2025 OSS Malware Index, Palo Alto Networks' incident analysis, and NimbleBrain's MCP registry analysis.
Calibration · scanned 2026-07-21
We ran the scanner over 5,000 published packages — code only, no execution — read every block by hand, and measured recall against a committed, reconstructed known-malware corpus.
Live demo
Pick a package. This demo replays real fixtures — it does not download or execute anything in your browser.
Choose a package
pkgxray guard
Click a verdict to see what it means for install, CI, and agents.
No high- or medium-risk indicators. Default policy promotes out of quarantine. Install. Exit code 0.
Coverage
Deterministic heuristics — no LLM in the verdict path, so injected text can't steer them.
eval / new Function / child_process
.ssh / .aws / .npmrc / .env / keychains / wallets, incl. split-fragment paths (".s"+"sh")
curl | sh, process.env harvesting near a network sink
recheck verdict-drift + version-drift monitoring
get_weather that also takes a command)
mcp-proxy re-audits on tools/list_changed; pinned-manifest drift is denied
mcp-proxy gates each call and scans results; no cross-call flow analysis
A package that downloads its real payload after install can ship a clean tree — pair pkgxray with runtime sandboxing when that risk matters. Full threat model →
Surfaces
CLI, MCP, install hook, and CI all share the same policy and the same evidence rules — four commands cover the lot.
Quarantine a package, audit bytes, promote only if allowed.
Vet a server before connect — most public MCP servers ship with static keys and little verification.
Intercept agent npm install with a cited deny.
Catch trojaned updates against a stored baseline.
One engine, wherever packages enter your stack. Each path has a setup guide in the repo.
Gate package installs before an agent runs them — Codex, Claude Code, Cursor, Windsurf.
Coding-agent guide →
Audit a server's package and declared capabilities before
connecting; gate live traffic with mcp-proxy.
Fail builds when a dependency crosses policy; scan the whole
lockfile and re-vet on a schedule with recheck.
Inspect an npm package before installation — one command, a cited verdict, no account.
Try it →Comparison
Run it alongside npm audit and OSV-Scanner, not
instead of them — they answer "known CVE?". The comparison
that matters is against tools in the same lane: behavioral
supply-chain vetting.
| Capability | Socket.dev | OpenSSF Pkg Analysis | Cisco MCP Scanner | pkgxray |
|---|---|---|---|---|
| Fully local, zero-dependency, no account or cloud upload | — | ◑ | ◑ | ✅ |
| Static behavior analysis of package code | ✅ | ✅ | ✅ | ✅ |
| Sandboxed execution (dynamic analysis) | — | ✅ | ◑ | ◑ opt-in canary |
| npm ↔ GitHub artifact divergence | unknown | — | — | ✅ |
| Deterministic verdict path — no LLM an injection can steer | — | ✅ | ◑ | ✅ |
| Pre-install gate with a quarantined copy to review | ◑ | — | — | ✅ |
| MCP server vetting before connect | — | — | ✅ | ✅ |
| Per-call runtime gating of live MCP traffic | — | — | — | ✅ mcp-proxy |
| Verdict-drift monitoring vs. a stored baseline | ✅ cloud | — | — | ✅ local recheck |
Last reviewed against public documentation: 2026-07-21 (re-reviewed every 60–90 days). A — means no equivalent capability was found in the public documentation reviewed on that date — not that it was tested and found absent; unknown means not publicly documented either way.
Full per-tool notes: comparison.md →
Install
Lowest friction first contact — no global install, no account, no upload. Click a line to copy it.
Try it once
Keep it around
Give it to your agent
MIT · Node ≥ 18 · zero runtime dependencies.