Dependency Audit API
Find known vulnerabilities (OSV.dev), fixed versions, latest releases and licences for the packages in a lockfile or manifest: npm, pip, Go, Composer…
Upload or paste a manifest or lockfile: package.json, package-lock.json (v1–v3), yarn.lock (classic and Berry), pnpm-lock.yaml, requirements.txt, poetry.lock, Pipfile.lock, composer.lock / composer.json, go.sum / go.mod, Gemfile.lock or Cargo.lock. The format is detected from filename or the content. Every package and version is checked against OSV.dev (Google’s open vulnerability database, which aggregates the GitHub Advisory Database, PyPA, Go, RustSec and others) in batches of up to 1,000.
Each vulnerable package lists its advisories with GHSA / CVE ids, summary, severity (computed from the CVSS v3 vector, or the advisory’s own rating), the versions that fix it and fixed_in (the first fixed version above yours); upgrade_to is the lowest version that fixes all of them. With latest=true the latest release is fetched from npm, PyPI or Packagist for direct dependencies (all packages for small files). Licences from the lockfile or registry are normalised to SPDX (spdx-correct) and flagged as weak, strong or network copyleft.
For manifests with ranges (^1.2.3, >=3.0) the lowest allowed version is checked and marked version_from_range: use a lockfile for exact results. Advisory details are cached for a day and fetched for at most 150 advisories per call (max_details, up to 300). Vulnerability data: OSV.dev, credited in each response.
Parameters
| Name | In | Type | Required | Default | |
|---|---|---|---|---|---|
content | body | string | no | The manifest / lockfile text (or upload file, or send a raw body). | |
file | body | file | no | The manifest / lockfile as an upload. | |
filename | body | string | no | File name used to detect the format (e.g. yarn.lock). | |
format | body | string | no | Force the format: package.json, package-lock.json, yarn.lock, pnpm-lock.yaml, requirements.txt, poetry.lock, pipfile.lock, composer.lock, composer.json, go.sum, go.mod, gemfile.lock, cargo.lock. | |
latest | body | boolean | no | false | Also fetch the latest version and licence from npm / PyPI / Packagist. |
include_dev | body | boolean | no | true | Include development dependencies. |
only_vulnerable | body | boolean | no | false | List only vulnerable packages. |
vulns | body | boolean | no | true | Set to false to skip the OSV.dev check (licences / versions only). |
max_details | body | number | no | 150 | Maximum advisories whose details are fetched (0–300). |
Example
curl -X POST "https://apibox.io.vn/v1/dep-audit" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"content":"{\"dependencies\":{\"lodash\":\"4.17.20\"}}","filename":"package.json","latest":true}'const res = await fetch('https://apibox.io.vn/v1/dep-audit', {
method: 'POST',
headers: {
Authorization: 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json',
},
body: JSON.stringify({
"content": "{\"dependencies\":{\"lodash\":\"4.17.20\"}}",
"filename": "package.json",
"latest": true
}),
});
const data = await res.json();
console.log(data);import requests
res = requests.post(
"https://apibox.io.vn/v1/dep-audit",
headers={"Authorization": "Bearer YOUR_API_KEY"},
json={"content": "{\"dependencies\":{\"lodash\":\"4.17.20\"}}", "filename": "package.json", "latest": True},
timeout=30,
)
print(res.json())<?php
$ch = curl_init('https://apibox.io.vn/v1/dep-audit');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => ['Authorization: Bearer YOUR_API_KEY', 'Content-Type: application/json'],
CURLOPT_POSTFIELDS => '{"content":"{\\"dependencies\\":{\\"lodash\\":\\"4.17.20\\"}}","filename":"package.json","latest":true}',
]);
$response = curl_exec($ch);
print_r(json_decode($response, true));Response
{
"format": "package.json",
"packages_total": 1,
"summary": {
"vulnerable_packages": 1,
"vulnerabilities": 4,
"by_severity": {
"high": 2,
"medium": 2
},
"outdated_packages": 1,
"latest_checked": 1,
"licences": {
"MIT": 1
},
"copyleft_packages": 0
},
"packages": [
{
"name": "lodash",
"version": "4.17.20",
"ecosystem": "npm",
"declared": "4.17.20",
"dev": false,
"direct": true,
"vulnerable": true,
"vulnerabilities": [
{
"id": "GHSA-35jh-r3h4-6jhm",
"aliases": [
"CVE-2021-23337"
],
"summary": "Command Injection in lodash",
"severity": "high",
"cvss_score": 7.2,
"cvss_vector": "CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H",
"fixed_versions": [
"4.17.21"
],
"fixed_in": "4.17.21",
"published": "2021-05-06T16:05:51Z",
"url": "https://osv.dev/vulnerability/GHSA-35jh-r3h4-6jhm"
},
{
"id": "GHSA-r5fr-rjxr-66jc",
"aliases": [
"CVE-2026-4800"
],
"summary": "lodash vulnerable to Code Injection via `_.template` imports key names",
"severity": "high",
"cvss_score": 8.1,
"fixed_versions": [
"4.18.0"
],
"fixed_in": "4.18.0",
"url": "https://osv.dev/vulnerability/GHSA-r5fr-rjxr-66jc"
},
"…"
],
"upgrade_to": "4.18.0",
"latest": "4.18.1",
"outdated": true,
"licence": {
"declared": "MIT",
"spdx": "MIT",
"ids": [
"MIT"
],
"copyleft": "none"
}
}
],
"attribution": "Vulnerability data from OSV.dev (https://osv.dev), aggregating GitHub Advisory Database (CC-BY 4.0), PyPA, Go, RustSec and other sources under their licences."
}
Use cases
- Check a project handed over by an agency before taking it into production
- Light vulnerability gate in CI without installing a scanner
- List copyleft licences in dependencies before shipping a product
- See which packages are outdated and which upgrade fixes the advisories
FAQ
Where does the vulnerability data come from?
From OSV.dev, the open database run by Google that merges the GitHub Advisory Database, PyPA, Go vulndb, RustSec, RubySec and other sources. Each response carries the attribution.
Why do I see version_from_range?
package.json, composer.json and requirements.txt with >= only give ranges. The API checks the lowest version the range allows; the version you actually install may be newer. Send the lockfile for exact versions.
Is pom.xml or build.gradle supported?
Not yet. Supported: npm, yarn, pnpm, pip, Poetry, Pipenv, Composer, Go modules, Bundler and Cargo files.
Related APIs
Hash Generator
Compute MD5, SHA-1, SHA-256, SHA-384, SHA-512 and CRC32 of text or files in one call, as hex or base64, with optional HMAC signing.
B64Encode / Decode
Encode or decode text as Base64, Base64URL, hex, URL encoding, HTML entities, Unicode escapes, ROT13 or binary with one simple API call.
***Password Generator
Generate cryptographically secure random passwords (4–256 chars, up to 100 at once) or check a password’s strength, entropy and estimated crack time.