Send a whole lockfile and get back every package in it that is known malware, has known vulnerabilities, or is installed from git instead of the registry. This covers transitive dependencies too, which a list of direct dependencies misses.Supported files:
File
Ecosystem
package-lock.json, npm-shrinkwrap.json
npm
pnpm-lock.yaml
npm
yarn.lock (classic and Berry)
npm
poetry.lock, uv.lock
PyPI
requirements.txt (and requirements-*.txt)
PyPI
The file is analyzed in memory and not stored. Each request costs 5 units of your rate limit. The body can be up to 5 MB.
Request
Send the file as the raw body and its name as ?filename=:
curl -X POST "https://api.custoden.com/v1/packages/lockfile?filename=package-lock.json" \ --data-binary @package-lock.json
File name, used to pick the format. A path is accepted, only the last part is used
content
string
Full file contents
Example
{ "lockfile": { "filename": "package-lock.json", "ecosystem": "npm", "packages": 412 }, "summary": { "critical": 1, "high": 1, "medium": 0, "low": 0, "info": 0, "total": 2 }, "findings": [ { "rule": "known-malicious", "severity": "critical", "title": "chalk@5.6.1 is a known malicious package", "detail": "...", "line": null, "package": { "ecosystem": "npm", "name": "chalk", "version": "5.6.1" }, "remediation": "Remove the package, rotate every credential the install could reach, and rebuild affected machines.", "references": ["https://osv.dev/vulnerability/MAL-..."] }, { "rule": "vulnerable-dependency", "severity": "high", "title": "undici@7.28.0 has 2 known vulnerabilities", "detail": "GHSA-...: ...", "line": null, "package": { "ecosystem": "npm", "name": "undici", "version": "7.28.0" }, "remediation": "Upgrade to 7.29.0 or later.", "references": ["https://osv.dev/vulnerability/GHSA-..."] } ], "checks": { "vulnerabilities": { "status": "complete" } }, "checked_at": "2026-11-30T13:40:12.512Z"}
Response
Field
Type
Description
lockfile
object
filename, ecosystem and packages (distinct package versions found)
summary
object
Count of findings per severity, plus total
findings
array
All findings, sorted by severity. Same fields as a repository scan finding, without category and path
checks.vulnerabilities
object
status of complete, partial or skipped, and a reason when it is not complete
checked_at
string
ISO 8601 timestamp
In a requirements.txt, only exact pins (==) can be checked. Other lines are counted in packages but make the check partial and add an unpinned-dependencies finding. line is set for findings in a requirements.txt and null for lockfiles.
Rules
Rule
Severity
Meaning
known-malicious
critical
The package version is listed as malware in OSV
vulnerable-dependency
highest advisory severity
The package version has known vulnerabilities. Advisories without a severity count as medium
dependency-from-url
medium
Installed from git or a URL instead of the registry
insecure-registry-url
medium
The lockfile downloads packages over plain http://
unpinned-dependencies
low
A requirements file does not pin exact versions
To check a single package in more depth, including install scripts, typosquatting, maintainers and release history, use Check a package.
Errors
Status
Code
When
400
invalid_json
JSON body is not valid JSON
400
invalid_request
No ?filename=, or the JSON body lacks filename or content
400
unsupported_lockfile
The file name is not one of the supported files
400
invalid_lockfile
The file is empty or no packages could be read from it
Required for a raw body. One of package-lock.json, npm-shrinkwrap.json, pnpm-lock.yaml, yarn.lock, poetry.lock, uv.lock or requirements.txt (requirements-*.txt is also accepted).
{"docsConfig":{"theme":"maple","$schema":"https://mintlify.com/docs.json","name":"Custoden","colors":{"primary":"#e1251b","light":"#f5372c","dark":"#e1251b"},"logo":{"light":"https://mintcdn.com/custoden/-PLZApaHDUOl5Kki/logo/light.svg?fit=max\u0026auto=format\u0026n=-PLZApaHDUOl5Kki\u0026q=85\u0026s=d1ee441e4d84f21708788e0b71435477","dark":"https://mintcdn.com/custoden/-PLZApaHDUOl5Kki/logo/dark.svg?fit=max\u0026auto=format\u0026n=-PLZApaHDUOl5Kki\u0026q=85\u0026s=b3b749fdd1a2af47755cc5b2cb65d83e","href":"https://custoden.com"},"favicon":"https://mintcdn.com/custoden/-PLZApaHDUOl5Kki/favicon.svg?fit=max\u0026auto=format\u0026n=-PLZApaHDUOl5Kki\u0026q=85\u0026s=049d8ccbe0cb701451beaa9420b00840","api":{"openapi":"openapi.yaml","playground":{"display":"interactive"}},"appearance":{"default":"dark"},"background":{"color":{"light":"#ffffff","dark":"#0a0a0a"}},"navbar":{"links":[{"href":"https://github.com/Custoden","label":"GitHub"}],"primary":{"type":"button","label":"custoden.com","href":"https://custoden.com"}},"footer":{"socials":{"github":"https://github.com/Custoden"},"links":[{"header":"Legal","items":[{"label":"Privacy policy","href":"https://custoden.com/privacy"},{"label":"Terms of service","href":"https://custoden.com/terms"}]}]},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"custoden","hasAudioNarration":false,"actualSubdomain":"custoden","customDomains":["docs.custoden.com"],"gitSource":{"type":"github","owner":"custoden","repo":"docs","deployBranch":"main","contentDirectory":"","isPrivate":false,"mountPath":"","label":"","_id":"6afd520d0749a80f90a76ac2"},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6b0de26d10f3ee1e6aa05d6f","clientVersion":"0.0.4377","searchFilterCounts":[{"language":"default","tag":"Documentation","count":13},{"language":"default","tag":"API reference","count":7},{"language":"default","tag":"Guides","count":5},{"language":"default","tag":"GitHub","count":4},{"language":"default","tag":"Getting started","count":4},{"language":"default","tag":"Reference","count":4},{"language":"default","tag":"Packages","count":3}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":true,"hasWebMcpPermissions":true,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"starter-pricing","enabled":true,"variant":{"name":"treatment","enabled":true,"payload":{"type":"string","value":"treatment"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"starterQuestions":[],"googleFontsInlined":false},"customCss":[]}
{"page":{"pagePath":"api-reference/scan-a-lockfile","slug":"/api-reference/scan-a-lockfile","pageMetadata":{"title":"Scan a lockfile","openapi":"POST /v1/packages/lockfile","description":"Checks every package in a lockfile for known malware and vulnerabilities in one request.","href":"/api-reference/scan-a-lockfile"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Checks every package in a lockfile for known malware and vulnerabilities in one request.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,p:`p`,pre:`pre`,span:`span`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,..._provideComponents(),...props.components},{CodeBlock,Heading,Table}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Table)_missingMdxReference(`Table`,true);return _jsxs(_Fragment,{children:[_jsx(_components.p,{children:`Send a whole lockfile and get back every package in it that is known malware, has known vulnerabilities, or is installed from git instead of the registry. This covers transitive dependencies too, which a list of direct dependencies misses.`}),`\n`,_jsx(_components.p,{children:`Supported files:`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`File`}),_jsx(_components.th,{children:`Ecosystem`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[_jsx(_components.code,{children:`package-lock.json`}),`, `,_jsx(_components.code,{children:`npm-shrinkwrap.json`})]}),_jsx(_components.td,{children:`npm`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`pnpm-lock.yaml`})}),_jsx(_components.td,{children:`npm`})]}),_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[_jsx(_components.code,{children:`yarn.lock`}),` (classic and Berry)`]}),_jsx(_components.td,{children:`npm`})]}),_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[_jsx(_components.code,{children:`poetry.lock`}),`, `,_jsx(_components.code,{children:`uv.lock`})]}),_jsx(_components.td,{children:`PyPI`})]}),_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[_jsx(_components.code,{children:`requirements.txt`}),` (and `,_jsx(_components.code,{children:`requirements-*.txt`}),`)`]}),_jsx(_components.td,{children:`PyPI`})]})]})]}),`\n`,_jsxs(_components.p,{children:[`The file is analyzed in memory and not stored. Each request costs 5 units of your `,_jsx(_components.a,{href:`/getting-started/rate-limits`,children:`rate limit`}),`. The body can be up to 5 MB.`]}),`\n`,_jsx(Heading,{level:`2`,id:`request`,children:`Request`}),`\n`,_jsxs(_components.p,{children:[`Send the file as the raw body and its name as `,_jsx(_components.code,{children:`?filename=`}),`:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -X`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` POST`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"https://api.custoden.com/v1/packages/lockfile?filename=package-lock.json\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --data-binary`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` @package-lock.json`})]}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`Or as JSON:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{ `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"filename\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"package-lock.json\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"content\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"\u003cfile contents>\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})]}),`\n`]})})}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Field`}),_jsx(_components.th,{children:`Type`}),_jsx(_components.th,{children:`Description`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`filename`})}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`File name, used to pick the format. A path is accepted, only the last part is used`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`content`})}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`Full file contents`})]})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`example`,children:`Example`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`28`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`28`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"lockfile\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: { `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"filename\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"package-lock.json\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"ecosystem\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"npm\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"packages\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`412`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"summary\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: { `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"critical\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"high\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"medium\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"low\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"info\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"total\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`2`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"findings\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"rule\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"known-malicious\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"severity\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"critical\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"title\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"chalk@5.6.1 is a known malicious package\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"detail\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"...\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"line\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`null`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"package\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: { `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"ecosystem\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"npm\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"name\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"chalk\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"version\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"5.6.1\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"remediation\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Remove the package, rotate every credential the install could reach, and rebuild affected machines.\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"references\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://osv.dev/vulnerability/MAL-...\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"rule\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"vulnerable-dependency\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"severity\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"high\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"title\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"undici@7.28.0 has 2 known vulnerabilities\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"detail\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"GHSA-...: ...\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"line\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`null`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"package\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: { `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"ecosystem\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"npm\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"name\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"undici\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"version\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"7.28.0\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"remediation\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Upgrade to 7.29.0 or later.\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"references\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://osv.dev/vulnerability/GHSA-...\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ],`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"checks\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: { `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"vulnerabilities\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: { `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"status\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"complete\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } },`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"checked_at\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2026-11-30T13:40:12.512Z\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`response`,children:`Response`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Field`}),_jsx(_components.th,{children:`Type`}),_jsx(_components.th,{children:`Description`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`lockfile`})}),_jsx(_components.td,{children:`object`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`filename`}),`, `,_jsx(_components.code,{children:`ecosystem`}),` and `,_jsx(_components.code,{children:`packages`}),` (distinct package versions found)`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`summary`})}),_jsx(_components.td,{children:`object`}),_jsxs(_components.td,{children:[`Count of findings per severity, plus `,_jsx(_components.code,{children:`total`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`findings`})}),_jsx(_components.td,{children:`array`}),_jsxs(_components.td,{children:[`All findings, sorted by severity. Same fields as a `,_jsx(_components.a,{href:`/api-reference/scan-a-repository#finding`,children:`repository scan finding`}),`, without `,_jsx(_components.code,{children:`category`}),` and `,_jsx(_components.code,{children:`path`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`checks.vulnerabilities`})}),_jsx(_components.td,{children:`object`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`status`}),` of `,_jsx(_components.code,{children:`complete`}),`, `,_jsx(_components.code,{children:`partial`}),` or `,_jsx(_components.code,{children:`skipped`}),`, and a `,_jsx(_components.code,{children:`reason`}),` when it is not `,_jsx(_components.code,{children:`complete`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`checked_at`})}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`ISO 8601 timestamp`})]})]})]}),`\n`,_jsxs(_components.p,{children:[`In a `,_jsx(_components.code,{children:`requirements.txt`}),`, only exact pins (`,_jsx(_components.code,{children:`==`}),`) can be checked. Other lines are counted in `,_jsx(_components.code,{children:`packages`}),` but make the check `,_jsx(_components.code,{children:`partial`}),` and add an `,_jsx(_components.code,{children:`unpinned-dependencies`}),` finding. `,_jsx(_components.code,{children:`line`}),` is set for findings in a `,_jsx(_components.code,{children:`requirements.txt`}),` and `,_jsx(_components.code,{children:`null`}),` for lockfiles.`]}),`\n`,_jsx(Heading,{level:`2`,id:`rules`,children:`Rules`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Rule`}),_jsx(_components.th,{children:`Severity`}),_jsx(_components.th,{children:`Meaning`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`known-malicious`})}),_jsx(_components.td,{children:`critical`}),_jsx(_components.td,{children:`The package version is listed as malware in OSV`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`vulnerable-dependency`})}),_jsx(_components.td,{children:`highest advisory severity`}),_jsx(_components.td,{children:`The package version has known vulnerabilities. Advisories without a severity count as medium`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`dependency-from-url`})}),_jsx(_components.td,{children:`medium`}),_jsx(_components.td,{children:`Installed from git or a URL instead of the registry`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`insecure-registry-url`})}),_jsx(_components.td,{children:`medium`}),_jsxs(_components.td,{children:[`The lockfile downloads packages over plain `,_jsx(_components.code,{children:`http://`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`unpinned-dependencies`})}),_jsx(_components.td,{children:`low`}),_jsx(_components.td,{children:`A requirements file does not pin exact versions`})]})]})]}),`\n`,_jsxs(_components.p,{children:[`To check a single package in more depth, including install scripts, typosquatting, maintainers and release history, use `,_jsx(_components.a,{href:`/api-reference/check-a-package`,children:`Check a package`}),`.`]}),`\n`,_jsx(Heading,{level:`2`,id:`errors`,children:`Errors`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Status`}),_jsx(_components.th,{children:`Code`}),_jsx(_components.th,{children:`When`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`400`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`invalid_json`})}),_jsx(_components.td,{children:`JSON body is not valid JSON`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`400`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`invalid_request`})}),_jsxs(_components.td,{children:[`No `,_jsx(_components.code,{children:`?filename=`}),`, or the JSON body lacks `,_jsx(_components.code,{children:`filename`}),` or `,_jsx(_components.code,{children:`content`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`400`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`unsupported_lockfile`})}),_jsx(_components.td,{children:`The file name is not one of the supported files`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`400`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`invalid_lockfile`})}),_jsx(_components.td,{children:`The file is empty or no packages could be read from it`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`413`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`payload_too_large`})}),_jsx(_components.td,{children:`Body exceeds 5 MB`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`429`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`rate_limited`})}),_jsxs(_components.td,{children:[`See `,_jsx(_components.a,{href:`/getting-started/rate-limits`,children:`Rate limits`})]})]})]})]}),`\n`,_jsx(_components.p,{children:`Rejected requests are not charged.`})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Scan a lockfile","openapi":"POST /v1/packages/lockfile","description":"Checks every package in a lockfile for known malware and vulnerabilities in one request.","href":"/api-reference/scan-a-lockfile"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Request","slug":"request","depth":2,"children":[]},{"title":"Example","slug":"example","depth":2,"children":[]},{"title":"Response","slug":"response","depth":2,"children":[]},{"title":"Rules","slug":"rules","depth":2,"children":[]},{"title":"Errors","slug":"errors","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"openApiReferenceData":{"operation":{"operationId":"scanLockfile","summary":"Scan a lockfile","description":"Checks every package in a lockfile for known malware and vulnerabilities in one request.","parameters":["fccb15d9-cf22-4418-bc90-7cabd5615136"],"requestBody":"c57e3eff-e0b4-401a-b057-9ac8580ee656","responses":{"200":"b8594fa5-284b-45fd-ac1f-65685967a156","400":"88125dae-9af4-4b02-b7cb-4820cd59078d","413":"c1ba1b7f-8c33-40c7-83b0-958233bd30fd","429":"d7d852c1-8fa8-4d86-9916-dc5bc712b1b8"},"method":"post","type":"path","servers":["85781a75-edf0-4f0d-9476-6017bf3cdb94"],"security":[],"path":"/v1/packages/lockfile","baseUrlOptions":["https://api.custoden.com"],"title":"Scan a lockfile","codeSamples":[],"requiredOnlyExamples":false,"requestExampleType":"generated","responseExampleType":"generated"},"dependencies":{"parameters":{"fccb15d9-cf22-4418-bc90-7cabd5615136":{"name":"filename","in":"query","required":false,"description":"Required for a raw body. One of package-lock.json, npm-shrinkwrap.json, pnpm-lock.yaml, yarn.lock, poetry.lock, uv.lock or requirements.txt (requirements-*.txt is also accepted).","schema":{"type":"string","isRequired":false,"description":"Required for a raw body. One of package-lock.json, npm-shrinkwrap.json, pnpm-lock.yaml, yarn.lock, poetry.lock, uv.lock or requirements.txt (requirements-*.txt is also accepted).","uniqueKey":"","typeLabel":"string"}}},"requestBody":{"required":true,"content":{"text/plain":{"schema":{"type":"string","description":"Lockfile contents","uniqueKey":"","typeLabel":"string"},"examples":{"Example":{"title":"Example","value":"\u003cstring>"}},"exampleType":"generated"},"application/json":{"schema":{"type":"object","required":["filename","content"],"properties":{"filename":{"type":"string","isRequired":true,"uniqueKey":"filename","typeLabel":"string"},"content":{"type":"string","isRequired":true,"uniqueKey":"content","typeLabel":"string"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"filename":"\u003cstring>","content":"\u003cstring>"}}},"exampleType":"generated"}},"exampleType":"generated"},"responses":{"b8594fa5-284b-45fd-ac1f-65685967a156":{"description":"Lockfile report","headers":{"RateLimit-Limit":{"description":"Units allowed in the current minute. On repository scans, scans allowed in the current hour","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Units left in the current minute. On repository scans, scans left in the current hour","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","required":["lockfile","summary","findings","checks","checked_at"],"properties":{"lockfile":{"type":"object","properties":{"filename":{"type":"string","uniqueKey":"lockfile.filename","typeLabel":"string"},"ecosystem":{"type":"string","enum":["npm","pypi"],"uniqueKey":"lockfile.ecosystem","typeLabel":"enum\u003cstring>"},"packages":{"type":"integer","description":"Distinct package versions found","uniqueKey":"lockfile.packages","typeLabel":"integer"}},"isRequired":true,"uniqueKey":"lockfile","typeLabel":"object"},"summary":{"type":"object","required":["critical","high","medium","low","info","total"],"properties":{"critical":{"type":"integer","isRequired":true,"uniqueKey":"summary.critical","typeLabel":"integer"},"high":{"type":"integer","isRequired":true,"uniqueKey":"summary.high","typeLabel":"integer"},"medium":{"type":"integer","isRequired":true,"uniqueKey":"summary.medium","typeLabel":"integer"},"low":{"type":"integer","isRequired":true,"uniqueKey":"summary.low","typeLabel":"integer"},"info":{"type":"integer","isRequired":true,"uniqueKey":"summary.info","typeLabel":"integer"},"total":{"type":"integer","isRequired":true,"uniqueKey":"summary.total","typeLabel":"integer"}},"isRequired":true,"uniqueKey":"summary","typeLabel":"object"},"findings":{"type":"array","items":{"type":"object","required":["rule","severity","title","detail","line"],"properties":{"rule":{"type":"string","enum":["known-malicious","vulnerable-dependency","dependency-from-url","insecure-registry-url","unpinned-dependencies"],"isRequired":true,"uniqueKey":"findings.items.[INDEX].rule","typeLabel":"enum\u003cstring>"},"severity":{"type":"string","enum":["critical","high","medium","low","info"],"isRequired":true,"uniqueKey":"findings.items.[INDEX].severity","typeLabel":"enum\u003cstring>"},"title":{"type":"string","isRequired":true,"uniqueKey":"findings.items.[INDEX].title","typeLabel":"string"},"detail":{"type":"string","isRequired":true,"uniqueKey":"findings.items.[INDEX].detail","typeLabel":"string"},"line":{"oneOf":[{"type":"integer","description":"Set for requirements files","isRequired":true,"uniqueKey":"findings.items.[INDEX].line.oneOf.0","typeLabel":"integer"},{"type":"null","description":"Set for requirements files","isRequired":true,"uniqueKey":"findings.items.[INDEX].line.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"findings.items.[INDEX].line","typeLabel":"integer | null"},"package":{"type":"object","properties":{"ecosystem":{"type":"string","enum":["npm","pypi"],"uniqueKey":"findings.items.[INDEX].package.ecosystem","typeLabel":"enum\u003cstring>"},"name":{"type":"string","uniqueKey":"findings.items.[INDEX].package.name","typeLabel":"string"},"version":{"oneOf":[{"type":"string","uniqueKey":"findings.items.[INDEX].package.version.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"findings.items.[INDEX].package.version.oneOf.1","typeLabel":"null"}],"uniqueKey":"findings.items.[INDEX].package.version","typeLabel":"string | null"}},"uniqueKey":"findings.items.[INDEX].package","typeLabel":"object"},"remediation":{"type":"string","uniqueKey":"findings.items.[INDEX].remediation","typeLabel":"string"},"references":{"type":"array","items":{"type":"string","format":"uri","uniqueKey":"findings.items.[INDEX].references.items.[INDEX]","typeLabel":"string\u003curi>"},"uniqueKey":"findings.items.[INDEX].references","typeLabel":"string\u003curi>[]"}},"uniqueKey":"findings.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"findings","typeLabel":"object[]"},"checks":{"type":"object","properties":{"vulnerabilities":{"type":"object","required":["status"],"properties":{"status":{"type":"string","enum":["complete","partial","skipped"],"isRequired":true,"uniqueKey":"checks.vulnerabilities.status","typeLabel":"enum\u003cstring>"},"reason":{"type":"string","uniqueKey":"checks.vulnerabilities.reason","typeLabel":"string"}},"uniqueKey":"checks.vulnerabilities","typeLabel":"object"}},"isRequired":true,"uniqueKey":"checks","typeLabel":"object"},"checked_at":{"type":"string","format":"date-time","isRequired":true,"uniqueKey":"checked_at","typeLabel":"string\u003cdate-time>"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"lockfile":{"filename":"\u003cstring>","ecosystem":"npm","packages":123},"summary":{"critical":123,"high":123,"medium":123,"low":123,"info":123,"total":123},"findings":[{"rule":"known-malicious","severity":"critical","title":"\u003cstring>","detail":"\u003cstring>","line":123,"package":{"ecosystem":"npm","name":"\u003cstring>","version":"\u003cstring>"},"remediation":"\u003cstring>","references":["\u003cstring>"]}],"checks":{"vulnerabilities":{"status":"complete","reason":"\u003cstring>"}},"checked_at":"2023-11-07T05:31:56Z"}}},"exampleType":"generated"}},"exampleType":"generated"},"88125dae-9af4-4b02-b7cb-4820cd59078d":{"description":"Error","content":{"application/json":{"schema":{"type":"object","required":["error","request_id"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"details":{"type":"object","uniqueKey":"error.details","typeLabel":"object"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"},"request_id":{"type":"string","isRequired":true,"uniqueKey":"request_id","typeLabel":"string"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"code":"\u003cstring>","message":"\u003cstring>","details":{}},"request_id":"\u003cstring>"}}},"exampleType":"generated"}},"exampleType":"generated"},"c1ba1b7f-8c33-40c7-83b0-958233bd30fd":{"description":"Error","content":{"application/json":{"schema":{"type":"object","required":["error","request_id"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"details":{"type":"object","uniqueKey":"error.details","typeLabel":"object"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"},"request_id":{"type":"string","isRequired":true,"uniqueKey":"request_id","typeLabel":"string"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"code":"\u003cstring>","message":"\u003cstring>","details":{}},"request_id":"\u003cstring>"}}},"exampleType":"generated"}},"exampleType":"generated"},"d7d852c1-8fa8-4d86-9916-dc5bc712b1b8":{"description":"Rate limit exceeded","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","required":["error","request_id"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"details":{"type":"object","uniqueKey":"error.details","typeLabel":"object"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"},"request_id":{"type":"string","isRequired":true,"uniqueKey":"request_id","typeLabel":"string"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"code":"\u003cstring>","message":"\u003cstring>","details":{}},"request_id":"\u003cstring>"}}},"exampleType":"generated"}},"exampleType":"generated"}},"security":{},"servers":{"85781a75-edf0-4f0d-9476-6017bf3cdb94":{"url":"https://api.custoden.com"}}},"originalFileLocation":"openapi.yaml"},"subdomain":"custoden","siteName":"Custoden","title":"Scan a lockfile - Custoden","contextualStarterQuestions":[],"navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-11-30T13:41:36.377Z","originalFileLocation":"api-reference/scan-a-lockfile.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"dark\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Checks every package in a lockfile for known malware and vulnerabilities in one request.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Custoden\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/custoden/lGkGp92FwUTtEHP3/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/custoden/lGkGp92FwUTtEHP3/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/custoden/lGkGp92FwUTtEHP3/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/custoden/lGkGp92FwUTtEHP3/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/custoden/lGkGp92FwUTtEHP3/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/custoden/lGkGp92FwUTtEHP3/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/custoden/lGkGp92FwUTtEHP3/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/custoden/lGkGp92FwUTtEHP3/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/custoden/lGkGp92FwUTtEHP3/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Scan a lockfile - Custoden\">\u003cmeta data-mint-head property=\"og:description\" content=\"Checks every package in a lockfile for known malware and vulnerabilities in one request.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Custoden\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.custoden.com/api-reference/scan-a-lockfile\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://custoden.mintlify.site/_mintlify/api/og/v2?division=Packages\u0026amp;title=Scan+a+lockfile\u0026amp;description=Checks+every+package+in+a+lockfile+for+known+malware+and+vulnerabilities+in+one+request.\u0026amp;theme=c3964e2c12ba3c2e1c689eb5\u0026amp;signature=5b9a6d9313553680fdc07139e70abc725af441b249066f49ee961f63e01aff41\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Scan a lockfile - Custoden\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Checks every package in a lockfile for known malware and vulnerabilities in one request.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://custoden.mintlify.site/_mintlify/api/og/v2?division=Packages\u0026amp;title=Scan+a+lockfile\u0026amp;description=Checks+every+package+in+a+lockfile+for+known+malware+and+vulnerabilities+in+one+request.\u0026amp;theme=c3964e2c12ba3c2e1c689eb5\u0026amp;signature=5b9a6d9313553680fdc07139e70abc725af441b249066f49ee961f63e01aff41\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/custoden/lGkGp92FwUTtEHP3/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Custoden\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#e1251b\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.custoden.com/api-reference/scan-a-lockfile\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/scan-a-lockfile.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.custoden.com/#organization\",\"name\":\"Custoden\",\"url\":\"https://docs.custoden.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/custoden/-PLZApaHDUOl5Kki/logo/light.svg?fit=max\u0026auto=format\u0026n=-PLZApaHDUOl5Kki\u0026q=85\u0026s=d1ee441e4d84f21708788e0b71435477\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.custoden.com#website\",\"name\":\"Custoden\",\"url\":\"https://docs.custoden.com\",\"publisher\":{\"@id\":\"https://docs.custoden.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.custoden.com/api-reference/scan-a-lockfile#webpage\",\"url\":\"https://docs.custoden.com/api-reference/scan-a-lockfile\",\"name\":\"Scan a lockfile\",\"description\":\"Checks every package in a lockfile for known malware and vulnerabilities in one request.\",\"dateModified\":\"2026-11-30T13:41:36.377Z\",\"isPartOf\":{\"@id\":\"https://docs.custoden.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.custoden.com/api-reference/scan-a-lockfile#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.custoden.com/api-reference/scan-a-lockfile#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Packages\",\"item\":\"https://docs.custoden.com/api-reference/check-a-package\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Scan a lockfile\",\"item\":\"https://docs.custoden.com/api-reference/scan-a-lockfile\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.custoden.com/api-reference/scan-a-lockfile#apireference\",\"headline\":\"Scan a lockfile\",\"name\":\"Scan a lockfile\",\"description\":\"Checks every package in a lockfile for known malware and vulnerabilities in one request.\",\"url\":\"https://docs.custoden.com/api-reference/scan-a-lockfile\",\"mainEntityOfPage\":{\"@id\":\"https://docs.custoden.com/api-reference/scan-a-lockfile#webpage\"},\"dateModified\":\"2026-11-30T13:41:36.377Z\",\"publisher\":{\"@id\":\"https://docs.custoden.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.custoden.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Custoden\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Custoden\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/api-reference/scan-a-lockfile.md","siteName":"Custoden","nav":{"global":null,"tabs":[{"tab":"Documentation","pages":[{"title":"Documentation","href":"/introduction"}]},{"tab":"API reference","groups":[{"group":"Packages","pages":[{"title":"Check a package","openapi":"GET /v1/packages/{ecosystem}/{name}","href":"/api-reference/check-a-package"},{"title":"Check multiple packages","openapi":"POST /v1/packages/check","description":"Checks up to 10 packages in one request.","href":"/api-reference/check-multiple-packages"},{"title":"Scan a lockfile","openapi":"POST /v1/packages/lockfile","href":"/api-reference/scan-a-lockfile"}]},{"group":"GitHub","pages":[{"title":"Scan a repository","openapi":"GET /v1/github/repos/{owner}/{repo}/scan","description":"A quick security check of a public GitHub repository: dependencies, workflows and CI files in one request.","href":"/api-reference/scan-a-repository"},{"title":"Analyze a GitHub Actions workflow","openapi":"POST /v1/github/workflows/analyze","href":"/api-reference/analyze-a-workflow"},{"title":"Analyze files that run during CI","openapi":"POST /v1/github/files/analyze","href":"/api-reference/analyze-ci-files"},{"title":"Scan recent workflow runs","openapi":"GET /v1/github/repos/{owner}/{repo}/runs","href":"/api-reference/scan-recent-runs"}]}]}]},"basePath":"","title":"Scan a lockfile - Custoden","deploymentId":"dpl_Ab6nteg7kvyK8iL73naC2n7fmsWK","buildId":"dpl_Ab6nteg7kvyK8iL73naC2n7fmsWK","dynamics":["c2aa737661","b0f84f53ff","a9bb46feb3","2b790eda92"],"chunks":["OpenApiReferenceProvider-C6Z1vAfX.js","snippetPresets-Bjd6OXRM.js","utils-QL6OhUyF.js","style-to-object-BY3JEAdk.js","utils-Dsq-HLeF.js","v4-DIgz8zy6.js","addTypeLabelsToSchema-CEYfmkoV.js","conditional-requirements-CFM0id0Q.js","cloneDeep-CHgPjMM8.js","_Uint8Array-IXRJ_ueo.js","isObject-FP1Yky1u.js","Page-B_smDgrp.js","api-description-markdown-DtcP2u3s.js","DynamicMarkdown-DOefW1_8.js","CodeSnippet-C_J7pouP.js","use-playground-group-access-bkOyfPao.js","SectionHeading-Cg4lfWZw.js","ApiExamples-pq4ns9YA.js","usePlaygroundInputsStore-D-gnigmo.js","shallow-DIfWGPrf.js","isEqual-DDFuixlH.js","CodeSnippets-8g5rilZj.js","MethodPill-BnqygvYm.js","getPastedJson-BGXYEZ3P.js","Check2Icon-BBeO3TOS.js","axios-CsQoIw0U.js","Markdown-D5IqLG6A.js","AssistantPageLink-_S2h4i6W.js","dist-DzZqOeCq.js","lib-DMeTj1gb.js","lib-B8HbPgcC.js","katex-Dbtb6Wk7.js","html-void-elements-mCSPHezU.js","marked.esm-CZWythHk.js"]}