{"uid":"cap_3EcIE_1gQ09c-abPYZacA","slug":"dependency-risk-preflight-4dc6b2d6","name":"Dependency Risk Preflight","description":"Deterministic npm/PyPI dependency vulnerability preflight for a single package+version -- a package security check before install/update. Checks OSV.dev vulnerabilities, the CISA Known Exploited Vulnerabilities catalog, and registry deprecation/license/yanked-release metadata in one call, returning a PASS/WARN/BLOCK/UNKNOWN verdict with reason codes. Built for autonomous coding agents and CI/package-update agents to call before installing or upgrading a dependency.","url":"https://dependency-risk-preflight.dependency-risk-preflight.workers.dev/v1/dependency/preflight?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"input":{"type":"object","required":["ecosystem","package","version"],"properties":{"package":{"type":"string","maxLength":214,"minLength":1},"version":{"type":"string","maxLength":100,"minLength":1},"ecosystem":{"enum":["npm","PyPI"],"type":"string","description":"Case-sensitive."}},"additionalProperties":false},"output":{"type":"object","required":["schema_version","request","verdict","reason_codes","vulnerabilities","checked_at"],"properties":{"verdict":{"enum":["PASS","WARN","BLOCK","UNKNOWN"],"type":"string"},"reason_codes":{"type":"array","items":{"type":"string"}},"schema_version":{"type":"string","const":"1"},"recommended_version":{"type":["string","null"]},"vulnerability_count":{"type":"integer"}}}},"responseSchema":{"example":{"license":{"raw":"MIT","source":"npm-registry","status":"known","spdx_validated":false},"request":{"package":"lodash","version":"4.17.15","ecosystem":"npm"},"sources":[{"name":"OSV","status":"available","checked":true},{"name":"CISA_KEV","status":"available","checked":true,"catalog_version":"2026.08.11"},{"name":"NPM_REGISTRY","status":"available","checked":true}],"verdict":"WARN","registry":{"exists":true,"deprecated":false,"project_status":null,"release_yanked":null,"deprecation_message":null},"checked_at":"2026-08-13T00:00:00.000Z","reason_codes":["MODERATE_VULNERABILITY"],"schema_version":"1","vulnerabilities":[{"id":"GHSA-example-0000","aliases":["CVE-2020-28500"],"severity":"MODERATE","fixed_versions":["4.17.21"],"known_exploited":false}],"recommended_version":"4.17.21","vulnerability_count":1,"recommended_version_basis":"lowest version resolving all known findings","vulnerabilities_truncated":false}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.05","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"registry","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.05/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.05","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.05","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_9kSSsjXpKgT0mgyNbSorw","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.05","costPer":"request","priority":0,"asset":null,"unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Checks a single npm or PyPI package+version for vulnerabilities, CISA KEV status, deprecation, license, and yanked releases, returning a PASS/WARN/BLOCK/UNKNOWN verdict before install or upgrade.","exampleAgentPrompt":"Before I install lodash version 4.17.15 from npm, run a security preflight check — look up any known vulnerabilities, check if it's on the CISA exploited list, and tell me if it's deprecated or has a bad license, then give me a PASS or BLOCK verdict.","exampleUseCases":[{"title":"CI gate before dependency install","prompt":"We're about to install numpy version 1.24.0 from PyPI in our pipeline — can you run a preflight check for known CVEs, CISA exploited vulnerabilities, and any yanked-release flags, and block the build if the verdict isn't PASS?"},{"title":"Autonomous agent upgrade safety check","prompt":"My coding agent wants to bump axios from 0.21.1 to 0.21.2 in our npm project — check whether 0.21.2 is safe: any vulnerabilities, exploits in the wild, or deprecation issues before it commits the change?"},{"title":"License and vulnerability audit before PR merge","prompt":"Before we merge this PR that adds requests 2.27.1 as a PyPI dependency, do a preflight check on it — I need to know the license, whether it's been yanked, and if there are any MODERATE or higher severity vulnerabilities with a recommended safe version."}],"resultDescription":"Returns a JSON object with a top-level verdict (PASS, WARN, BLOCK, or UNKNOWN), an array of reason_codes explaining the verdict, a list of vulnerabilities with IDs, aliases, severity, fixed versions, and known_exploited flag, a recommended_version pointing to the lowest version resolving all findings, registry metadata (deprecated, yanked, deprecation_message), license info with SPDX status, and a checked_at timestamp with source availability for OSV, CISA KEV, and the registry.","failureModes":["Package or version not found in registry — verdict returns UNKNOWN with appropriate reason code","OSV or CISA KEV source unavailable — sources array shows checked:false, verdict may be UNKNOWN","Invalid ecosystem value — request rejected with validation error","Malformed or missing package/version fields — returns error response","Network timeout to upstream data sources — partial results with unavailable source flags"],"whenToPreferThis":"Use this endpoint when an autonomous coding agent, CI pipeline, or package-update bot needs a deterministic, single-call safety gate before installing or upgrading any npm or PyPI dependency. It is purpose-built for agentic workflows, combining OSV vulnerabilities, CISA KEV known-exploit status, and registry metadata (deprecation, license, yanked releases) into one structured verdict — eliminating the need to stitch together multiple security APIs yourself. Prefer it over generic vulnerability scanners when you need a machine-readable PASS/WARN/BLOCK/UNKNOWN verdict with reason codes that an agent can act on without further parsing.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-10T18:33:33.261Z","isFirstParty":false,"canonicalSlug":"dependency-risk-preflight-4dc6b2d6"}