mirror of
https://github.com/moby/moby.git
synced 2026-01-11 18:51:37 +00:00
- https://github.com/golang/go/issues?q=milestone%3AGo1.23.7+label%3ACherryPickApproved - full diff: https://github.com/golang/go/compare/go1.23.6...go1.23.7 These minor releases include 1 security fixes following the security policy: net/http, x/net/proxy, x/net/http/httpproxy: proxy bypass using IPv6 zone IDs Matching of hosts against proxy patterns could improperly treat an IPv6 zone ID as a hostname component. For example, when the NO_PROXY environment variable was set to "*.example.com", a request to "[::1%25.example.com]:80` would incorrectly match and not be proxied. Thanks to Juho Forsén of Mattermost for reporting this issue. This is CVE-2025-22870 and Go issue https://go.dev/issue/71984. View the release notes for more information: https://go.dev/doc/devel/release#go1.23.7 Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
33 lines
1.1 KiB
Docker
33 lines
1.1 KiB
Docker
# syntax=docker/dockerfile:1
|
|
|
|
ARG GO_VERSION=1.23.7
|
|
ARG GOVULNCHECK_VERSION=v1.1.3
|
|
ARG FORMAT=text
|
|
|
|
FROM golang:${GO_VERSION}-alpine AS base
|
|
WORKDIR /go/src/github.com/docker/docker
|
|
RUN apk add --no-cache jq moreutils
|
|
ARG GOVULNCHECK_VERSION
|
|
RUN --mount=type=cache,target=/root/.cache \
|
|
--mount=type=cache,target=/go/pkg/mod \
|
|
go install golang.org/x/vuln/cmd/govulncheck@$GOVULNCHECK_VERSION
|
|
|
|
FROM base AS run
|
|
ARG FORMAT
|
|
RUN --mount=type=bind,target=.,rw <<EOT
|
|
set -ex
|
|
mkdir /out
|
|
ln -s vendor.mod go.mod
|
|
ln -s vendor.sum go.sum
|
|
govulncheck -format ${FORMAT} ./... | tee /out/govulncheck.out
|
|
if [ "${FORMAT}" = "sarif" ]; then
|
|
# Make sure "results" field is defined in SARIF output otherwise GitHub Code Scanning
|
|
# will fail when uploading report with "Invalid SARIF. Missing 'results' array in run."
|
|
# Relates to https://github.com/golang/vuln/blob/ffdef74cc44d7eb71931d8d414c478b966812488/internal/sarif/sarif.go#L69
|
|
jq '(.runs[] | select(.results == null) | .results) |= []' /out/govulncheck.out | tee >(sponge /out/govulncheck.out)
|
|
fi
|
|
EOT
|
|
|
|
FROM scratch AS output
|
|
COPY --from=run /out /
|