Lockfile malware check (free, whole tree)
check_lockfileCheck EXACTLY-PINNED npm dependencies against published malicious-package advisories (OSV/OpenSSF). Free, anonymous, one call for the whole set. Give EITHER lockfile, the full text of a package-lock.json, yarn.lock or pnpm-lock.yaml, OR packages, a list of "name@version" strings, which is the one to reach for when you only care about a few dependencies or when an 800-package tree would not fit in your context. Give one or the other, never both. Only exact versions can be answered: a range like ^5.0.0 has no definitive answer because a compromised release usually sits between clean ones. Fail-closed: anything that could not be checked is returned in unverified, so an empty malicious list is an all-clear only when unverified is empty too AND truncated is false. truncated: true means the lockfile ran past the per-request package limit and the packages past it went into NEITHER list: they were never looked at, checked counts only the ones that were, and the rest are unchecked rather than clean. When that happens, send the remainder as packages (name@version strings) in a second call, or split the lockfile by workspace, before telling anyone the tree is clean.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "check_lockfile"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| lockfile | No | The full text contents of a package-lock.json, yarn.lock, or pnpm-lock.yaml. | |
| packages | No | Exactly pinned packages, as "name@version" strings (for example ["chalk@5.6.1","debug@4.4.2"]). Use instead of `lockfile` when you know which dependencies you care about, so a whole tree need not pass through your context. Mutually exclusive with `lockfile`. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| note | No | ||
| format | No | Lockfile format detected. | |
| checked | Yes | How many exactly pinned versions were actually checked. | |
| skipped | No | Entries with no registry identity (file:, link:, workspace:, git:). | |
| malicious | Yes | Pinned versions listed as malware in the advisory corpus. Act on these. | |
| truncated | No | True when the lockfile ran past the per-request package limit. The packages past it are in neither `malicious` nor `unverified`: they were never checked. Send them as `packages` in another call. | |
| disclaimer | No | ||
| unverified | Yes | Could NOT be decided. Never treat these as clean. |