Skip to content

ci(validate-go): restore reachable-advisory allowlist via govulncheck-action fork#276

Merged
devantler merged 2 commits into
mainfrom
ci/govulncheck-allowlist-via-fork
Jun 2, 2026
Merged

ci(validate-go): restore reachable-advisory allowlist via govulncheck-action fork#276
devantler merged 2 commits into
mainfrom
ci/govulncheck-allowlist-via-fork

Conversation

@devantler
Copy link
Copy Markdown
Contributor

@devantler devantler commented Jun 2, 2026

🤖 Generated by the Daily AI Assistant

Problem

The 🛡️ Vulnerability Scan job is the org-wide required workflow (org ruleset "Require workflows to pass before merging for Go", id 10320335), which pins this file at refs/heads/main and runs it on every Go PR org-wide. Since #273 moved the scan to the official golang/govulncheck-action, the gate fails on any reachable advisory with no in-workflow override.

That wedges every Go PR on a consumer that links a reachable advisory with no upstream fix (Fixed in: N/A) — e.g. ksail, which links server-side k8s.io/kubernetes / docker/docker symbols transitively. ksail shipped a .govulncheck-allow.txt (risk-accepting 4 such advisories) expecting the v5.4.0 allowlist gate, but that logic was removed in #273, so the file is read by nothing and every ksail Go PR shows a red vuln scan.

What this does

Splits the scan on whether the consumer commits a .govulncheck-allow.txt:

  • No allowlist file ⇒ official action, unchanged. A detect step sets present=false and the scan runs the official golang/govulncheck-action exactly as today — a strict gate that blocks on any reachable advisory. This is the path for every consumer except opt-in ones, so the fork never touches the vast majority of Go repos (minimal blast radius — addresses the reviewer's supply-chain concern).
  • Allowlist file present ⇒ opt-in fork path. Only a repo that ships .govulncheck-allow.txt (one accepted GO-YYYY-NNNN per line; # comments + blanks ignored) takes the devantler/govulncheck-action@feat/allow-file fork, which adds an allow-file input and fails only on reachable advisories not listed.

Blast radius

This file is the org-wide Go gate (ruleset tracks main), so merging applies to all Go consumers immediately. Safe because the default (no-allowlist) path is the official action, byte-for-byte the same strict gate; only repos that add an allowlist file change behavior and reach the fork.

Validation

  • actionlint -ignore code-quality on this file: clean (the code-quality scope is the pre-existing false positive CI already ignores).
  • Fork feature (action.yml +69/-2) unit-tested under bash: allowlisted → excused, non-allowlisted reachable → blocks, strict/no-file → blocks all, all-allowlisted → passes.
  • README updated to document the opt-in .govulncheck-allow.txt.

Follow-ups

  1. Upstream (maintainer-side). golang/govulncheck-action is a Gerrit-backed Go-project mirror — contributions go through go-review.googlesource.com and require a signed Google CLA, so this can't be filed via a GitHub PR autonomously. The fork is Gerrit-ready at devantler/govulncheck-action@feat/allow-file; once allow-file lands upstream, swap the opt-in uses: back to golang/govulncheck-action@<sha> and delete the fork.
  2. After this merges, ksail's 🛡️ Vulnerability Scan goes green and unblocks #4986 / #4945 / #4905. It must not be added to ksail's required-checks gate until then, or it wedges all Go PRs.

Supersedes #275 (which re-implemented the scan as an in-workflow shim — "our own solution" — and was closed per maintainer review in favor of this official-action-preserving approach).

…-action fork

The govulncheck gate fails on ANY reachable advisory with no in-workflow
override — #273 dropped the prior .govulncheck-allow.txt allowlist when moving
to the official action. That wedges every Go PR on a consumer that links a
reachable advisory with no upstream fix (Fixed in: N/A), e.g. ksail, which
links server-side k8s/docker symbols transitively.

Point the scan at devantler/govulncheck-action@feat/allow-file (a fork adding
an allow-file input) and pass allow-file: .govulncheck-allow.txt. The gate
stays strict by default: a consumer with no allowlist file blocks on any
reachable advisory, unchanged. A consumer that ships .govulncheck-allow.txt can
risk-accept specific unfixable advisories with a version-controlled justification.

Bridge only — swap back to golang/govulncheck-action once the upstream
allow-file change lands.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings June 2, 2026 16:57
@github-project-automation github-project-automation Bot moved this to 🫴 Ready in 🌊 Project Board Jun 2, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the org-wide reusable Go validation workflow to reintroduce a consumer opt-in allowlist for reachable govulncheck advisories (via a forked govulncheck-action that adds an allow-file input), so repos can explicitly risk-accept advisories that have no upstream fix without wedging all Go PRs.

Changes:

  • Switches the 🛡️ Vulnerability Scan step to a fork of govulncheck-action that supports allow-file.
  • Passes allow-file: .govulncheck-allow.txt to enable opt-in, version-controlled advisory allowlisting.
  • Expands in-workflow documentation describing the rationale and swap-back intent.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/validate-go-project.yaml
Comment thread .github/workflows/validate-go-project.yaml Outdated
…for opt-in allowlist

Split the vuln scan on whether the consumer commits a `.govulncheck-allow.txt`:
repos with no allowlist keep using the official golang/govulncheck-action
(strict, unchanged); only opt-in repos take the thin devantler fork that adds
the `allow-file` input. This minimises the fork's blast radius — the official
action stays on the path for every consumer except ones explicitly accepting a
no-upstream-fix advisory. Also document the opt-in in the README and drop the
inaccurate "feature request filed" wording (upstream is Gerrit-backed).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@devantler devantler marked this pull request as ready for review June 2, 2026 18:20
Copilot AI review requested due to automatic review settings June 2, 2026 18:20
@devantler devantler merged commit a4a6bdd into main Jun 2, 2026
40 checks passed
@devantler devantler deleted the ci/govulncheck-allowlist-via-fork branch June 2, 2026 18:20
@github-project-automation github-project-automation Bot moved this from 🫴 Ready to ✅ Done in 🌊 Project Board Jun 2, 2026
@botantler
Copy link
Copy Markdown
Contributor

botantler Bot commented Jun 2, 2026

🎉 This PR is included in version 5.4.3 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@botantler botantler Bot added the released an issue that has been solved in a release label Jun 2, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

released an issue that has been solved in a release

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

2 participants