Skip to content

sec(docs): compile caddy 2.11.4 on Go 1.26.8 with x/crypto, x/net, x/text and grpc bumped - #5657

Merged
msywulak merged 1 commit into
mainfrom
sec/docs-caddy-rebuild-go-1.26.8
Sep 5, 2026
Merged

sec(docs): compile caddy 2.11.4 on Go 1.26.8 with x/crypto, x/net, x/text and grpc bumped#5657
msywulak merged 1 commit into
mainfrom
sec/docs-caddy-rebuild-go-1.26.8

Conversation

@msywulak

@msywulak msywulak commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

Why

21 of the 30 open code-scanning alerts on main are inside the caddy binary the docs image runs: Go stdlib 1.26.3 (15 alerts), golang.org/x/crypto 0.52 (3, one CRITICAL), x/net, x/text, grpc 1.81 and cel-go 0.28. caddy:2.11.4-alpine is the newest upstream tag, so no pin bump clears them, and they are library findings inside a binary, so the runner's apk upgrade cannot reach them.

The other 9 (toml, fast-uri, qs, @simplewebauthn/server in built-api) were fixed by #5653 and close on their own once the image-scan runs queued for 0aaee5c08 / 71b094d0f upload.

What

  • New caddybuild stage on golang:1.26.8-alpine (digest-pinned) compiling the same caddy v2.11.4 from an xcaddy-shaped deploy/docs/caddy/main.go, with x/crypto@0.56.0, x/net@0.58.0, x/text@0.41.0, grpc@1.83.2 — each at or past the fixed version its alert names.
  • Runner COPY --from=caddybuild /out/caddy /usr/bin/caddy over the base image's binary. Runner base is unchanged, so base-image-gate, .trivyignore and scripts/check-caddyfile.sh are untouched.
  • cel-go stays at 0.28.1: 0.29.x changed interpreter.NewCall and caddy 2.11.4's celmatcher.go does not compile against it (tried 0.29.0, 0.29.1, 0.29.2). The docs Caddyfile has no CEL matcher; alert refactor: extract conversation fetch client from use-conversations hook #896 is dismissed as won't-fix with that reason.

Verified locally

  • docker build --target caddybuild -f deploy/docs/Dockerfile . succeeds; go version -m on the result reports go1.26.8, crypto 0.56.0, net 0.58.0, text 0.41.0, grpc 1.83.2.
  • caddy validate with the new binary accepts deploy/docs/Caddyfile; a runner-shaped image serves 200 on / and 404 on a miss.
  • check-runtime-stage-upgrades, list-runtime-base-images, check-dockerfile-workspace, check-railway-watch, check-dockerfile-bun-pins, check-caddyfile.sh and check-caddyfile.test.sh (14/14) all pass.

Expected on CI

Built image (docs) SARIF should drop the 20 caddy-binary findings this covers. The stdlib ones want 1.26.6+; the image ships 1.26.8.

…text and grpc bumped

The docs image ran the official caddy:2.11.4-alpine binary, and 21 of the 30
open code-scanning alerts on main were inside it: Go stdlib 1.26.3 (15),
golang.org/x/crypto 0.52 (3), x/net 0.55, x/text 0.37, grpc 1.81 and cel-go
0.28. 2.11.4 is the newest Caddy tag, so no pin bump clears them, and they
are library findings inside a binary, so the runner's apk upgrade cannot
reach them either.

Add a `caddybuild` stage on golang:1.26.8-alpine (digest-pinned) that builds
the SAME caddy v2.11.4 from an xcaddy-shaped main.go with the four modules
bumped past every fixed version the alerts name, and COPY the result over
/usr/bin/caddy in the runner. The runner base is unchanged, so the base-image
gate, .trivyignore and scripts/check-caddyfile.sh (which validates against
the official image's binary of the same version) are untouched.

cel-go stays at 0.28.1: 0.29.x changed interpreter.NewCall and caddy
2.11.4's celmatcher.go does not compile against it. The docs Caddyfile uses
no CEL matcher; that one MEDIUM alert is dismissed on GitHub instead.

Verified locally: the stage builds from this Dockerfile, `go version -m`
reports go1.26.8 / crypto 0.56.0 / net 0.58.0 / text 0.41.0 / grpc 1.83.2,
`caddy validate` accepts deploy/docs/Caddyfile, and a runner-shaped image
serves 200 on / and 404 on a miss. All five Dockerfile gate scripts and
check-caddyfile.test.sh pass.
@msywulak
msywulak marked this pull request as ready for review September 5, 2026 17:31
@msywulak
msywulak merged commit 558d77b into main Sep 5, 2026
44 checks passed
@msywulak
msywulak deleted the sec/docs-caddy-rebuild-go-1.26.8 branch September 5, 2026 17:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant