Skip to content

Pin the release Go toolchain and let Dependabot bump it (ENG-1323) - #386

Draft
joehorsnell wants to merge 1 commit into
mainfrom
joe/eng-1323-pin-go-toolchain
Draft

joehorsnell wants to merge 1 commit into
mainfrom
joe/eng-1323-pin-go-toolchain

Conversation

@joehorsnell

Copy link
Copy Markdown
Contributor

release.yaml installs "the latest 1.27.x" at tag time (GO_VERSION: "1.27" + check-latest: true). Which Go a release is built with therefore depends on the day it was tagged. A re-run can produce a different toolchain from the original, and a Go upgrade never appears in a reviewed change. That's how v1.9.0 shipped with go1.27.1 without anyone choosing it.

This pins the toolchain to an exact version in the repo and lets Dependabot propose bumps.

Follow-up from ENG-1323. Independent of #385 (the 1.27.3 security fix), and can merge in either order.

Changes

  • .github/go/Dockerfile (new): one line, FROM golang:1.27.3. It's the single source of the release toolchain version. Nothing builds it.
  • release.yaml: reads the exact version from that file and passes it to setup-go, failing if it can't parse one. Drops GO_VERSION and check-latest.
  • dependabot.yml: adds the docker ecosystem for /.github/go, daily, so a Go security release becomes a PR within a day.

Why a Dockerfile

Dependabot can't bump any of the usual places a Go version lives:

  • the toolchain directive in go.mod (dependabot-core#13520, still open)
  • go-version: in workflows
  • .go-version / .tool-versions

Its docker ecosystem does bump FROM golang:X.Y.Z, so a Dockerfile is the one version file it maintains.

The alternative is more idiomatic: toolchain go1.27.3 in go.mod plus go-version-file: go.mod, which setup-go v6+ honours. It would also pin local builds. But something other than Dependabot has to bump it: Renovate, or a scheduled workflow running go get toolchain@patch that opens a PR.

Open questions

  • No PR CI here. Dependabot's bump PRs would merge without a build. A build/test workflow would need the libconnect PAT, and Dependabot PRs only see Dependabot secrets, so the PAT would also have to be added as a Dependabot secret.
  • Minor versions. Dependabot will also propose 1.28.0 when it ships. Add an ignore for version-update:semver-minor if those should stay manual.
  • Operator repo. If we like this, the same applies to signadot/signadot's six GO_VERSION: "1.27" workflows. Its plan-runtime-base Dockerfile could also be added to Dependabot directly.

Verification

  • actionlint on release.yaml: no new findings. It reports one existing SC2086 in "Prepare for GOPRIVATE", which main has too.
  • The sed extraction yields 1.27.3 from the file, and nothing for a non-exact tag such as golang:1.27, which trips the guard.
  • Not exercised end to end: the workflow only runs on a version tag.

Made with Cursor

release.yaml installed the latest 1.27.x at tag time, so which Go a
release was built with depended on the day it was tagged. Read an exact
version from .github/go/Dockerfile instead, which Dependabot's docker
ecosystem keeps current.

Co-authored-by: Cursor <[email protected]>
joehorsnell added a commit that referenced this pull request Oct 29, 2026
)

Requires Go **1.27.3**, which adds a `crypto/x509` denylist for the
compromised eMudhra intermediate CAs ([CVE-2026-111943 /
GO-2026-6809](https://pkg.go.dev/vuln/GO-2026-6809), [Go blog
post](https://go.dev/blog/emudhra-incident)). It also picks up
libconnect's `golang.org/x/net` v0.62.0 bump. The v1.9.0 release
binaries and image were built with go1.27.1, and Bitso's security team
has asked for a v1.9.1 built with 1.27.3.

Part of
[ENG-1323](https://linear.app/signadot/issue/ENG-1323/security-rebuild-go-artifacts-with-go-1273-emudhra-intermediates-cve).

## Changes
- `go.mod`: `go 1.27.1` → `go 1.27.3`, so nothing can build the CLI with
an affected toolchain.
- `github.com/signadot/libconnect` `c97511d` → `0243995`
(signadot/libconnect#181). This moves `golang.org/x/net` v0.59.0 →
v0.62.0, clearing five reachable HTTP/2 advisories (GO-2026-6617, -6612,
-6611, -6610, -6603). The `golang.org/x` modules move with it, the same
versions as libconnect#181: crypto 0.58.0, sync 0.24.0, sys 0.49.0, term
0.47.0, text 0.43.0, tools 0.51.0. No other module versions change.
- `README.md`: build-from-source requirement `Go 1.27.1+` → `Go
1.27.3+`.

Unchanged: `release.yaml` installs the latest 1.27.x at tag time
(`GO_VERSION: "1.27"`, `check-latest: true`), which is 1.27.3 today.
Pinning that exactly and having Dependabot bump it is #386 (draft).

## Release
After merge, tag `v1.9.1`. `main` is otherwise identical to `v1.9.0`, so
v1.9.1 contains only these changes.

## Verification (go1.27.3, darwin/arm64)
- `go mod tidy -diff` is clean
- `go build ./cmd/signadot`: `go version -m` on the binary reports
`go1.27.3`, libconnect `0243995` and x/net v0.62.0
- `go vet ./...` ✅
- `go test ./...` ✅
- `[email protected] ./...` goes from 6 reachable vulnerabilities to 1:
  - the five x/net advisories are gone
- left: GO-2026-5320 in `github.com/yuin/goldmark` v1.7.13 (fixed in
v1.7.17), a CLI dependency that libconnect doesn't touch; not addressed
here

---------

Co-authored-by: Cursor <[email protected]>
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