@@ -5,31 +5,22 @@ RUN apk add --no-cache curl && \
55 curl - sL "https://github.com/google/go-containerregistry/releases/download/v0.21.2/go-containerregistry_Linux_${ARCH}.tar.gz" | tar xz - C / usr / local / bin crane && \
66 crane pull wiremock / wiremock :3.9 .1 / wiremock .tar
77
8- # Stage 2 : Rebuild containerd v2 .3 .1 + runc v1 .3 .5 + moby (dockerd , docker - proxy )
9- # + docker CLI from source with go1 .26 .3 and golang .org / x / net v0 .53 .0 .
10- # Upstream `docker:29.5.2-dind-alpine3.23` ships dockerd / docker / docker - proxy
11- # built with go1 .26.2 , which grype flags for the unpatched go / stdlib 1.26 .2
12- # CVEs (CVE - 2026 - 33811 , CVE - 2026 - 33814 , CVE - 2026 - 39820 , CVE - 2026 - 39836 ,
13- # CVE - 2026 - 42499 ). Rebuilding under GOTOOLCHAIN = go1.26.3 swaps the embedded
14- # stdlib without changing functionality. The containerd / runc rebuild also
15- # picks up the grpc / otel / go - jose bumps from the v2 .3 .x release line.
16- FROM golang :1.26 .3 - alpine3.23 AS overlay - binaries
8+ # Stage 2 : Rebuild containerd + runc + moby + docker CLI from source with
9+ # go1.26.4 so the embedded stdlib clears vulnerability scanners . The
10+ # containerd / runc rebuild also picks up dependency bumps from the v2.3. x line.
11+ FROM golang :1.26 .4 - alpine3.23 AS overlay - binaries
1712ARG CONTAINERD_VERSION = 2.3 .1
1813ARG RUNC_VERSION = 1.3 .5
19- # moby v29 .5 .2 includes fixes for CVE - 2026 - 33997 , CVE - 2026 - 34040 ,
20- # CVE - 2026 - 41567 , CVE - 2026 - 41568 , CVE - 2026 - 42306 and later patches.
2114ARG MOBY_VERSION = 29.5 .2
2215ARG DOCKER_CLI_VERSION = 29.5 .2
2316ARG XNET_VERSION = 0.55 .0
2417ARG XCRYPTO_VERSION = 0.52 .0
2518ARG XSYS_VERSION = 0.45 .0
2619ARG OTEL_SDK_VERSION = 1.43 .0
2720ARG IN_TOTO_VERSION = 0.11 .0
28- ENV GOTOOLCHAIN = go1.26.3
21+ ENV GOTOOLCHAIN = go1.26.4
2922RUN apk add - - no - cache git make gcc musl - dev linux - headers libseccomp - dev libseccomp - static bash ca - certificates && \
3023 mkdir - p / overlay / usr / local / bin
31- # Bump in - toto - golang to v0 .11 .0 (GHSA - pmwq - pjrm - 6 p5r ) and pin the OTLP
32- # HTTP exporters to v ${OTEL_SDK_VERSION } (CVE - 2026 - 39882 ).
3324RUN git clone -- depth 1 -- branch v ${CONTAINERD_VERSION } https://github.com/containerd/containerd.git /src/containerd && \
3425 cd / src / containerd && \
3526 go get golang .org / x / net @v ${XNET_VERSION } \
@@ -59,9 +50,6 @@ RUN git clone --depth 1 --branch v${RUNC_VERSION} https://github.com/opencontain
5950 cp runc / overlay / usr / local / bin / runc
6051RUN git clone -- depth 1 -- branch docker - v ${MOBY_VERSION } https://github.com/moby/moby.git /src/moby && \
6152 cd / src / moby && \
62- # Force patched x / net (CVE - 2026 - 33814 ), containerd (GHSA - fqw6 - gf59 - qr4w ),
63- # otel SDK + OTLP HTTP exporters (CVE - 2026 - 39882 , CVE - 2026 - 39883 )
64- # before vendoring dockerd / docker - proxy.
6553 go get golang .org / x / net @v ${XNET_VERSION } \
6654 golang .org / x / crypto @v ${XCRYPTO_VERSION } \
6755 golang .org / x / sys @v ${XSYS_VERSION } \
@@ -85,8 +73,6 @@ RUN git clone --depth 1 --branch docker-v${MOBY_VERSION} https://github.com/moby
8573RUN git clone -- depth 1 -- branch v ${DOCKER_CLI_VERSION } https://github.com/docker/cli.git /src/docker-cli && \
8674 cd / src / docker - cli && \
8775 cp vendor.mod go .mod && cp vendor.sum go .sum && \
88- # docker CLI 's vendor.mod pins x / net < 0.53 ; bump it (and re - vendor )
89- # so the built / usr / local / bin / docker also clears CVE - 2026 - 33814.
9076 go get golang .org / x / net @v ${XNET_VERSION } \
9177 golang .org / x / crypto @v ${XCRYPTO_VERSION } \
9278 golang .org / x / sys @v ${XSYS_VERSION } && \
@@ -115,7 +101,7 @@ COPY --from=wiremock-pull /wiremock.tar /wiremock.tar
115101RUN apk update && apk upgrade -- no - cache -- available
116102
117103# Install Go (multi - arch : supports both amd64 and arm64 )
118- ENV GO_VERSION = 1.26 .3
104+ ENV GO_VERSION = 1.26 .4
119105RUN set - eux ; \
120106 ARCH = "$(uname -m)" ; \
121107 case "${ARCH}" in \
@@ -127,11 +113,8 @@ RUN set -eux; \
127113 & & tar - C / usr / local - xzf "go${GO_VERSION}.linux-${GOARCH}.tar.gz" \
128114 & & rm "go${GO_VERSION}.linux-${GOARCH}.tar.gz"
129115
130- # Go 1.26 .3 ships the CVE - 2026 - 33814 fix in h2_bundle.go but src / go .mod
131- # still pins old pseudo - versions of x / net and x / crypto , and an old x / sys.
132- # Bump the SBOM files so grype no longer flags them.
133- # Patch both src / go.mod (stdlib ) and src / cmd / go.mod (toolchain commands )
134- # so scanners like grype and AWS Inspector stop reporting CVE - 2026 - 39824.
116+ # Patch src / go.mod and src / cmd / go.mod to bump declared x / net , x / crypto ,
117+ # x / sys versions so SBOM scanners no longer flag stale pseudo - versions.
135118RUN sed - i 's| golang .org / x / net v0 .47 .1 - [^ ]* | golang.org / x / net v0 .55 .0 | ' \
136119 / usr / local / go / src / go .mod / usr / local / go / src / vendor / modules .txt && \
137120 sed - i '/golang.org \/ x \/ net v0 .47 .1 - / d ' / usr / local / go / src / go .sum && \
@@ -152,8 +135,8 @@ ENV PATH="/usr/local/go/bin:${PATH}" \
152135RUN mkdir - p "${GOPATH}/src" "${GOPATH}/bin"
153136
154137# Build golangci - lint via a temporary wrapper module so we can bump
155- # golang .org / x / sys to v0 .45 . 0 ( CVE - 2026 - 39824 ) while still fetching all
156- # modules through the Go proxy + checksum database (sum .golang .org ).
138+ # golang .org / x / sys while still fetching all modules through the Go proxy
139+ # + checksum database (sum .golang .org ).
157140ENV GOLANGCI_LINT_VERSION = v2.12.2
158141RUN mkdir / tmp / glw && cd / tmp / glw && \
159142 go mod init golangci - wrapper && \
0 commit comments