Optional configuration for base URL and auth token
Subscribes to a client event.
Queries vulnerabilities affecting a specific package version or git commit.
POST /v1/query
Query parameters (package + version, or commit)
Matching vulnerabilities and optional pagination token
Queries vulnerabilities for multiple packages in a single request.
POST /v1/querybatch
Results are returned in the same order as the input queries array.
Array of individual query entries
One result entry per query, in the same order
Returns a VulnerabilityResource for a given OSV ID. The resource can be awaited directly to fetch the full vulnerability record.
GET /v1/vulns/{id}
OSV vulnerability ID (e.g. 'GHSA-jfh8-c2jp-hdp8', 'CVE-2021-44228')
A chainable vulnerability resource
Main entry point for the OSV (Open Source Vulnerabilities) API client.
Example