OSV Advisories
v0.3.0Query OSV.dev for known vulnerabilities by package and version, and scan lockfiles in batch.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
query_package Query OSV for one package
Return the OSV advisories affecting one package at one version (or every known advisory for the package when version is omitted). Each advisory carries its id, aliases such as CVE ids, summary, severity, affected ranges, fixed versions and reference URLs. Calls POST https://api.osv.dev/v1/query.
| Parameter | Type | Description |
|---|---|---|
ecosystem * | string | OSV ecosystem name, case-insensitive. One of: AlmaLinux, Alpine, Android, Bioconductor, Bitnami, Chainguard, ConanCenter, CRAN, crates.io, Debian, GHC, GitHub Actions, Go, Hackage, Hex, Linux, Mageia,… |
name * | string | Package name as the ecosystem spells it (npm scope included, Go module path, PyPI project name). |
version | string | Exact installed version. For Go, with or without the leading v. |
query_batch Query OSV for many packages
Return, for each package in the list (up to 1000), the ids of OSV advisories that affect it. Ids only; call get_vulnerability for details. Calls POST https://api.osv.dev/v1/querybatch in chunks of 100.
| Parameter | Type | Description |
|---|---|---|
packages * | array |
scan_lockfile Scan a lockfile against OSV
Parse a lockfile and batch-query OSV for every exactly pinned dependency in it. Supported formats: package-lock.json (lockfileVersion 1 to 3), requirements.txt (only == pins are queried; other specifiers are listed as skipped), poetry.lock, go.sum (basic: every module line, leading v removed), Cargo.lock (registry packages only), Gemfile.lock (GEM specs only) and uv.lock (registry packages only). Supply either path (a local file up to 10485760 bytes) or content (the file text). Format is detected from the file name and content unless given. Returns the packages with advisories, the ids per pac…
| Parameter | Type | Description |
|---|---|---|
content | string | Lockfile text, as an alternative to path. |
filename | string | Original file name, used for format detection when content is supplied. |
format | string | |
include_details | boolean | Also fetch the first 20 advisories in full. Default false. |
path | string | Path to the lockfile on this machine. |
get_vulnerability Get one OSV advisory
Fetch one advisory by OSV id (for example GHSA-xxxx-xxxx-xxxx, PYSEC-2023-1, GO-2024-1234, or a CVE id that OSV aliases). Returns the summary plus the raw OSV record. Calls GET https://api.osv.dev/v1/vulns/{id}.
| Parameter | Type | Description |
|---|---|---|
id * | string |