Loading
Migrate the Docker client to github.com/moby/moby
Move docker-machine off github.com/docker/docker, for the next release, v0.16.2-gitlab.68. That module has no releases after v28.5.2, and its known vulnerabilities have no fix in that module path, because the code is published as github.com/moby/moby now. This removes the docker/docker findings from the docker-machine binary in the GitLab Runner images. See https://gitlab.com/gitlab-org/ci-cd/docker-machine/-/work_items/152.
libmachine/mcndockerclientusesgithub.com/moby/moby/clientv0.6.3, andlibmachine/provision/configure_swarm.gouses thegithub.com/moby/moby/apicontainer and network types. These are the only two places that importeddocker/docker.ImagePullnow waits for the pull to finish before the container is created. The old code did not read the pull response.- The swarm host port is parsed once with
network.ParsePort, and a port that is not valid returns an error. golang.org/x/cryptogoes tov0.58.1-0.20261009181718-2f1f834330b2, from v0.59.0. That is v0.58.0 plus the upstream commit that movesx/crypto/openpgpinto its own module, so it has the fix for GO-2026-5932 and keeps DSA keys and thessh-dsshost key algorithm, which v0.59.0 removes fromx/crypto/ssh.- The two pull errors are wrapped with
%w, and the2375/tcpport is parsed withnetwork.ParsePort, which returns an error instead of panicking. - New
v0.16.2-gitlab.68section inCHANGELOG.md, andVersioninversion/version.go.
Checks
go mod why -m github.com/docker/docker: the main module does not need it, andgo.sumhas nogithub.com/docker/dockerline.- Trivy on the linux/amd64 binary: no findings.
govulncheck -mode binary: GO-2022-0635 and GO-2022-0646 ingithub.com/aws/aws-sdk-gov1, which have no fix in v1. Nogithub.com/docker/dockerfinding.go build ./...andgo vet ./libmachine/...pass.go teston every package exceptits/: the only failures areTestStorePathSetCorrectlyand thedrivers/vmwarefusionbuild on macOS, which fail the same way onmainon that host.libmachine/mcndockerclienthas no tests, and the swarm path is not covered by a test.
Part of https://gitlab.com/gitlab-org/gitlab-runner/-/work_items/40286
Edited by Lachlan Grant