package-lock.json for supply-chain attacks before you run npm install.Your lockfile is the artifact npm install actually executes. lockfile-guardian cross-checks every resolved dependency against the live npm registry and tells you what's about to run on your machine. It completes the guardian trio: npm-guardian vets a chosen package, import-guardian catches hallucinated imports, license-guardian audits licenses β lockfile-guardian audits the resolved tree.
| π΄ Integrity mismatch | the lockfile's sha512 doesn't match what npm serves for that version β the resolved tarball was swapped (lockfile poisoning). BLOCK. |
| π΄ Not on registry | the lockfile points at a package/version that doesn't exist or was unpublished. BLOCK. |
| π New install script | a newly-introduced dependency that runs preinstall/postinstall β the Axios / plain-crypto-js attack signal. |
| π Hidden gyp build | native build via binding.gyp / node-gyp that executes on install and dodges plain postinstall monitoring. |
| π Fresh + executing | a version published in the last 30 days that runs an install script β disproportionately used in attacks. |
Pass the previous lockfile too and lockfile-guardian audits only what the change introduces. A first-seen dependency with an install script is the single highest-signal supply-chain tell β this surfaces it in one call.
POST /audit { "lockfile": "{β¦package-lock.jsonβ¦}", "previous_lockfile": "{β¦}" }
POST /scripts { "names": ["sharp@0.33.0","esbuild","node-sass"] }
GET /verify?name=lodash&version=4.17.21&integrity=sha512-...Try it: /verify?name=esbuild (runs a native build) Β· /verify?name=lodash (clean)
{
"mcpServers": {
"lockfile-guardian": { "command": "npx", "args": ["-y", "lockfile-guardian-mcp"] }
}
}Or connect over HTTP at POST /mcp. Tools: audit_lockfile, check_install_scripts, verify_integrity.
The /pro/* routes are gated by x402. Your agent pays $0.02 USDC per call automatically β no sign-up, no API key. Settles on-chain to the operator wallet.
POST /pro/audit { "lockfile": "...", "previous_lockfile": "..." } # 402 β pay β result