Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .github/workflows/operator.yml
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,10 @@ jobs:
context: operator
platforms: linux/amd64,linux/arm64
push: false
# Re-resolve golang:1.27 every run. The tag is mutable and the eMudhra
# crypto/x509 denylist shipped in a patch release, so a reused base can
# be below the 1.27.3 floor the Dockerfile asserts.
pull: true
cache-from: type=gha

publish:
Expand Down Expand Up @@ -221,5 +225,9 @@ jobs:
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
# See the test job: mode=max persists the builder stage across runs, so
# without this the published binary could be compiled by a toolchain
# older than the asserted go1.27.3 floor.
pull: true
cache-from: type=gha
cache-to: type=gha,mode=max
28 changes: 27 additions & 1 deletion operator/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,35 @@
# building, so a linux/arm64 target cross-compiles natively instead of running
# the whole Go toolchain under QEMU. Without it a two-platform build is several
# minutes slower for no benefit — the Go compiler already emits any GOARCH.
FROM --platform=$BUILDPLATFORM golang:1.25 AS builder
#
# Go 1.27 floor is a SECURITY floor, not a feature one. The eMudhra CA
# compromise (2026-10-20, CVE-2026-111943) was answered in the standard library
# by a crypto/x509 denylist that fails verification when one of the eight
# recoverable intermediate keys appears in a chain — shipped in go1.27.3 and
# go1.26.10 only. 1.25 is past end of support and never received it, so a binary
# built on it carries no denylist and falls back entirely to whatever root store
# the runtime image holds. Floating the minor tag keeps future patch fixes
# arriving on rebuild; do not pin back below 1.27.3.
FROM --platform=$BUILDPLATFORM golang:1.27 AS builder
Comment thread
agent-refr marked this conversation as resolved.
Resolved
WORKDIR /workspace

# Assert the floor instead of trusting the tag. `golang:1.27` is mutable, CI
# exports a type=gha,mode=max BuildKit cache, and the denylist arrived in a
# PATCH release — so "the tag says 1.27" does not establish 1.27.3. A build that
# resolves an older 1.27.x fails here rather than shipping a manager binary with
# no eMudhra denylist and nothing but the distroless root store behind it.
#
# The workflows also pass pull: true so the base is re-resolved every run; this
# check is what catches it if that ever regresses.
RUN set -eux; \
min=go1.27.3; \
have="$(go env GOVERSION)"; \
echo "go toolchain: ${have} (floor ${min})"; \
if [ "$(printf '%s\n%s\n' "$min" "$have" | sort -V | head -n1)" != "$min" ]; then \
echo "FATAL: ${have} is below the ${min} security floor (CVE-2026-111943)" >&2; \
exit 1; \
fi

# Dependencies first, so a source-only change reuses the module layer.
COPY go.mod go.sum ./
RUN go mod download
Expand Down
Loading