@@ -104,13 +104,17 @@ RUN apt-get update \
104104# to ensure they use a patched Go stdlib (GO-2026-4337: crypto/tls)
105105{% if CONFIGURED_ARCH == "armhf" %}
106106RUN GO_ARCH=armv6l \
107+ && GO_SHA256=7d4f0d266d871301e08ef4ac31c56e66048688893b2848392e5c600276351ee8 \
107108{% elif CONFIGURED_ARCH == "arm64" %}
108109RUN GO_ARCH=arm64 \
110+ && GO_SHA256=ec342e7389b7f489564ed5463c63b16cf8040023dabc7861256677165a8c0e2b \
109111{% else %}
110112RUN GO_ARCH=amd64 \
113+ && GO_SHA256=00859d7bd6defe8bf84d9db9e57b9a4467b2887c18cd93ae7460e713db774bc1 \
111114{% endif %}
112- && GO_VERSION=1.25.8 \
115+ && GO_VERSION=1.25.9 \
113116 && curl -L "https://go.dev/dl/go${GO_VERSION}.linux-${GO_ARCH}.tar.gz" -o /tmp/go.tar.gz \
117+ && echo "${GO_SHA256} /tmp/go.tar.gz" | sha256sum -c - \
114118 && tar -C /usr/local -xzf /tmp/go.tar.gz \
115119 && rm /tmp/go.tar.gz
116120
@@ -122,12 +126,14 @@ RUN GRPCURL_VERSION=v1.9.3 \
122126 && git clone --depth 1 --branch "${GRPCURL_VERSION}" https://github.com/fullstorydev/grpcurl.git /tmp/grpcurl \
123127 && cd /tmp/grpcurl \
124128 && go get google.golang.org/grpc@v1.79.3 \
129+ && go get github.com/go-jose/go-jose/v4@latest \
125130 && go get golang.org/x/crypto@latest golang.org/x/net@latest golang.org/x/text@latest golang.org/x/sys@latest golang.org/x/oauth2@latest \
126131 && go mod tidy \
127132 && go build -o /usr/local/bin/grpcurl ./cmd/grpcurl \
128133 && chmod +x /usr/local/bin/grpcurl \
129- && rm -rf /tmp/grpcurl
134+ && rm -rf /tmp/grpcurl /root/go/pkg/mod /root/.cache/go-build
130135# Security fixes: upgrade all vulnerable system packages (S360 scan remediation)
136+ # Covers CVE-2026-33416 and CVE-2026-33636 (libpng16-16) among others
131137RUN apt-get update && apt-get upgrade -y \
132138 && rm -rf /var/lib/apt/lists/*
133139{% if PTF_ENV_PY_VER == "py3" %}
@@ -358,27 +364,35 @@ RUN git clone https://github.com/karimra/gnoic.git \
358364 && git checkout 27bc5a6 \
359365 && go get google.golang.org/grpc@v1.79.3 \
360366 && go get github.com/go-viper/mapstructure/v2@v2.4.0 \
367+ && go get github.com/go-jose/go-jose/v4@latest \
361368 && go get golang.org/x/crypto@latest golang.org/x/net@latest golang.org/x/text@latest golang.org/x/sys@latest golang.org/x/oauth2@latest \
362369 && go mod tidy \
363370 && go build -o /usr/local/bin/gnoic . \
364371 && cd .. \
365- && rm -rf gnoic
372+ && rm -rf gnoic /root/go/pkg/mod /root/.cache/go-build
366373
367374# Build gnmic from source with upgraded deps to address known CVEs
375+ COPY gocloud-patches/ /tmp/gocloud-patches/
368376RUN GNMIC_VERSION=v0.43.0 \
369377 && git clone --depth 1 --branch "${GNMIC_VERSION}" https://github.com/openconfig/gnmic.git /tmp/gnmic \
370378 && cd /tmp/gnmic \
371379 && go get google.golang.org/grpc@v1.79.3 \
372380 && go get github.com/cloudflare/circl@v1.6.3 \
373381 && go get github.com/go-git/go-git/v5@latest \
374382 && go get github.com/nats-io/nats-server/v2@latest \
375- && go get go.opentelemetry.io/otel/sdk@v1.40.0 \
383+ && go get go.opentelemetry.io/otel/sdk@latest \
376384 && go get github.com/docker/docker@latest \
385+ && go get github.com/go-jose/go-jose/v4@latest \
386+ && go get github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream@latest github.com/aws/aws-sdk-go-v2/service/s3@latest github.com/aws/aws-sdk-go-v2/feature/s3/manager@latest \
377387 && go get golang.org/x/crypto@latest golang.org/x/net@latest golang.org/x/text@latest golang.org/x/sys@latest golang.org/x/oauth2@latest \
388+ && go get gocloud.dev@v0.25.1-0.20220408200107-09b10f7359f7 \
378389 && go mod tidy \
390+ && GOCLOUD_DIR="$(go list -m -f '{{ '{{' }}.Dir{{ '}}' }}' gocloud.dev)" \
391+ && chmod -R +w "$GOCLOUD_DIR" \
392+ && patch --forward -d "$GOCLOUD_DIR" -p1 < /tmp/gocloud-patches/0001-fix-aws-sdk-go-v2-pointer-api-changes.patch \
379393 && go build -o /usr/local/bin/gnmic . \
380394 && chmod +x /usr/local/bin/gnmic \
381- && rm -rf /tmp/gnmic
395+ && rm -rf /tmp/gnmic /tmp/gocloud-patches /root/go/pkg/mod /root/.cache/go-build
382396
383397COPY \
384398{% for deb in docker_ptf_debs .split (' ' ) -%}
0 commit comments