Skip to content

Uplift Go to 1.26.6 and bump vulnerable dependencies - #620

Open
bszirtes wants to merge 3 commits into
masterfrom
uplift/cve-deps-go1.26.6
Open

Uplift Go to 1.26.6 and bump vulnerable dependencies#620
bszirtes wants to merge 3 commits into
masterfrom
uplift/cve-deps-go1.26.6

Conversation

@bszirtes

@bszirtes bszirtes commented Aug 28, 2026

Copy link
Copy Markdown
Collaborator

Summary

Addresses the following security advisories by uplifting Go and affected dependencies:

Advisory Package Before After
CVE-2026-56852 golang.org/x/text v0.32.0 v0.39.0
CVE-2026-46600 golang.org/x/net v0.48.0 v0.56.0
GHSA-hrxh-6v49-42gf google.golang.org/grpc v1.79.3 v1.82.1
CVE-2026-39824 golang.org/x/sys v0.42.0 v0.47.0
- go directive 1.25.9 1.26.6
- go.opentelemetry.io/otel/exporters/prometheus v0.52.0 v0.61.0

Notes:

  • golang.org/x/sys landed on v0.47.0 (rather than the requested v0.44.0) since the updated golang.org/x/net and golang.org/x/text require it as a transitive minimum.
  • Updated both go.mod modules (root and examples/target).
  • Updated golang:1.25 base images to golang:1.26 in all Dockerfiles (build/*/Dockerfile, examples/target/build/example-target/Dockerfile) so container builds satisfy the new module Go version requirement.
  • Transitively upgraded: golang.org/x/oauth2, golang.org/x/sync, golang.org/x/term, golang.org/x/tools, google.golang.org/protobuf, google.golang.org/genproto/googleapis/api and .../rpc.
  • The Go 1.26.6 uplift broke golangci-lint (the pinned v1.62.2 predates Go 1.26 support), so .golangci.yml was migrated to the v2 config format and the tool repinned to v2.13.2 (module path moved to .../golangci-lint/v2/cmd/golangci-lint in the 2.x line). The staticcheck settings restrict checks to SA*/S* to replicate the previously separate gosimple linter, which v2 folded into staticcheck.
  • The newer staticcheck surfaced a real finding (SA4023) in cmd/operator/main.go: WatchX509Context only returns once its internal retry loop gives up, so the returned error is never nil, making the err != nil check dead logic. Fixed and documented.
  • Bumped go.opentelemetry.io/otel/exporters/prometheus from v0.52.0 to v0.61.0, transitively upgrading github.com/prometheus/client_golang (v1.21.1 -> v1.23.2), client_model (v0.6.1 -> v0.6.2), common (v0.62.0 -> v0.67.4) and procfs (v0.15.1 -> v0.19.2). No code changes required.

Testing

  • go build ./... — passes in both modules
  • go vet ./... — passes in both modules
  • go mod tidy / go mod verify — clean
  • go test -race -cover -short -count=1 ./... — all unit tests pass
  • make lint (golangci-lint v2.13.2) — 0 issues

E2E/local deployment tests were not run as part of this change.

Address the following CVEs/advisories:
- CVE-2026-56852: golang.org/x/text v0.32.0 -> v0.39.0
- CVE-2026-46600: golang.org/x/net v0.48.0 -> v0.56.0
- GHSA-hrxh-6v49-42gf: google.golang.org/grpc v1.79.3 -> v1.82.1
- CVE-2026-39824: golang.org/x/sys v0.42.0 -> v0.47.0

Also bump go directive from 1.25.9 to 1.26.6 in both modules, and
update golang:1.25 base images to golang:1.26 in all Dockerfiles so
container builds satisfy the new module Go version requirement.

Transitively upgraded: golang.org/x/oauth2, golang.org/x/sync,
golang.org/x/term, golang.org/x/tools, google.golang.org/protobuf,
google.golang.org/genproto/googleapis/api and .../rpc.

Verified with go build, go vet, go mod verify, and the unit test
suite (go test -race -cover -short ./...) using go1.26.6.

Signed-off-by: Botond Szirtes <botond.szirtes@est.tech>
The Makefile pinned golangci-lint@v1.62.2, which predates Go 1.26
support and cannot lint the module after the Go 1.26.6 uplift.
Migrate .golangci.yml to the v2 config format and repin the tool to
v2.13.2 (module path moved to .../golangci-lint/v2/cmd/golangci-lint
in the 2.x line).

The staticcheck settings restrict checks to SA* and S* groups to
replicate the previously separate gosimple linter, which v2 folded
into staticcheck.

Also fix a real finding (SA4023) surfaced by the newer staticcheck in
cmd/operator/main.go: WatchX509Context only returns once its internal
retry loop gives up, so the returned error is never nil, making the
err != nil check dead logic.

Verified with go build, go vet, go test -short ./..., and make lint
using go1.26.6.

Signed-off-by: Botond Szirtes <botond.szirtes@est.tech>
Transitively upgrades github.com/prometheus/client_golang (1.21.1 ->
1.23.2), client_model (0.6.1 -> 0.6.2), common (0.62.0 -> 0.67.4) and
procfs (0.15.1 -> 0.19.2).

Verified with go build, go vet, go test -short ./..., and make lint.

Signed-off-by: Botond Szirtes <botond.szirtes@est.tech>
@bszirtes
bszirtes requested a review from zolug August 28, 2026 12:08
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