Skip to content

API Overview

The Vulnpatch API provides programmatic access to vulnerability data aggregated from multiple sources.

Base URL

https://api.vulnpatch.dev/api/v1/

Endpoints Summary

Nixpkgs-Specific Endpoints

These endpoints return data only from the Nixpkgs Security Tracker:

MethodEndpointDescription
GET/nix/statsGet Nixpkgs tracker statistics
GET/nix/cvesGet Nix CVEs with linked PRs
GET/nix/channelsGet NixOS channel status
GET/nix/repology/:packageGet package version info from Repology
GET/issuesList Nixpkgs tracker issues (severity-enriched, with difficulty estimates)
GET/issues/:idGet a specific Nixpkgs tracker issue by number
GET/sourcesList available data sources

Multi-Ecosystem Endpoints

These endpoints aggregate data from OSV.dev across 38+ ecosystems (npm, PyPI, Debian, etc.):

MethodEndpointDescription
GET/statsGet aggregate statistics across all sources
GET/ecosystem-statsGet aggregate ecosystem vulnerability counts
GET/recent-advisoriesGet advisories published in last 12 hours
GET/osv/:packageGet vulnerabilities from OSV.dev
GET/vulns/:packageGet CVE matches with confidence scores
GET/osv-details/:idGet detailed vulnerability information

CVE Endpoints

Direct CVE lookup from the official MITRE CVE List V5:

MethodEndpointDescription
GET/cve/:idGet CVE details by ID (includes EPSS + KEV + data quality score inline)
POST/cve/batchBulk lookup up to 50 CVEs
GET/cve/:id/historyGet CVE change history
GET/cve/:id/at/:dateQuery CVE state at specific date
GET/search?q=term&sort=dateFull-text search across CVEs (sort: date/severity)
GET/mitre/recent?limit=50Latest CVEs from MITRE delta feed (~24h ahead of NVD)

Exploitability Intelligence

MethodEndpointDescription
GET/exploitabilityEPSS scores + CISA KEV status for tracked CVEs
GET/cve/:id/lifecycleFull vulnerability lifecycle timeline (disclosure → patch)
GET/cve/:id/exploit-signalsWeaponization signals (PoC repos, Nuclei, ExploitDB)
GET/cve/:id/ai-assessmentAI-generated plain-English impact assessment
GET/fix-etasFix ETA predictions per CVE
GET/rebuild-impactPackage rebuild impact analysis
GET/rebuild-impact/:nameSingle package rebuild impact

Analytics Endpoints

MethodEndpointDescription
GET/trendingRecently updated vulnerabilities
GET/severity-breakdownVulnerabilities by severity level
GET/fix-rateFix availability statistics
GET/package/:name/historyPackage vulnerability history
GET/package-healthPackage maintenance health scores
GET/analytics/time-to-fixHistorical time-to-fix benchmarks
GET/data-quality/statsCVE data quality score distribution

GitHub Security Advisories

MethodEndpointDescription
GET/ghsaGitHub Security Advisories (requires auth)

Validation & PR Tools

MethodEndpointDescription
POST/pr/validateValidate a nixpkgs PR diff
POST/pr/fixGenerate fixes for PR issues

Remediation Planning

MethodEndpointDescription
POST/remediation/planGenerate minimal upgrade plan to fix CVEs

SBOM & PURL

MethodEndpointDescription
GET/purl/:purlPURL vulnerability lookup
POST/sbomAnalyze SBOM for vulnerabilities (requires auth)
POST/sbom/time-travelAnalyze SBOM exposure at a past date
GET/sbom/formatsSupported SBOM formats and PURL types

The frontend also supports client-side lockfile-to-SBOM generation for: package-lock.json, yarn.lock, pnpm-lock.yaml, Cargo.lock, go.sum, requirements.txt, Gemfile.lock, and flake.lock (experimental). Generated SBOMs can be analyzed via the /sbom endpoint. Vulnerability reports are downloadable as JSON.

Feeds

MethodEndpointDescription
GET/feed/rssRSS feed of recent advisories
GET/feed/atomAtom feed of recent advisories

Knowledge Graph

Relationship-based queries across CVEs, packages, and weaknesses. Powered by Neo4j.

MethodEndpointDescription
GET/graph/statsGraph node and relationship counts
GET/graph/cve/:id/affectedPackages affected by a CVE
GET/graph/cve/:id/relatedRelated CVEs (shared packages/CWEs)
GET/graph/package/:name/vulnsCVEs affecting a package
GET/graph/package/:name/transitiveTransitive vulnerabilities via dependencies
GET/graph/cwe/:id/cvesCVEs by weakness type

Utility Endpoints

MethodEndpointDescription
GET/healthHealth check
GET/versionAPI version info
GET/openapi.jsonOpenAPI specification

Common Parameters

Query Parameters

ParameterTypeDescription
ecosystemstringFilter by ecosystem (e.g., npm, PyPI, Debian)
versionstringFilter by package version

Headers

HeaderDescription
AcceptAlways returns application/json

Response Format

Success Response

json
{
  "success": true,
  "data": {
    // Endpoint-specific data
  },
  "timestamp": "2024-01-15T12:00:00.000Z"
}

Error Response

json
{
  "success": false,
  "error": "Error message describing what went wrong"
}

HTTP Status Codes

CodeDescription
200Success
400Bad request (invalid parameters)
404Resource not found
429Rate limit exceeded
500Internal server error

CORS

The API supports CORS for browser-based applications. All origins are allowed for read-only endpoints.

Caching

Responses include cache headers:

HeaderDescription
X-CacheHIT if served from cache, MISS otherwise
Cache-ControlBrowser caching directives

Rate Limiting

All API endpoints include rate limit headers:

HeaderDescription
X-RateLimit-LimitMaximum requests allowed per window
X-RateLimit-RemainingRequests remaining in current window
X-RateLimit-ResetUnix timestamp when the rate limit resets

Default limits:

  • General API: 30 requests/minute
  • Issues endpoint: 60 requests/minute

When rate limited, you'll receive a 429 response with a Retry-After header.

OpenAPI Specification

The full API specification is available at:

https://api.vulnpatch.dev/openapi.json

Use this to auto-generate clients in your language of choice with tools like OpenAPI Generator.

SDKs & Libraries

Currently, there are no official SDKs. The API is designed to be easily consumed with standard HTTP clients:

bash
curl https://api.vulnpatch.dev/api/v1/stats
javascript
const response = await fetch('https://api.vulnpatch.dev/api/v1/stats');
const data = await response.json();
python
import requests
response = requests.get('https://api.vulnpatch.dev/api/v1/stats')
data = response.json()

Helping secure open source