Repository navigation
ci(security): add dev-ref vulnix scan lane - #1244
Merged
Merged
Conversation
Scan the dev image closure alongside main by making scan-nix-image a ref matrix ([main, dev]) with fail-fast disabled. The dev leg reaches dev's closure, .vulnixignore register and machinery purely through the checkout ref, files a ref-distinct deduplicated tracking issue, and scopes its findings artifact per ref so the two legs never collide. A weekly nixpkgs bump or an expiring .vulnixignore exception on dev now surfaces days early instead of mid-release-train. Also fix the stale nightly-schedule comment (no workflow runs at 04:00 UTC anymore) and refresh the trigger/jobs/on-failure header prose. Refs: #1237
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.
Summary
Closes #1237.
security-scan.yml's nightly vulnix gate checked out noref, so scheduled runs only ever scanned the default branch (main) closure.dev's closure was only scanned at RC time (or by manual dispatch), so anixpkgs-unstablebump introducing an unexcepted HIGH/CRITICAL — or a time-boxed.vulnixignoreexception expiring (e.g. the gawk exception expiring 2026-07-28) — first surfaced mid-release-train, the most expensive moment.This adds a
dev-ref scan lane that reuses the existing machinery unchanged and files an ordinary tracking issue days earlier.Design:
refmatrix (not a second job)Per the issue ("a second scheduled job or matrix leg") and the repo DRY/minimal-diff rules, I chose a matrix over a duplicated job — least duplication, single source of truth for the scan steps:
scan-nix-imagegainsstrategy.matrix.ref: [main, dev]withfail-fast: falseso a red main lane never cancels the dev scan (independent signals).ref: ${{ matrix.ref }}. Local composite actions (setup-env), the flake (devkitImageEnv), and the.vulnixignoreregister all resolve from the checked-out tree, so the dev leg exercises dev's machinery/register unchanged — exactly as the issue specifies. The run itself still executes from the default branch (scheduled trigger).check-expirations, the closure build, vulnix (via the nvd-mirror),vulnix-gate, and the deduplicated tracking-issue step.Nightly security scan (main|dev): …) and the findings artifact is ref-scoped (nix-image-cve-scan-<ref>) so the two matrix legs never collide on issue dedup or artifact name. The ref is passed to the shell via anenv:var (not interpolated intorun:), keeping zizmor's template-injection audit clean.Drive-by (per the issue)
Fixed the stale schedule comment (
staggered after nightly CI at 04:00 UTC— no workflow runs at 04:00 anymore) and refreshed the trigger/jobs/on-failure header prose to describe the two-ref matrix.Testing
Workflow-only change with no runtime test surface, so TDD is skipped for that reason. Verification:
pre-commit run --all-files(just precommit) fully green (actionlint, yamllint, sync-manifest, agent-identity, etc.).zizmor 1.25.2 --config zizmor.ymlrun against the changed file and the base version: both report the identical4 findings (2 suppressed)— this change introduces zero new zizmor findings (the two shown,artipackedon checkout andtemplate-injectionon the pre-existing summary step, are unchanged pre-existing findings; not baselined by me). CI's zizmor gate only auditsassets/workspace/.github/workflows/, which this file is not part of.Caveat (same as
ghcr-cleanup.yml)The
schedule:trigger only fires from the default branch, so the new dev lane goes live at the next promote (when this reaches main). Until then it is exercisable viaworkflow_dispatch.