Skip to content

Build CI on the latest stable Go, not go.mod's floor - #36

Merged
richhaase merged 1 commit into
mainfrom
ci/go-version-stable
Jul 25, 2026
Merged

Build CI on the latest stable Go, not go.mod's floor#36
richhaase merged 1 commit into
mainfrom
ci/go-version-stable

Conversation

@richhaase

Copy link
Copy Markdown
Owner

Reciprocal of the fix that landed in go-cli-template.

Every workflow resolved its toolchain with go-version-file: go.mod. That directive is a language floor, so the toolchain it selects is the .0 release of that line, carrying whatever stdlib CVEs have been fixed since — which is how govulncheck came to fail with 13 findings during the port.

My fix then was to raise the floor to 1.26.5. That works, but it binds two unrelated concerns: every future patch release with a security fix would need another go.mod bump just to keep CI quiet.

CI now asks for stable, so it always builds on the current patched release, and go.mod goes back to naming the minimum language version the code actually needs (1.26.0, for the generalised new(expr) used in tests).

Verified: make check passes, go mod tidy is a no-op, and govulncheck reports no vulnerabilities on the current toolchain.

Every workflow derived its toolchain from go.mod's `go` directive. That
directive is a language floor, so the toolchain it selects is the .0
release of that line, carrying whatever stdlib CVEs have been fixed
since. My earlier fix for that raised the floor to 1.26.5, which worked
but binds the two concerns together: each future patch release with a
security fix would need another go.mod bump to keep govulncheck quiet.

CI now asks for `stable` and always builds on the current patched
release, while go.mod goes back to naming the minimum language version
the code actually needs. This is the approach the template settled on
after the same problem surfaced there.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@richhaase
richhaase merged commit 10fa860 into main Jul 25, 2026
8 checks passed
@richhaase
richhaase deleted the ci/go-version-stable branch July 25, 2026 19:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant