Repository navigation
fix(security-scan): file a tracking issue for pre-gate failures too - #1550
Merged
Merged
Conversation
The tracking-issue step is guarded on `steps.vulnix-gate.outcome == 'failure'`, so a failure anywhere BEFORE the gate leaves that outcome empty, the guard false, and the run silent -- a red run in Actions and nothing else. An expired .vulnixignore block did exactly that on both lanes on 2026-08-20 (run 32335643087), failing the job's FIRST step. Three workflow-shape assertions, all failing today: the guard is failure() with no gate-outcome conjunct; the script branches on the gate outcome and carries a distinct dedup title per failure class; and the pre-gate body names the failing step from the run's own job records, which needs the actions: read grant. Refs: #1548
The issue-opening step was guarded on `steps.vulnix-gate.outcome == 'failure'`, which is empty whenever a step BEFORE the gate fails. Every failure upstream of the gate -- expired .vulnixignore register, closure build, the vulnix run itself -- therefore died as a red run with no issue, on a workflow whose scheduled runs have no other signal. That is the exact hole #965 restored the issue to close. The guard is now failure() alone. The script branches on the gate outcome and files under one of two titles, so the classes dedup independently per ref (#1237): a red gate keeps its existing title (the open issues filed under it still match), while a pre-gate failure files "run failed before the vulnix gate" and says plainly that the closure went UNSCANNED, not clean. Its body names the failing step from the run's own job records -- the devkit-upgrade reporter's lookup (#1530), scoped to this matrix leg by job-name suffix so the dev lane never reports main's failing step -- which is what the new actions: read grant buys. Verified beyond YAML shape: the run block was extracted and executed against a gh stub for both classes and for the dedup short-circuit. The gate case reproduces the current title and body; the pre-gate case names the dev leg's failing step while main's failure is in the same payload; an existing open issue short-circuits before create. Refs: #1548
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.
Description
The nightly scan's tracking-issue step was guarded on the gate step's
outcome:
steps.vulnix-gate.outcomeis empty whenever a step before the gate fails, sothe guard was false and the run died silently — a red run in Actions and nothing
else, on a workflow whose scheduled runs have no other signal. That is the
exact hole #965 restored the issue to close.
It fired for real on 2026-08-20: an expired
.vulnixignoreblock failed thejob's first step on both lanes
(run 32335643087),
and the failure surfaced only because someone went looking at the workflow list
(#1547).
Refs: #1548
Type of Change
fix-- Bug fixModifiers
!)Changes Made
failure()alone — the whole job is now in scope: registervalidation, NVD cache, closure build, the vulnix run, SBOM generation
issue and each still dedups per ref (Scheduled security scan covers main only — add a dev-ref vulnix scan lane #1237):
Nightly security scan (<ref>): unexcepted HIGH/CRITICAL vulnix findings— unchanged, so issues already open under it keep matching
Nightly security scan (<ref>): run failed before the vulnix gate,whose body states plainly that the closure went unscanned, not clean, and
points at an expired register as the most likely cause
records — the same lookup the
devkit-upgradereporter uses ([FEATURE] devkit-upgrade: report a failed upgrade as a tracking issue (no artifact today) #1530), scoped tothis matrix leg by job-name suffix so the dev lane never reports main's failing
step. That needs the new
actions: readgrant on the jobOn failure:block anddocs/CONTAINER_SECURITY.md§2 updatedto describe both classes
Deliberately not in scope: auto-closing the tracking issue on a later green
run. Today's issue is closed by hand in both classes; changing that is a separate
behavior change, not this hole.
Changelog Entry
Testing
just test)TDD:
tests/test_workflow_scan_failure_reporting.pywas committed red(3 failures) before the fix, and passes after.
Manual Testing Details
YAML shape is not enough for a step that is only ever exercised on a red nightly
run, so the
run:block was extracted and executed against aghstub:GATE_OUTCOME=failureGATE_OUTCOME=''(pre-gate)Validate .vulnixignore exception expirations— correctly the dev leg's step, while the stub payload also carried a different failing step on the main legOpen tracking issue already exists: #4242 -- skipping create, exit 0, no create callactionlint(which runs shellcheck overrun:blocks) is clean, and the fullhook suite is green locally.
Checklist
docs/CONTAINER_SECURITY.md)CHANGELOG.mdin the[Unreleased]section (pasted above)