Repository navigation
fix(ci): self-host an NVD feed mirror for vulnix scans - #871
Merged
Merged
Conversation
nvd.nist.gov is chronically throttled (nix-community/vulnix#171): cold scans crawl the full NVD year-feed set for tens of minutes and fail with ReadTimeoutError/IncompleteRead, blocking both the nightly gate and the release publish gate. Add nvd-mirror-refresh.yml — the only job that talks to NVD — which downloads the NVD 2.0 feed files with resumable retry, validates them, and republishes them as assets on the nvd-mirror release. Point the vulnix invocations in security-scan.yml and the release vulnix-gate at that mirror via --mirror, so NVD data is fetched from GitHub's CDN and an NVD outage can no longer fail a scan or block a release. The scheduled refresh activates once this reaches the default branch via the cutover; the mirror is bootstrapped out-of-band until then. Refs: #870
c-vigo
enabled auto-merge
July 6, 2026 11:19
2 tasks done
c-vigo
added a commit
that referenced
this pull request
Jul 6, 2026
) Follow-up to #871 (already merged). Refs #870. ## Why #871 landed the mirror as **release assets in this repo**, but that approach is blocked by **GitHub immutable releases**: assets can't be updated/clobbered after creation, and once the `nvd-mirror` tag is used by an immutable release it's poisoned (can't recreate). The in-repo `nvd-mirror-refresh.yml` also can't run — a new workflow is only schedulable/dispatchable from the default branch, and `main` is still the pre-cutover Debian world. So as merged, `release/0.4.0` points `vulnix --mirror` at a release-asset URL that can't exist → the gate would fail. ## Change - **Remove** the in-repo `nvd-mirror-refresh.yml`. - Point `vulnix --mirror` (in `security-scan.yml` and the `release.yml` `vulnix-gate`) at the **dedicated public mirror** [`vig-os/nvd-mirror`](https://github.com/vig-os/nvd-mirror), served on GitHub Pages: `https://vig-os.github.io/nvd-mirror/`. - Update docs + CHANGELOG. The dedicated repo owns the one job that talks to NVD (its default branch, so it schedules/dispatches immediately — no cutover dependency). It is **already live and serving** all 7 feeds (`nvdcve-2.0-{2021..2026}.json.gz` + `modified`, 117 MB, HTTP 200 + valid gzip), bootstrapped from a known-good local copy. ## Test plan - [x] `https://vig-os.github.io/nvd-mirror/nvdcve-2.0-*.json.gz` → 200, valid gzip (all 7). - [x] Dispatch `security-scan.yml` on this branch → **passed in 97 s** via the mirror ([run 28792515788](https://github.com/vig-os/devcontainer/actions/runs/28792515788)); `NVD_MIRROR=https://vig-os.github.io/nvd-mirror/`, gate green, no `nvd.nist.gov` cold-crawl.
This was referenced Jul 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #870.
Problem
nvd.nist.govis chronically throttled/unstable (nix-community/vulnix#171). Cold vulnix runs crawl the full NVD year-feed set for tens of minutes and fail withReadTimeoutError/IncompleteRead— verified 2026-07-06, a cold run failed all 3 retries over 53 min, blocking both the nightly gate and the release publish gate.Change
nvd-mirror-refresh.yml— the only job that talks to NVD. Downloads the 7 NVD 2.0 feed files (nvdcve-2.0-<6 years>.json.gz+modified) with resumable retry (curl -C -), validates them (gzip -t), and republishes them as assets on thenvd-mirrorrelease. Never clobbers the mirror with a partial set.security-scan.yml+release.ymlvulnix-gatenow runvulnix --mirror <nvd-mirror release>/, fetching NVD data from GitHub's CDN instead ofnvd.nist.gov. An NVD outage can no longer fail a scan or block a release.docs/CONTAINER_SECURITY.md) + CHANGELOG.Why a mirror (not just retries)
The mirror localizes the NVD dependency to one job: if the feeds ever change/retire, only the refresh job's source changes — vulnix keeps consuming identical files. vulnix has no NVD-API-migration plan and is on the current 2.0 feeds (no firm retirement date).
Sequencing (important)
mainis still the pre-cutover Debian world, so the scheduled refresh activates only once this rides the cutover onto the newmain.nvd-mirrorrelease is bootstrapped out-of-band (the 7 feeds uploaded manually), so this release's ownvulnix-gatecan use the mirror immediately.Test plan
nvd-mirrorrelease has 7 valid gzip feed assets (bootstrapped).security-scan.ymlon this branch →Run vulnixfetches from.../nvd-mirror/…, notnvd.nist.gov; completes fast even while NVD is degraded.nvd-mirror-refresh.ymlauto-refreshes onmain.