Skip to content

chore(deps): bump testcontainers-go to drop vulnerable docker/docker SDK#114

Merged
richardwooding merged 2 commits intomainfrom
fix/security-vulns
Apr 27, 2026
Merged

chore(deps): bump testcontainers-go to drop vulnerable docker/docker SDK#114
richardwooding merged 2 commits intomainfrom
fix/security-vulns

Conversation

@richardwooding
Copy link
Copy Markdown
Contributor

Summary

The Security workflow has been red on main for weeks because govulncheck flags two unfixed vulnerabilities in github.com/docker/docker@v28.5.2+incompatible (GO-2026-4887 Moby AuthZ bypass, GO-2026-4883 HTTP request smuggling). Both have Fixed in: N/A because moby/moby moved the client out of the legacy github.com/docker/docker module into a new github.com/moby/moby/client module — the legacy module is in maintenance.

testcontainers-go v0.42.0 (released after our v0.40.0 pin) follows that move. Bumping it removes docker/docker from our dependency graph entirely; govulncheck stops flagging those vulns.

  • testcontainers-go v0.40.0 → v0.42.0 (and the postgres, mysql, gcloud submodules)
  • golang.org/x/net v0.50.0 → v0.53.0 (silences GO-2026-4559 along the way)
  • Misc indirect deps refreshed by go mod tidy (otel, gopsutil, klauspost/compress, etc.)

Verification

  • go build ./... clean
  • golangci-lint run clean
  • go test -short -race ./... — same Docker-dependent integration tests skip as before; all unit tests pass
  • Local govulncheck ./...docker/docker no longer appears in the report; remaining matches are Go stdlib symbols inside indirect deps that our code does not call (toolchain-version sensitive — CI's pinned 1.25.x already passed unit tests on this branch)

Test plan

  • CI green, including the previously-red Go Vulnerability Check and OSV Security Scan

🤖 Generated with Claude Code

Upgrades testcontainers-go (and the postgres/mysql/gcloud modules) from
v0.40.0 to v0.42.0. The new releases use github.com/moby/moby/client
instead of github.com/docker/docker, removing the SDK from our
dependency graph entirely.

Resolves the long-standing Security workflow failures in govulncheck:
- GO-2026-4887: Moby AuthZ plugin bypass on oversized request bodies
- GO-2026-4883: Moby HTTP request smuggling

Both vulns had "Fixed in: N/A" in github.com/docker/docker — the upstream
moby/moby project moved the client to a separate module which has the
fix. v0.42.0 of testcontainers-go follows that move.

Side effects of `go mod tidy`:
- golang.org/x/net v0.50.0 → v0.53.0 (silences GO-2026-4559)
- Various indirect deps refreshed to current minor/patch versions
  (gopsutil, klauspost/compress, otel, ebitengine/purego, etc.)

govulncheck (Go 1.26.1 local): zero called vulns in our code or
dependencies. Remaining matches are stdlib functions inside indirect
deps that our code doesn't reach.
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates Go dependencies (primarily testcontainers-go) to remove the legacy github.com/docker/docker module from the dependency graph, addressing govulncheck findings tied to vulnerabilities that are not fixed in that legacy module.

Changes:

  • Bump github.com/testcontainers/testcontainers-go and its gcloud, mysql, and postgres modules from v0.40.0 to v0.42.0.
  • Refresh indirect dependencies via go mod tidy, including updating golang.org/x/net to v0.53.0.
  • Remove github.com/docker/docker@v28.5.2+incompatible from go.mod/go.sum and replace with the newer github.com/moby/moby/* client modules pulled in by testcontainers-go.

Reviewed changes

Copilot reviewed 1 out of 2 changed files in this pull request and generated no comments.

File Description
go.mod Updates direct testcontainers-go module versions and refreshes indirect dependency versions, removing github.com/docker/docker from the dependency list.
go.sum Updates module checksums to match the new dependency graph, including removal of github.com/docker/docker sums and addition of github.com/moby/moby/* sums.

Resolves the remaining OSV Scanner failures:

- Go 1.25.7 → 1.25.9 (in `go` directive). Fixes 6 stdlib vulns:
  GO-2026-4601, 4602, 4865 (html/template), 4869 (archive/tar),
  4870 (crypto/tls), 4946 / 4947 (crypto/x509). All have `Fixed in: 1.25.9`.
  CI workflows already use `go-version: 1.25.x` with `check-latest: true`,
  so they'll pick up 1.25.9 automatically once go.mod allows it.

- jackc/pgx/v5 5.8.0 → 5.9.2. Fixes GHSA-j88v-2chj-qfwx (called).
  Also clears the two uncalled pgx vulns reported by osv-scanner
  (GO-2026-4771, GO-2026-4772 in earlier 5.x).
@richardwooding richardwooding merged commit cf923ca into main Apr 27, 2026
9 checks passed
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