Repository navigation
Conversation
Go 1.24 no longer receives security fixes and the released binary carries 98 vulnerabilities reported by Trivy, mostly from the standard library and old golang.org/x modules. - go.mod: go 1.24 -> 1.27 - golang.org/x/crypto v0.58.0, x/net v0.61.0, x/sys v0.49.0, x/text v0.43.0, github.com/klauspost/compress v1.20.3 - golangci-lint v1.64.2 -> v2.14.0 (v1 cannot lint modules targeting a newer Go version), with the config migrated to the v2 format - config: compute durations with a single multiplication to satisfy the newer durationcheck - utils_test: use %d for int arguments, rejected by Go 1.27 vet Refs ContentSquare#592
This branch has not been deployed
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.
Description
Addresses the Go binary part of #592 (the base image part is in #599).
The released binary is built with Go 1.24, which no longer receives security fixes, and pulls in old
golang.org/x/*andklauspost/compressversions. Trivy reports 98 vulnerabilities in the v1.30.0 binary (1 critical, 45 high), 59 of them in the Go standard library.Changes
Go and dependencies
go 1.24→go 1.27ingo.mod. CI and the release workflow usego-version-file: go.mod, so they install the latest 1.27.x patch release.golang.org/x/cryptov0.36.0 → v0.58.0golang.org/x/netv0.38.0 → v0.61.0golang.org/x/sysv0.31.0 → v0.49.0golang.org/x/textv0.23.0 → v0.43.0github.com/klauspost/compressv1.17.11 → v1.20.3 (CVE-2026-63209, DoS in dictionary processing)Lint tooling
golangci-lint v1.64.2 cannot lint a module that targets a newer Go version than the one it was built with, so the linter had to move to v2:
golangci-lint-actionapproved-v6→approved-v9, golangci-lintv1.64.2→v2.14.0.golangci.ymlmigrated to the v2 format with the same linter selection and the existing comments:gofmtandgoimportsmove to theformatterssectiongosimpleis merged intostaticcheckin v2.staticcheckis enabled with only theS*checks, so lint coverage stays the same while the rest of staticcheck stays disabled as beforetypecheckis no longer a linterexclusions.presetssettingCode changes required by the newer tooling
config/types.go: newerdurationcheckflagsdur *= time.HourincalculateDurationbecausedurholds a plain count typed astime.Duration. The unit is now selected first and multiplied once. Behavior is unchanged and covered byTestParseDuration/TestParseDurationNegative..golangci.yml: newergoconstflags the Prometheus label names (user,cluster, ...) repeated across metric definitions. These are excluded withignore-string-values, which keeps goconst active for everything else.utils_test.go: Go 1.27's vetprintfcheck (whichgo testruns) rejects%qwithintarguments inTestGetSessionTimeout, so the test fails to build. Switched to%d, which also makes the failure messages readable (%qprinted888as'').Results
chproxybinaryThe remaining finding is GO-2026-5932, an advisory that
golang.org/x/crypto/openpgpis deprecated. It has no fix, and chproxy does not import that package.govulncheck ./...reports that the code is affected by 0 vulnerabilities.Pull request type
Checklist
go build,go vetandgo test ./...with Go 1.27.3)Does this introduce a breaking change?
There's no change for users of the binary or the Docker image. Building from source now requires Go 1.27.
Further comments
golangci-lint v2.14.0 prints a deprecation warning for
gomodguard(replaced bygomodguard_v2). I left it as is to keep this PR focused, and it can be switched in a follow-up.