Repository navigation
ci: build releases with current Go, attest them, run govulncheck - #99
Merged
Merged
Conversation
Release binaries were built with go.mod's go 1.26.0, because setup-go reads go-version-file literally. Every standard-library fix since then shipped unpatched: govulncheck finds 45 reachable vulnerabilities in v1.12.0's binary, in net/http, crypto/tls and crypto/x509 among others. The release job now sets up the newest stable Go; go.mod stays the library's minimum. Every release archive and every gh extension binary now gets a build provenance attestation, so gh attestation verify shows a file came from this workflow and a tag. checksums.txt came from the same job it vouched for, so it could not show that. Archive attestation is its own job, which "Re-run failed jobs" can retry, since a re-run of goreleaser fails on the assets it already uploaded; the extension job is split into unpack, attest and publish steps. govulncheck runs on every push and pull request to main and weekly, with the Go the release builds with.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #99 +/- ##
=======================================
Coverage 97.75% 97.75%
=======================================
Files 9 9
Lines 935 935
=======================================
Hits 914 914
Misses 21 21 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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
Two improvements were asked for: signed releases and govulncheck. Running govulncheck first found a bigger problem. Every release binary is built with Go 1.26.0: the release job sets up Go from
go.mod'sgo 1.26.0, which setup-go takes literally. So every standard-library fix since then ships unpatched, and govulncheck finds 45 reachable vulnerabilities in v1.12.0's binary, innet/http,crypto/tlsandcrypto/x509among others. The library is unaffected, since users build it with their own Go. This PR builds releases with the newest stable Go, attests every archive and extension binary, and runs govulncheck.What this does
go.modchecksums.txt, written by the same jobgh attestation verify <file> -R jferrl/go-githubauthChanges
release.yml: setup-go usesgo-version: stable,check-latest: true. A newattestjob attests every archive in the publishedchecksums.txt; thegh-extensionjob attests the bare binaries gh installs, between its unpack and publish steps.govulncheck.yml:golang/govulncheck-action, pinned, with the samestableGo.Rationale
Archive attestation is its own job because re-running GoReleaser fails on assets it already uploaded, so only a separate job can be retried with "Re-run failed jobs". An adversarial Codex pass found that problem in the first draft, which attested inside the GoReleaser job. A second pass found nothing.
Building with
stablemeans a new major Go can arrive in a release unannounced. That is the trade that keeps the binaries patched, and the test matrix covers 1.26 and 1.27.Migration Notes
Attestations start with the next release, and v1.12.0's binaries keep the old Go until then. I would cut v1.12.1 with no code change, just this rebuild, which also exercises the new jobs. Verified locally: govulncheck finds nothing in the source with Go 1.27.3; the split extension steps unpack v1.12.0's real archives and behave as before against a stubbed
gh.