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
18 changes: 9 additions & 9 deletions apps/admin/Dockerfile.admin
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ RUN pnpm turbo run build --filter=admin
# STAGE 3: Serve with Caddy
# *****************************************************************************

FROM caddy:2.11.4-builder-alpine AS caddy-builder
FROM caddy:2.11.7-builder-alpine AS caddy-builder

RUN XCADDY_SKIP_CLEANUP=1 xcaddy build \
--with github.com/mholt/caddy-ratelimit
Expand All @@ -86,23 +86,23 @@ RUN XCADDY_SKIP_CLEANUP=1 xcaddy build \
# (CVE-2026-56854 CRITICAL in x/crypto, CVE-2026-46600 in x/net,
# CVE-2026-56852 in x/text), so every xcaddy build re-ships them. xcaddy
# preserved its build dir above, so upgrade them there and rebuild.
# x/crypto v0.55.0 requires x/net v0.57.0 and x/text v0.41.0, hence those floors.
# x/net v0.60.0 requires x/crypto v0.57.0 and x/text v0.42.0, hence those floors.
# grpc and otel move together: grpc >= v1.83.0 requires otel v1.44.0, so bump
# the otel pair in lockstep or go walks grpc backwards to satisfy the older one.
RUN cd "$(find /tmp -maxdepth 1 -name 'buildenv_*' -type d | head -1)" && \
go get golang.org/x/crypto@v0.55.0 && \
go get golang.org/x/net@v0.57.0 && \
go get golang.org/x/text@v0.41.0 && \
go get google.golang.org/grpc@v1.83.1 && \
go get go.opentelemetry.io/otel@v1.44.0 && \
go get go.opentelemetry.io/otel/sdk@v1.44.0 && \
go get golang.org/x/crypto@v0.57.0 && \
go get golang.org/x/net@v0.60.0 && \
go get golang.org/x/text@v0.42.0 && \
go get google.golang.org/grpc@v1.83.2 && \
go get go.opentelemetry.io/otel@v1.46.0 && \
go get go.opentelemetry.io/otel/sdk@v1.46.0 && \
go mod tidy && \
go build -o /usr/bin/caddy -ldflags "-w -s" -trimpath .

# `go get` resolves a module backwards rather than failing when pins conflict,
# so assert the binary really carries the pinned grpc: a silent downgrade must
# fail the build instead of shipping a caddy that only looks patched.
RUN go version -m /usr/bin/caddy | grep -qE 'google\.golang\.org/grpc[[:space:]]v1\.83\.1[[:space:]]' \
RUN go version -m /usr/bin/caddy | grep -qE 'google\.golang\.org/grpc[[:space:]]v1\.83\.2[[:space:]]' \
|| { echo "caddy was not built against the pinned grpc -- check the go get floors" >&2; exit 1; }

FROM caddy:2.11.4-alpine AS production
Expand Down
20 changes: 10 additions & 10 deletions apps/proxy/Dockerfile.ce
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM caddy:2.11.4-builder-alpine AS caddy-builder
FROM caddy:2.11.7-builder-alpine AS caddy-builder

# grpc and otel move together: grpc >= v1.83.0 requires otel v1.44.0, and xcaddy
# resolves these --with pins in one `go get`, so a stale otel pin makes go walk
Expand All @@ -10,26 +10,26 @@ RUN XCADDY_SKIP_CLEANUP=1 xcaddy build \
--with github.com/caddy-dns/digitalocean@04bde2867106aa1b44c2f9da41a285fa02e629c5 \
--with github.com/mholt/caddy-l4@6faae83b167fda94e62b686be5cbeb9b3f8fe002 \
--with github.com/go-jose/go-jose/v3@v3.0.5 \
--with github.com/go-jose/go-jose/v4@v4.1.4 \
--with google.golang.org/grpc@v1.83.1 \
--with go.opentelemetry.io/otel@v1.44.0 \
--with go.opentelemetry.io/otel/sdk@v1.44.0
--with github.com/go-jose/go-jose/v4@v4.1.5 \
--with google.golang.org/grpc@v1.83.2 \
--with go.opentelemetry.io/otel@v1.46.0 \
--with go.opentelemetry.io/otel/sdk@v1.46.0

