Coding agents
Gate package installs before an agent runs them — Codex, Claude Code, Cursor, Windsurf.
Coding-agent guide →Analyze packages before you install them.
Zero-dependency · runs locally · static scans never execute package code
Agents install packages and connect to MCP servers at machine speed. The registry they pull from is under industrial-scale attack.
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. 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.
Pick a package. This demo replays real fixtures — it does not download or execute anything in your browser.
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.
Deterministic heuristics — no LLM in the verdict path, so injected text can't steer them.
| Threat | Coverage | How pkgxray sees it |
|---|---|---|
| Credential theft | ✅ | reads of .ssh / .aws / .npmrc / .env / keychains / wallets, incl. split-fragment paths (".s"+"sh") |
| Prompt injection | ✅ | tiered detection in docs, comments, metadata; deterministic verdict path can't be steered |
| Unicode smuggling | ✅ | invisible tag-block characters + Trojan Source bidi / zero-width |
| Base64 payloads | ✅ | encoded envelopes in docs/comments; blobs decoded into computed-arg eval / new Function / child_process |
| Exfiltration & loaders | ✅ | cross-file correlation: stage-2 loaders, curl | sh, process.env harvesting near a network sink |
| Persistence | ✅ | writes to shell rc files, cron, launch agents |
| Obfuscation | ✅ | packed blob + computed-arg execution; minification alone is deliberately not flagged |
| Known CVEs | ✅ | OSV batch pre-check before download; never mutable by config |
| Trojaned updates / takeover | ✅ | recheck verdict-drift + version-drift monitoring |
| Artifact divergence | ✅ | published npm tarball diffed against the tagged GitHub source |
| MCP capability abuse | ✅ | capability-surface mismatch in the manifest audit (a get_weather that also takes a command) |
| Runtime tool drift | ✅ | mcp-proxy re-audits on tools/list_changed; pinned-manifest drift is denied |
| Sequence-level tool-call chains | ◑ | mcp-proxy gates each call and scans results; no cross-call flow analysis |
| Dependency confusion / typosquats | ◑ | callback beacons, repo- and provenance-mismatch signals; no name-similarity heuristic |
✅ detected · ◑ partial / indirect. Known blind spot: 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 →
CLI, MCP, install hook, and CI all share the same policy and the same evidence rules.
npm install with cited deny
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 →
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 →