lockfile-guardian
Audits your package-lock.json for supply-chain attacks before install. Cross-checks every resolved entry against the live npm registry to detect integrity mismatches, new install scripts, and other malicious signals.
README
lockfile-guardian 🔒
Audit your package-lock.json for supply-chain attacks BEFORE you run npm install.
npx -y lockfile-guardian-mcp # MCP server, ready for Claude / Cursor / any agent
Your lockfile is the artifact npm install actually executes — the fully
resolved dependency tree, with integrity hashes and install-script flags.
lockfile-guardian cross-checks every resolved entry against the live npm
registry and tells you what is about to run on your machine.
It completes the guardian trio — each one audits a different layer:
- import-guardian — catches hallucinated imports in AI-generated code (a name the model invented).
- npm-guardian — audits a chosen package for CVEs and malicious behaviour.
- license-guardian — audits the licenses of your dependencies (AGPL/BUSL traps) before you ship.
- lockfile-guardian (this) — audits the resolved tree in your
package-lock.json.
What it catches
| 🔴 Integrity mismatch | the lockfile's sha512 doesn't match what npm serves for that exact version — the resolved tarball was swapped under you (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/install/postinstall — a first-seen dep with an install script is the Axios / plain-crypto-js attack signal. REVIEW. |
| 🟠 Hidden gyp build | native build via binding.gyp / node-gyp, which executes code on install and dodges plain postinstall monitoring. REVIEW. |
| 🟠 Fresh + executing | a version published in the last 30 days that runs an install script — disproportionately used in supply-chain attacks. REVIEW. |
Verdicts: 🟢 CLEAN · 🟠 REVIEW · 🔴 BLOCK.
PR-diff mode (the differentiator)
Pass the previous lockfile too and
lockfile-guardianaudits only what the change introduces. A first-seen dependency that runs an install script is the single highest-signal supply-chain tell — this surfaces it in one call, exactly where a code-review or CI gate needs it.
It runs read-only: it parses the lockfile and reads npm registry metadata. It never installs or executes anything.
Use it as an MCP server (free)
Any MCP-compatible agent (Claude Desktop, Claude Code, Cursor, …) can call it.
{
"mcpServers": {
"lockfile-guardian": { "command": "npx", "args": ["-y", "lockfile-guardian-mcp"] }
}
}
Tools:
audit_lockfile— give it apackage-lock.json(and optionally the previous one); get a CLEAN / REVIEW / BLOCK verdict per package.check_install_scripts— for an explicit list of packages, report which run install / native-build scripts (live registry manifest).verify_integrity— verify one pinned package: integrity match, install scripts, version age.
Free HTTP API
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-...
POST /mcp # MCP-over-HTTP
Hosted at https://lockfile-guardian.vercel.app · try
/verify?name=esbuild&version=0.21.5
(runs a postinstall) vs
/verify?name=lodash&version=4.17.21
(clean).
Pay-per-call (x402)
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 (Base). The server holds no private key.
POST /pro/audit { "lockfile": "...", "previous_lockfile": "..." } # 402 → pay → result
How the moat works
A coding agent reading the lockfile alone cannot know:
- whether the recorded
sha512still matches what npm serves for that version (an integrity mismatch is invisible without the live registry), - whether a pinned version actually declares install/native-build scripts in its
published manifest (the lockfile's
hasInstallScriptcan be absent or stale), - how old that exact version is.
lockfile-guardian fetches the live per-version manifest and integrity from the
registry and applies a curated set of 2026 supply-chain rules. That's data +
rules the model can't fabricate.
MIT · Part of the guardian trio. Issues and PRs welcome.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。