Skip to content

fix(deps): update golang.org/x/* to close 18 HIGH CVEs, bump Go to 1.26 - #654

Merged
pirog-spb merged 2 commits into
mainfrom
fix/deps-golangorg-x
Oct 4, 2026
Merged

pirog-spb merged 2 commits into
mainfrom
fix/deps-golangorg-x

Conversation

@pirog-spb

Copy link
Copy Markdown
Collaborator

Trivy fs/image scans (enabled again in #653) fail with exit code 1: 18 HIGH vulnerabilities in outdated golang.org/x dependencies:

  • golang.org/x/crypto v0.31.0 -> v0.55.0 (12 CVEs: SSH DoS, auth bypass)
  • golang.org/x/net v0.33.0 -> v0.57.0 (5 CVEs: html XSS, http2 DoS, idna, dns message DoS)
  • golang.org/x/text v0.21.0 -> v0.41.0 (1 CVE: UTF-8 DoS)

These module versions require go >= 1.25, so:

  • go.mod: go 1.22.3 -> 1.26.0 (go-version-file in CI follows automatically); also pulls x/sys v0.47.0, x/tools v0.48.0
  • Dockerfile builder: golang:1.22.12-bookworm -> golang:1.26.8-bookworm
  • README: update the documented Golang version and install commands

Also fix the non-constant format string in stats.go flagged by the go1.26 vet printf check: Msgf("...%s" + err.Error()) concatenated the error into the format string instead of passing it as an argument (the %s placeholder was never substituted).

Verified in a linux/amd64 container (golang:1.26.8-bookworm): golangci-lint v2.6.2 - 0 issues; go build - OK; go test ./cmd/... - all packages pass; trivy fs scan - 0 HIGH/CRITICAL findings; docker image builds and the binary runs.

pirog-spb added 2 commits October 4, 2026 23:57
Trivy fs/image scans (enabled again in #653) fail with exit code 1:
18 HIGH vulnerabilities in outdated golang.org/x dependencies:

- golang.org/x/crypto v0.31.0 -> v0.55.0 (12 CVEs: SSH DoS, auth bypass)
- golang.org/x/net v0.33.0 -> v0.57.0 (5 CVEs: html XSS, http2 DoS,
  idna, dns message DoS)
- golang.org/x/text v0.21.0 -> v0.41.0 (1 CVE: UTF-8 DoS)

These module versions require go >= 1.25, so:

- go.mod: go 1.22.3 -> 1.26.0 (go-version-file in CI follows
  automatically); also pulls x/sys v0.47.0, x/tools v0.48.0
- Dockerfile builder: golang:1.22.12-bookworm -> golang:1.26.8-bookworm
- README: update the documented Golang version and install commands

Also fix the non-constant format string in stats.go flagged by the
go1.26 vet printf check: Msgf("...%s" + err.Error()) concatenated the
error into the format string instead of passing it as an argument
(the %s placeholder was never substituted).

Verified in a linux/amd64 container (golang:1.26.8-bookworm):
golangci-lint v2.6.2 - 0 issues; go build - OK; go test ./cmd/... -
all packages pass; trivy fs scan - 0 HIGH/CRITICAL findings; docker
image builds and the binary runs.

Signed-off-by: pirog-spb <[email protected]>
The v2.6.2 binary is built with go1.25, and the linter refuses to
analyze a module targeting Go 1.26.0:

  can't load config: the Go language version (go1.25) used to build
  golangci-lint is lower than the targeted Go version (1.26.0)

golangci-lint v2.14.0 is built with go1.27 and supports Go 1.26.

Verified with the actual prebuilt linux-amd64 v2.14.0 binary (same
artifact the action installs): 0 issues on this tree after
go generate.

Signed-off-by: pirog-spb <[email protected]>
@pirog-spb
pirog-spb merged commit 93de08c into main Oct 4, 2026
10 of 11 checks passed
pirog-spb pushed a commit that referenced this pull request Oct 12, 2026
The Security scan fs/image jobs fail with exit code 1 on a newly
published HIGH vulnerability:

  golang.org/x/net v0.57.0 -> fixed in v0.60.0 | CVE-2026-78669

Bump golang.org/x/net to v0.61.0 (latest, requires go 1.26 already set
in go.mod since #654); go mod tidy also pulls the current patch
versions of the sibling modules: x/crypto v0.58.0, x/sys v0.49.0,
x/text v0.43.0, x/tools v0.51.0.

Verified in a linux/amd64 container (golang:1.26.8-bookworm):
golangci-lint v2.14.0 (prebuilt binary) - 0 issues; go build - OK;
go test ./cmd/... - all packages pass; trivy fs scan - 0 HIGH/CRITICAL
findings.

Signed-off-by: pirog-spb <[email protected]>
pirog-spb added a commit that referenced this pull request Oct 31, 2026
…26 (#654)

Signed-off-by: pirog-spb <[email protected]>
(cherry picked from commit 93de08c)
Signed-off-by: pirog-spb <[email protected]>
pirog-spb added a commit that referenced this pull request Oct 31, 2026
…26 (#654)

Signed-off-by: pirog-spb <[email protected]>
(cherry picked from commit 93de08c)
Signed-off-by: pirog-spb <[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