mirror of
https://github.com/docker/cli.git
synced 2026-10-28 08:19:40 +03:00
go1.25.7 (released 2026-02-04) includes security fixes to the go command and the crypto/tls package, as well as bug fixes to the compiler and the crypto/x509 package. See the Go 1.25.7 milestone on our issue tracker for details: https://github.com/golang/go/issues?q=milestone%3AGo1.25.7+label%3ACherryPickApproved full diff: https://github.com/golang/go/compare/go1.25.6...go1.25.7 From the security mailing list: > Hello gophers, > > We have just released Go versions 1.25.7 and 1.24.13, minor point releases. > > These releases include 2 security fixes following the security policy: > > - cmd/cgo: remove user-content from doc strings in cgo ASTs > > A discrepancy between how Go and C/C++ comments > were parsed allowed for code smuggling into the > resulting cgo binary. > > To prevent this behavior, the cgo compiler > will no longer parse user-provided doc > comments. > > Thank you to RyotaK (https://ryotak.net) of > GMO Flatt Security Inc. for reporting this issue. > > This is CVE-2025-61732 and https://go.dev/issue/76697. > > - crypto/tls: unexpected session resumption when using Config.GetConfigForClient > > Config.GetConfigForClient is documented to use the original Config's session > ticket keys unless explicitly overridden. This can cause unexpected behavior if > the returned Config modifies authentication parameters, like ClientCAs: a > connection initially established with the parent (or a sibling) Config can be > resumed, bypassing the modified authentication requirements. > > If ClientAuth is VerifyClientCertIfGiven or RequireAndVerifyClientCert (on the > server) or InsecureSkipVerify is false (on the client), crypto/tls now checks > that the root of the previously-verified chain is still in ClientCAs/RootCAs > when resuming a connection. > > Go 1.26 Release Candidate 2, Go 1.25.6, and Go 1.24.12 had fixed a similar issue > related to session ticket keys being implicitly shared by Config.Clone. Since > this fix is broader, the Config.Clone behavior change has been reverted. > > Note that VerifyPeerCertificate still behaves as documented: it does not apply > to resumed connections. Applications that use Config.GetConfigForClient or > Config.Clone and do not wish to blindly resume connections established with the > original Config must use VerifyConnection instead (or SetSessionTicketKeys or > SessionTicketsDisabled). > > Thanks to Coia Prant (github.com/rbqvq) for reporting this issue. > > This updates CVE-2025-68121 and Go issue https://go.dev/issue/77217. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
93 lines
3.0 KiB
Docker
93 lines
3.0 KiB
Docker
# syntax=docker/dockerfile:1
|
|
|
|
ARG GO_VERSION=1.25.7
|
|
|
|
# ALPINE_VERSION sets the version of the alpine base image to use, including for the golang image.
|
|
# It must be a supported tag in the docker.io/library/alpine image repository
|
|
# that's also available as alpine image variant for the Golang version used.
|
|
ARG ALPINE_VERSION=3.22
|
|
|
|
# BUILDX_VERSION sets the version of buildx to install in the dev container.
|
|
# It must be a valid tag in the docker.io/docker/buildx-bin image repository
|
|
# on Docker Hub.
|
|
ARG BUILDX_VERSION=0.29.1
|
|
FROM docker/buildx-bin:${BUILDX_VERSION} AS buildx
|
|
|
|
FROM golang:${GO_VERSION}-alpine${ALPINE_VERSION} AS golang
|
|
ENV GOTOOLCHAIN=local
|
|
ENV CGO_ENABLED=0
|
|
|
|
FROM golang AS gofumpt
|
|
ARG GOFUMPT_VERSION=v0.7.0
|
|
RUN --mount=type=cache,target=/root/.cache/go-build \
|
|
--mount=type=cache,target=/go/pkg/mod \
|
|
--mount=type=tmpfs,target=/go/src/ \
|
|
GO111MODULE=on go install "mvdan.cc/gofumpt@${GOFUMPT_VERSION}" \
|
|
&& gofumpt --version
|
|
|
|
FROM golang AS gotestsum
|
|
# GOTESTSUM_VERSION sets the version of gotestsum to install in the dev container.
|
|
# It must be a valid tag in the https://github.com/gotestyourself/gotestsum repository.
|
|
ARG GOTESTSUM_VERSION=v1.13.0
|
|
RUN --mount=type=cache,target=/root/.cache/go-build \
|
|
--mount=type=cache,target=/go/pkg/mod \
|
|
--mount=type=tmpfs,target=/go/src/ \
|
|
GO111MODULE=on go install gotest.tools/gotestsum@${GOTESTSUM_VERSION}
|
|
|
|
FROM golang AS goversioninfo
|
|
# GOVERSIONINFO_VERSION is the version of GoVersionInfo to install.
|
|
# It must be a valid tag from https://github.com/josephspurrier/goversioninfo
|
|
ARG GOVERSIONINFO_VERSION=v1.5.0
|
|
RUN --mount=type=cache,target=/root/.cache/go-build \
|
|
--mount=type=cache,target=/go/pkg/mod \
|
|
--mount=type=tmpfs,target=/go/src/ \
|
|
GO111MODULE=on go install github.com/josephspurrier/goversioninfo/cmd/goversioninfo@${GOVERSIONINFO_VERSION}
|
|
|
|
FROM golang AS dev
|
|
RUN apk add --no-cache \
|
|
bash \
|
|
bash-completion \
|
|
build-base \
|
|
ca-certificates \
|
|
coreutils \
|
|
curl \
|
|
git \
|
|
git-daemon \
|
|
jq \
|
|
nano
|
|
|
|
RUN <<-'EOF'
|
|
cat > /etc/motd <<-'EOM'
|
|
\e[1;32mYou are now in a development container.\e[0m
|
|
|
|
Run \e[1;36mmake help\e[0m to see available targets.
|
|
EOM
|
|
|
|
cat >> /root/.bashrc <<-'EOB'
|
|
# print the MOTD when opening the dev-container (interactive shell only).
|
|
if [[ $- == *i* ]] && [[ -z "$MOTD_SHOWN" ]]; then
|
|
printf "%b\n" "$(cat /etc/motd)"
|
|
export MOTD_SHOWN=1
|
|
fi
|
|
|
|
# set a custom prompt to make it more visible when inside the dev-container.
|
|
PS1='\[\e[0;32m\]\u@docker-cli-dev\$ \[\e[0m\]'
|
|
|
|
# set-up bash completion for testing.
|
|
source /etc/bash/bash_completion.sh
|
|
EOB
|
|
EOF
|
|
|
|
CMD ["/bin/bash"]
|
|
ENV DISABLE_WARN_OUTSIDE_CONTAINER=1
|
|
ENV PATH=$PATH:/go/src/github.com/docker/cli/build
|
|
|
|
COPY --link --from=buildx /buildx /usr/libexec/docker/cli-plugins/docker-buildx
|
|
COPY --link --from=gofumpt /go/bin/* /go/bin/
|
|
COPY --link --from=gotestsum /go/bin/* /go/bin/
|
|
COPY --link --from=goversioninfo /go/bin/* /go/bin/
|
|
|
|
WORKDIR /go/src/github.com/docker/cli
|
|
ENV GO111MODULE=auto
|
|
COPY --link . .
|