The Go toolchain in the release workflow is version-pinned but not hash-verified #105
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Residual gap from PR #104,
raised by its reviewer and deliberately not treated as blocking — the
accepted remediation asked for exactly what landed.
.gitea/workflows/release.ymlpinsactions/setup-goby commit sha, andgo-version-file: go.modresolvesgo 1.26.1exactly (verified: theaction's
parseGoVersionFilereturns the capture verbatim with no.xwidening, and
check-latestdefaults false). So the action and theversion are both pinned.
What is not pinned is the Go tarball setup-go downloads at runtime. It
is fetched from the
go-versionsmanifest orgo.dev/dland is notchecksum-verified against any value in this repo. Compare:
golangci-lintimage@sha256:digest (#78)goreleaserarchivescript/install-goreleasergolangbuild image@sha256:digestactions/setup-goREPO_POLICIES.md:22reads "ALL external references pinned bycryptographic hash … No exceptions". This is the last external input to
the release path that does not meet that bar — and it is the compiler
that produces the published binaries, so it is the one where a substituted
artifact would matter most.
Definition of done
the exemption is recorded deliberately in the workflow with its
reasoning. Either outcome is acceptable; leaving it undecided is not.
bumping Go is a single reviewed change. Note that
setup-godoes notexpose a checksum input — meeting the bar likely means installing Go
the way
script/install-goreleaserinstalls goreleaser, rather thanvia the action.
unpinned download elsewhere.
Two related notes from the same review, not defects
go.mod"the single source of truth for thetoolchain";
setup-goreads thegodirective only, nottoolchain.Moot today — there is no
toolchainline — and Go's own auto-switchwould be sumdb-verified. Worth correcting the comment if this file is
touched.
1.26.1while this host carriesgo1.26.5.That is the pin working as intended, but it means
go.modand theDockerfiledigest should be bumped together when Go moves.