Repository navigation
Closed
Labels
bugSomething isn't working
Description
Problem
The vulnix CVE gate (nightly `security-scan.yml` + release `release.yml`) fails slowly on NVD feed downloads whenever `nvd.nist.gov` is throttled/degraded (upstream nix-community/vulnix#171, still open). Verified 2026-07-06: a cold run failed all 3 retry attempts over 53 min (`ReadTimeoutError` / `IncompleteRead`). A warm-cache run on `dev` succeeded the same day (only the small `modified` feed needed), proving the cold year-feed crawl is the failure surface.
Compounding factors:
- The combined `actions/cache` skips save on job failure, so partial NVD downloads are discarded and re-dispatches do not converge.
- The cache is branch-scoped: `release/*` and `main` cannot read `dev`'s warm cache.
Proposed solution
Self-host the NVD 2.0 data feeds so scans never depend on `nvd.nist.gov` at runtime.
- New `nvd-mirror-refresh.yml` — the only NVD-facing job. Scheduled + `workflow_dispatch`. Downloads the 7 files vulnix needs (`nvdcve-2.0-{6 years}.json.gz` + `nvdcve-2.0-modified.json.gz`) from NVD with resumable retry (`curl -C - --retry`), validates (`gzip -t`), and — only if all succeed — publishes them as assets on a dedicated `nvd-mirror` release (`gh release upload --clobber`). Non-blocking; needs to succeed only occasionally.
- Point scans at the mirror — add `--mirror https://github.com/vig-os/devcontainer/releases/download/nvd-mirror/\` to the `nix run .#vulnix` invocations in `security-scan.yml` and `release.yml` (`vulnix-gate`). Scans then fetch from GitHub's CDN, not NVD.
- Concentrate resilience in the refresh job — the retry/partial-progress logic belongs in the mirror refresh; scan jobs simplify to the mirror flag (+ optional light retry).
Why (verified facts)
- Pinned vulnix uses `https://nvd.nist.gov/feeds/json/cve/2.0/\` (2.0 feeds; the repo's "1.1" comment is stale). No firm feed-retirement date (extended "until further notice"); vulnix has no API-migration plan and chose NIST-direct as of Oct 2025.
- The mirror is an abstraction layer: if NVD ever changes/retires the feeds, only the refresh job's source changes — vulnix keeps consuming identical files.
- vulnix stays because it is the only scanner that reads the Nix store closure (Trivy is dark there).
Acceptance criteria
- `nvd-mirror-refresh.yml` publishes 7 valid gzip feed assets to the `nvd-mirror` release.
- `security-scan.yml` and `release.yml` vulnix runs use `--mirror` and do not contact `nvd.nist.gov` (grep the log).
- A scan completes fast even while `nvd.nist.gov` is degraded.
- Docs updated (`docs/CONTAINER_SECURITY.md` / `docs/NIX.md`); CHANGELOG `## Unreleased`.
Metadata
Metadata
Assignees
Labels
bugSomething isn't working
Activity
fix(ci): self-host an NVD feed mirror for vulnix scans
fix(ci): self-host an NVD feed mirror for vulnix scans (#871)
ci: publish the mirror via gh-pages branch
fix(ci): move NVD mirror to dedicated vig-os/nvd-mirror Pages host (#872
c-vigo commentedon Jul 6, 2026
Resolved. ✅
A dedicated public mirror —
vig-os/nvd-mirror— serves the 7 NVD 2.0 feeds (nvdcve-2.0-{2021..2026}.json.gz+modified) via GitHub Pages at https://vig-os.github.io/nvd-mirror/, refreshed every 6 h.security-scan.ymland the releasevulnix-gatenow fetch viavulnix --mirror https://vig-os.github.io/nvd-mirror/, sonvd.nist.govoutages can no longer fail a scan or block a release.release/0.4.0branch passed in ~97 s (run 28792515788) while coldnvd.nist.govruns today failed after 53–68 min.Both merged into
release/0.4.0; the nightly path is correct formainonce the cutover lands.chore: release 0.4.0 (#195)
chore: release 0.4.0 (#813)