# Caddy's own go.mod pins x/crypto, x/net and x/text at versions with open CVEs;
# xcaddy preserved its build dir above, so upgrade them there and rebuild.
# x/crypto v0.55.0 requires x/net v0.57.0 and x/text v0.41.0, hence those floors.
# x/net v0.60.0 requires x/crypto v0.57.0 and x/text v0.42.0, hence those floors.
RUN cd "$(find /tmp -maxdepth 1 -name 'buildenv_*' -type d | head -1)" && \
go get golang.org/x/crypto@v0.55.0 && \
go get golang.org/x/net@v0.57.0 && \
go get golang.org/x/text@v0.41.0 && \
go get golang.org/x/crypto@v0.57.0 && \
go get golang.org/x/net@v0.60.0 && \
go get golang.org/x/text@v0.42.0 && \
go mod tidy && \
go build -o /usr/bin/caddy -ldflags "-w -s" -trimpath -tags nobadger,nomysql,nopgx .

# xcaddy resolves every --with pin in a single `go get`, which walks a module
# backwards to an older release rather than failing when the pins conflict.
# Assert the binary really carries the pinned grpc, so a silent downgrade fails
# the build instead of shipping a proxy that only looks patched.
RUN go version -m /usr/bin/caddy | grep -qE 'google\.golang\.org/grpc[[:space:]]v1\.83\.1[[:space:]]' \
RUN go version -m /usr/bin/caddy | grep -qE 'google\.golang\.org/grpc[[:space:]]v1\.83\.2[[:space:]]' \
|| { echo "caddy was not built against the pinned grpc -- check the --with pins" >&2; exit 1; }

FROM caddy:2.11.4-alpine
Expand Down
18 changes: 9 additions & 9 deletions apps/web/Dockerfile.web
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ RUN pnpm turbo run build --filter=web
# *****************************************************************************
# STAGE 3: Serve with Caddy
# *****************************************************************************
FROM caddy:2.11.4-builder-alpine AS caddy-builder
FROM caddy:2.11.7-builder-alpine AS caddy-builder

RUN XCADDY_SKIP_CLEANUP=1 xcaddy build \
--with github.com/mholt/caddy-ratelimit
Expand All @@ -84,23 +84,23 @@ RUN XCADDY_SKIP_CLEANUP=1 xcaddy build \
# (CVE-2026-56854 CRITICAL in x/crypto, CVE-2026-46600 in x/net,
# CVE-2026-56852 in x/text), so every xcaddy build re-ships them. xcaddy
# preserved its build dir above, so upgrade them there and rebuild.
# x/crypto v0.55.0 requires x/net v0.57.0 and x/text v0.41.0, hence those floors.
# x/net v0.60.0 requires x/crypto v0.57.0 and x/text v0.42.0, hence those floors.
# grpc and otel move together: grpc >= v1.83.0 requires otel v1.44.0, so bump
# the otel pair in lockstep or go walks grpc backwards to satisfy the older one.
RUN cd "$(find /tmp -maxdepth 1 -name 'buildenv_*' -type d | head -1)" && \
go get golang.org/x/crypto@v0.55.0 && \
go get golang.org/x/net@v0.57.0 && \
go get golang.org/x/text@v0.41.0 && \
go get google.golang.org/grpc@v1.83.1 && \
go get go.opentelemetry.io/otel@v1.44.0 && \
go get go.opentelemetry.io/otel/sdk@v1.44.0 && \
go get golang.org/x/crypto@v0.57.0 && \
go get golang.org/x/net@v0.60.0 && \
go get golang.org/x/text@v0.42.0 && \
go get google.golang.org/grpc@v1.83.2 && \
go get go.opentelemetry.io/otel@v1.46.0 && \
go get go.opentelemetry.io/otel/sdk@v1.46.0 && \
go mod tidy && \
go build -o /usr/bin/caddy -ldflags "-w -s" -trimpath .

# `go get` resolves a module backwards rather than failing when pins conflict,
# so assert the binary really carries the pinned grpc: a silent downgrade must
# fail the build instead of shipping a caddy that only looks patched.
RUN go version -m /usr/bin/caddy | grep -qE 'google\.golang\.org/grpc[[:space:]]v1\.83\.1[[:space:]]' \
RUN go version -m /usr/bin/caddy | grep -qE 'google\.golang\.org/grpc[[:space:]]v1\.83\.2[[:space:]]' \
|| { echo "caddy was not built against the pinned grpc -- check the go get floors" >&2; exit 1; }

FROM caddy:2.11.4-alpine AS production
Expand Down
Loading