Behaviorally scan every pinned dependency in a lockfile, billed per package.
The paid counterpart to /v1/lockfile, which only matches identities. Reads the code of each package and screens for credential theft, exfiltration, obfuscation, prompt injection and install-time droppers. Each result carries a verdict, a risk level, the ids of the rules that fired and a risk summary. It does not carry file-and-line evidence: for that, scan the package on its own with POST /v1/scan (scan_artifact over MCP). Requires an X-API-Key holding credits: one credit per package that returns a verdict, NOTHING for a package that errors (its reservation is refunded). Capped at 25 packages per call, in lockfile order, deduplicated, worst verdict first. Sending the same lockfile again rescans the same first 25. To continue, send the rest as {"packages":[...]}: the not_scanned.packages list from the result (name@version strings) is accepted as it is. Read complete_coverage before trusting the result: false means something was capped, errored, only partly readable, or skipped for having no registry identity, so it is not a clean bill of health for the whole tree.
Request
- Base URL: https://lazaretto.dev
- URL: https://lazaretto.dev/v1/scan/batch
- Auth: API key in header X-API-Key
Request body
Example request
{
"packages": [
"chalk@5.6.1"
]
}Response
Per-package verdicts plus coverage and billing detail. not_scanned is null or {count, reasons, by_reason: {credits, time, cap}, packages}: by_reason splits count by cause, and packages lists the name@version of every package not scanned, in lockfile order. refund_failed is true only when unbilled credits could not be returned automatically.
Changes
No recorded changes to this operation across all 1 revision of this API.