feat(validate-go): risk-acceptance allowlist for the govulncheck gate#272
Conversation
The hard `govulncheck ./...` gate (introduced in #266, un-OOMed in #270/v5.3.2) is unsatisfiable for large consumers: it fails on reachable advisories that have no upstream fix (`Fixed in: N/A`), wedging every Go PR through no fault of the PR. Scan in JSON mode and fail only on reachable findings whose ID is not in an optional consumer-owned `.govulncheck-allow.txt`. With no allowlist file the behaviour is unchanged (strict). Fixes #271 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
CI status note (one unrelated transient flake; this PR's own logic could not be exercised by rw's CI).
|
…ry-run test)
The `[Test] Delete Workflow Runs - All Workflows` job hit a GitHub-API HTTP 500
("other side closed") while paginating runs in dry-run mode; its sibling
Minimal/Specific variants passed. Unrelated to this diff (validate-go jobs skip
on this repo). Empty re-trigger commit (same tree) to re-run CI - Required Checks.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
🎉 This PR is included in version 5.4.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Merge-ready — cleared the CI flake; sole remaining blocker is GitHub's mergeability recompute. This PR is promoted, the required The only thing not satisfied is GitHub's internal Once this lands, the release pipeline cuts a new |
Implements the mechanism proposed in #271.
Problem
The
🛡️ Vulnerability Scangate added in #266 runs a hardgovulncheck ./...and fails the PR on exit 3 (any reachable advisory). After the OOM fix (#270, released v5.3.2) the scan completes on large modules — and reveals the gate is unsatisfiable for a large consumer: govulncheck reports reachable vulnerabilities with no upstream fix (Fixed in: N/A), so no dependency bump can clear them. The gate then blocks every Go PR on that consumer, and will do so on any repo the moment a new advisory lands for a reachable-but-unpatched symbol.Reproduced locally against ksail
main(go 1.26.3):GOMEMLIMIT=12GiB govulncheck ./...completes (577s / 12.4 GB) but exits 3 on 4 advisories —GO-2026-4887,GO-2026-4883(docker/docker, Moby daemon-side),GO-2025-3547,GO-2025-3521(k8s.io/kubernetes, apiserver-side) — allFixed: N/A, all reached only via package-init / generic-poll utility chains (ksail is a client CLI, not the Moby daemon or a kube-apiserver).Change
Run govulncheck in JSON mode (which exits 0 on findings) and fail only on reachable findings whose advisory ID is not listed in an optional, consumer-owned
.govulncheck-allow.txtat the repo root:govulncheck ./....len(Trace)>0 && Trace[0].Function != ""), so imported-but-unreachable advisories still never count.GOMEMLIMIT/timeout-minutesfrom fix(validate-go): bound govulncheck memory so it stops OOM-killing the runner #270.Validation
actionlint: no new findings (only the pre-existingcode-qualitypermission-scope false-positive, present onmain); embeddedshellcheckclean on the new step.if: github.repository != 'devantler-tech/reusable-workflows', so rw's own CI can't exercise it — the local unit tests above stand in.Policy (maintainer's call — separate from this mechanism)
This PR is the mechanism only; default behaviour is unchanged. Whether to accept the four ksail advisories above (and with what justification) is a security-policy decision for a follow-up
.govulncheck-allow.txtin the ksail repo.Links