Skip to content

fix(deps): move dockerd client to moby/moby/client and bump Go to 1.26.10 - #410

Merged
blue4209211 merged 1 commit into
mainfrom
fix/cve-nvd8-docker-go
Oct 29, 2026
Merged

blue4209211 merged 1 commit into
mainfrom
fix/cve-nvd8-docker-go

Conversation

@mayankpande88

@mayankpande88 mayankpande88 commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

What this PR does

The agent's Docker engine client (github.com/docker/docker v28.5.2) carries CVE-2026-33997 (NVD 8.1), and that module has no release with the fix; it lives only in github.com/moby/moby/client. This moves the one file that talks to dockerd onto the moby client and rebuilds on Go 1.26.10. Container discovery on Docker hosts should behave exactly as before.

How to verify

  1. Run the new image on a Docker host (or a node with dockerd). Docker containers show up with the same name, image, listen ports and log path as with the previous image.
  2. trivy image on the new tag no longer lists CVE-2026-33997 or the Go stdlib findings.

Risks

  • Not run end to end on a real node: the full eBPF collection path still needs a run on a Linux node before release (see below).

Linked issue / context

Image CVE cleanup: clears every fixable finding NVD scores 8.0+. The two left (openssl-libs CVE-2026-31789 / CVE-2026-28387) are in the UBI9 base with no Red Hat fix yet.

How was this tested? / detail
  • containers/dockerd.go: API version negotiation is now a client option (client.WithAPIVersionNegotiation()); Ping and ContainerInspect take option structs and inspect wraps its result; port-binding host IPs are typed addresses and unset ones are skipped (the old code failed to parse them too). github.com/docker/docker is gone from go.mod/go.sum.
  • Go 1.26.5 -> 1.26.10 in both Dockerfiles and CI, GOTOOLCHAIN=local in the builder. The Dockerfile already runs microdnf update -y.
  • gofmt clean, go vet exit 0, CI's test set passes (all packages except /containers, as CI does), on Go 1.26.10 in a Linux builder.

Local e2e: built the image; ran DockerdInit + DockerdInspect against a real dockerd for an nginx container -> correct name, image, listen 0.0.0.0:18080, bridge network, json-file log path and 4 env vars; started the full agent container -> dockerd init succeeds with no warning, containerd and BTF socket offsets discovered, then it exits at "neither debugfs nor tracefs are mounted" (the local VM kernel lacks those tracepoints). Not run: eBPF collection on a real Linux node; opened with that gap stated on purpose, to be closed before release.

Scans, NVD 8.0+: 0.1.12-rc.1 = 3 (1 fixable), this build = 2 (0 fixable, UBI9 openssl-libs).

eBPF changes?

No.

Checklist

  • gofmt, go vet, go mod tidy clean
  • CI test set passes
  • CHANGELOG.md updated under ## [Unreleased]
  • No real credentials, internal hostnames, or production captures in test fixtures

…6.10

github.com/docker/docker has no release past v28.5.2 on that module path, so
CVE-2026-33997 (fixed in 29.3.1) can only be cleared by moving to the split
moby client module. The agent uses the client for Ping and ContainerInspect
only, so the migration is local to containers/dockerd.go:

- client.WithAPIVersionNegotiation replaces the removed NegotiateAPIVersion
- Ping and ContainerInspect take options structs; inspect returns a result
  wrapper whose Container field holds the old response
- PortBinding.HostIP is now netip.Addr; skip unset addresses, which the old
  string concatenation also failed to parse

github.com/docker/docker is no longer in the module graph.

Go toolchain 1.26.5 -> 1.26.10 in the Dockerfiles and CI, with
GOTOOLCHAIN=local so the builder never fetches a different toolchain.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request migrates the Docker engine client from github.com/docker/docker to github.com/moby/moby/client to address CVE-2026-33997, updates Go to version 1.26.10 across Dockerfiles, and adjusts Docker client initialization and inspection logic. Feedback on the changes highlights an issue in containers/dockerd.go where direct string concatenation of HostIP and HostPort will fail for IPv6 addresses, and recommends using net.JoinHostPort instead.

Comment thread containers/dockerd.go Resolved
@blue4209211
blue4209211 merged commit 9d78dd6 into main Oct 29, 2026
7 checks passed
@blue4209211
blue4209211 deleted the fix/cve-nvd8-docker-go branch October 29, 2026 10:31
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.

2 participants