Repository navigation
fix: build with Go 1.27.2 - #221
Merged
Merged
Conversation
Go 1.27.2 fixes two net/http vulnerabilities that govulncheck now reports as reachable from this module: GO-2026-6617 (HTTP/2 server crash from an HPACK encoder race) and GO-2026-6613 (HTTP/1 connection desynchronization after a 2xx CONNECT response). CI installs the version go.mod names, so it was still building with 1.27.0 and the Check job failed. The discovery image pinned golang:1.27-alpine at a 1.27.0 digest with GOTOOLCHAIN=local, so it shipped a binary built with the vulnerable standard library and would refuse the raised go directive. Repin it to the current 1.27-alpine digest, which is 1.27.2.
The v2.13.1 release binary cannot read the export data Go 1.27.2 writes
for the standard library ("export data version 5 is greater than maximum
supported version 4"), so lint failed in typecheck once go.mod required
1.27.2. v2.14.0 reads it; it is also the version `just check` was run with
locally.
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 this changes
Raises the module's Go version from 1.27.0 to 1.27.2, and repins the discovery image's build stage to the current
golang:1.27-alpinedigest, which is 1.27.2.Go 1.27.2 fixes two standard library vulnerabilities that
govulnchecknow reports as reachable from this module:net/http.net/http.CI installs the version
go.modnames (go-version-file: go.mod), so it was building with 1.27.0, and theCheckjob'sgovulncheckstep fails on any branch (first seen on #220).mainlast ran CI on 5 October, before these were published, and would fail the same way on its next run.The discovery image's build stage was pinned to a
golang:1.27-alpinedigest whoseGOLANG_VERSIONis 1.27.0, withGOTOOLCHAIN=local. It therefore shipped a binary built with the vulnerable standard library, and would refuse to build oncego.modrequires 1.27.2.CI's golangci-lint moves from v2.13.1 to v2.14.0. The v2.13.1 release binary cannot read the export data Go 1.27.2 writes for the standard library (
export data version 5 is greater than maximum supported version 4), so lint failed in typecheck on the first run of this PR. v2.14.0 is the versionjust checkran with locally.No issue was filed first.
Closes #
Why this is correct
govulncheck ./...with Go 1.27.2: "Your code is affected by 0 vulnerabilities." With 1.27.0 (the CI run on fix(services): give managed PostgreSQL a larger shared memory ceiling #220) it reports both IDs above, with traces throughdiscovery.Client.Events,notify.Sendandui.RestoreCursor.docker buildx imagetools inspect golang:1.27-alpine, and its config reportsGOLANG_VERSION=1.27.2; the old digest reports1.27.0.docker build -f build/package/onebox-discovery.Dockerfile .succeeds with the new pin.go mod tidymakes no further changes.just check(fmt, vet, fullgo test ./..., generated docs, site build). Not run: the Docker e2e suite locally; CI runs it.Effect on the safety envelope
None. The CLI and the discovery image are built with a patched standard library; behaviour is unchanged. Building from source now requires Go 1.27.2 or later.
Checklist
just checkpasses locally.just checkverifies this).