Repository navigation
fix(build): build with Go 1.27.3 and let go.mod be the one toolchain source (GO-2026-6809) - #27
Merged
Merged
Conversation
…source (GO-2026-6809) The published image ghcr.io/codefly-dev/service-warehouse:0.0.3 records go1.27.2, and govulncheck -mode=binary reports GO-2026-6809 (crypto/x509, fixed in go1.27.3) as called. Every pin here said 1.27.2 and two of them pinned backwards: `ENV GOTOOLCHAIN=go1.27.2` in the Dockerfile and `GOTOOLCHAIN: go1.27.2` plus literal `go-version: "1.27.2"` in ci.yml. A `go` directive is a floor; an explicit GOTOOLCHAIN=goX.Y.Z is a selector that re-introduces the exposure on every later bump. - go.mod: `go 1.27.3` (no `toolchain` line; `go mod tidy` changed nothing). - Dockerfile: `golang:1.27.3-trixie` by image-index digest; the GOTOOLCHAIN pin is deleted. The official image sets GOTOOLCHAIN=local, which with the go.mod floor makes the build exactly 1.27.3 without pinning backwards. - ci.yml: the GOTOOLCHAIN env is deleted and each `go-version` literal is `go-version-file: go.mod`, the pattern release.yml already uses. - README.md, AGENTS.md, agent-ci.yml comment: describe the pins as they are. Measured on an arm64 build of this tree: `go version -m` prints `go1.27.3`; `govulncheck -mode=binary` reports no vulnerabilities. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
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.
What
The published binary is built by Go 1.27.2 and carries GO-2026-6809 (crypto/x509, fixed in go1.27.3). This moves every Go pin to 1.27.3 and removes the two pins that selected a toolchain backwards, so
go.modis the one source.Measured
Before, on the published artefact
ghcr.io/codefly-dev/service-warehouse:0.0.3, binary/service-warehouse:govulncheck -mode=binary: GO-2026-6809 reported as called (Found in crypto/x509@go1.27.2, Fixed in crypto/x509@go1.27.3).After, on
docker build --platform linux/arm64of this branch (250c044), binary/service-warehouseextracted from the image:govulncheck -mode=binary:No vulnerabilities found.(exit 0). GO-2026-6809 is absent.go test ./...on the branch: exit 0, every packageok.go mod tidy: no change.Change
go.mod:go 1.27.3. Agodirective is a floor.Dockerfile:FROM golang:1.27.3-trixie@sha256:c124b9ad…(the image-index digest fromdocker buildx imagetools inspect,-trixiekept for the glibc parity the file's comment explains).ENV GOTOOLCHAIN=go1.27.2is deleted: the official image setsGOTOOLCHAIN=local, which together with thego.modfloor makes the build exactly 1.27.3..github/workflows/ci.yml: theGOTOOLCHAIN: go1.27.2env is deleted; eachgo-version: "1.27.2"becomesgo-version-file: go.mod.README.md,AGENTS.md, theagent-ci.ymlcomment: they described the old pins (a literal CI version, a fixed GOTOOLCHAIN) as current rules; they now describe the pins as they are. Nothing else in the repo names 1.27.2.Classification
A fix at the place that owns the behaviour: the toolchain the image and CI build with is chosen by these pins and nowhere else. Not a hack: no gate is weakened, no finding is suppressed, no version is pinned around.
Reuse
go-version-file: go.modis the patternrelease.ymlalready uses (lines 40 and 112);ci.ymlnow matches it instead of carrying a second, literal copy of the version.Deliberately not done: no
toolchainline ingo.mod, and noGOTOOLCHAIN=go1.27.3pin forward in the Dockerfile or CI. An explicitGOTOOLCHAIN=goX.Y.Zis a backwards selector that re-introduces this exact exposure on the next bump; the floor plus the image'sGOTOOLCHAIN=localalready makes the version exact.Not verified
linux/arm64was built and measured locally (OrbStack).linux/amd64is built bypublish-gateway-image.ymlfrom the same index digest;release.ymlinventories and tags the already-published locked image; CI'simage-sbomjob scans both its local single-platform build and the published multi-architecture image recorded in gateway-image.json. That lock still points at the old release; it does not qualify a new patched multi-platform build. The release workflow also inventories the final locked image on both architectures.codefly agent ciwas not run locally.-trixiebase image's glibc version was not re-checked againstdistroless/cc-debian13; both still name Debian 13.🤖 Generated with Claude Code
Fresh independent review at 250c044 found no merge-blocking source/design defect. Build, vet, race tests, real runtime E2E and image SBOM tests passed locally. Both measured local gateway and agent binaries report Go 1.27.3. The gateway binary vulnerability scan passes. The agent scan excludes GO-2026-6809 but reports pre-existing broadly scoped Docker advisories GO-2026-4883 and GO-2026-4887; this is not a claim that the agent has a clean vulnerability scan. Review also identified stale AGENTS wording about manual-only agent CI; it is corrected to match the existing pull-request trigger.
The gateway lock remains the old published image until the reviewed source lands and the existing publisher produces a new digest. Merge is not publication; new multi-platform binary proof and the release will be recorded after that sequence completes.