Skip to content

Get Nix Stats

Retrieve detailed statistics about open issues from the Nixpkgs Security Tracker.

Data Source

This endpoint returns statistics only for Nixpkgs security tracker issues. For combined stats across all ecosystems, use the /api/v1/stats endpoint.

Endpoint

GET /api/v1/nix-stats

Response

json
{
  "success": true,
  "data": {
    "total": 24,
    "bySeverity": {
      "critical": 0,
      "high": 0,
      "medium": 0,
      "low": 0,
      "unknown": 24
    },
    "withFix": 2,
    "assigned": 6
  },
  "timestamp": "2026-01-30T12:00:00.000Z"
}

Response Fields

FieldTypeDescription
totalnumberTotal open issues from Nixpkgs security tracker
bySeverityobjectBreakdown by severity (often unknown since tracker doesn't include CVSS)
bySeverity.criticalnumberCritical severity count
bySeverity.highnumberHigh severity count
bySeverity.mediumnumberMedium severity count
bySeverity.lownumberLow severity count
bySeverity.unknownnumberUnknown/unrated severity count
withFixnumberIssues where a fixed version is available
assignednumberIssues assigned to a contributor on GitHub

Example

bash
curl https://api.vulnpatch.dev/api/v1/nix-stats

Code Examples

javascript
async function displayNixStats() {
  const response = await fetch('https://api.vulnpatch.dev/api/v1/nix-stats');
  const { data } = await response.json();

  console.log(`Total CVEs: ${data.total}`);
  console.log(`With Fix: ${data.withFix}`);
  console.log(`Assigned: ${data.assigned}`);
}
python
import requests

response = requests.get('https://api.vulnpatch.dev/api/v1/nix-stats')
stats = response.json()['data']

print(f"Total CVEs: {stats['total']}")
print(f"With Fix: {stats['withFix']}")
print(f"Assigned: {stats['assigned']}")

Use Cases

  • Nix dashboards: Display Nixpkgs vulnerability counts
  • Monitoring: Track Nix security trends over time
  • Contributors: Find unassigned issues to work on

Caching

This endpoint is cached for 5 minutes. The X-Cache header indicates cache status.

Helping secure open source