Deptic Logo

CVE Detection

How vulnerability matching works:

Deptic queries two databases for every component:

1. OSV.dev (Open Source Vulnerabilities)

Endpoint: POST https://api.osv.dev/v1/query

Deptic sends batched queries — up to 20 concurrent requests with a semaphore. Each query includes the exact package name, ecosystem, and version.

json
POST https://api.osv.dev/v1/query
{
  "package": {
    "name": "lodash",
    "ecosystem": "npm"
  },
  "version": "4.17.11"
}

2. NVD (National Vulnerability Database)

Used as a secondary source for CVEs not yet indexed in OSV.

Severity levels:

LevelCVSS ScoreColorAction Required
CRITICAL9.0–10.0RedImmediate — block CI/CD
HIGH7.0–8.9OrangeUrgent — fix within 72h
MEDIUM4.0–6.9AmberPlanned — fix in next sprint
LOW0.1–3.9GrayInformational — monitor

Fix version resolution:

When a CVE is detected, Deptic does not simply use the fixed_version from OSV (which represents the minimum patched version — which may itself have other CVEs). Instead:

1

Query OSV for ALL vulnerabilities for this package across all versions: POST /v1/query with no version field

2

Build a complete set of all affected versions from the response

3

Fetch all available versions from the package registry (npm/PyPI/Maven Central)

4

Sort versions descending. First version NOT in the affected set = clean version

5

Double-verify: call OSV with the specific version — confirm zero vulnerabilities

6

Cache result in Redis (TTL 6 hours): key format clean-version:{ecosystem}:{package}

Ecosystem mapping for OSV:

Deptic ecosystemOSV ecosystem string
npmnpm
pipPyPI
mavenMaven
goGo
rustcrates.io
rubyRubyGems
phpPackagist

Rate limits:

OSV.dev has no API key requirement and a generous rate limit. Deptic uses a semaphore of max 20 concurrent requests. For large scans (1,000+ components), CVE matching takes 15–45 seconds.