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…

POSThttps://apibox.io.vn/v1/dep-audit
Security & Crypto▶ Try it online

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

NameInTypeRequiredDefault
contentbodystringnoThe manifest / lockfile text (or upload file, or send a raw body).
filebodyfilenoThe manifest / lockfile as an upload.
filenamebodystringnoFile name used to detect the format (e.g. yarn.lock).
formatbodystringnoForce 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.
latestbodybooleannofalseAlso fetch the latest version and licence from npm / PyPI / Packagist.
include_devbodybooleannotrueInclude development dependencies.
only_vulnerablebodybooleannofalseList only vulnerable packages.
vulnsbodybooleannotrueSet to false to skip the OSV.dev check (licences / versions only).
max_detailsbodynumberno150Maximum 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}'

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

Start with 1,000 free requests every month. Get free API key →