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-statsResponse
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
| Field | Type | Description |
|---|---|---|
total | number | Total open issues from Nixpkgs security tracker |
bySeverity | object | Breakdown by severity (often unknown since tracker doesn't include CVSS) |
bySeverity.critical | number | Critical severity count |
bySeverity.high | number | High severity count |
bySeverity.medium | number | Medium severity count |
bySeverity.low | number | Low severity count |
bySeverity.unknown | number | Unknown/unrated severity count |
withFix | number | Issues where a fixed version is available |
assigned | number | Issues assigned to a contributor on GitHub |
Example
bash
curl https://api.vulnpatch.dev/api/v1/nix-statsCode 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
Related Endpoints
/api/v1/stats- Combined stats from all sources/api/v1/issues- Full list of Nixpkgs tracker issues
Caching
This endpoint is cached for 5 minutes. The X-Cache header indicates cache status.