Skip to content

ci: add a CA bundle to debian-base - #39570

Merged
jasonhernandez merged 1 commit into
MaterializeInc:mainfrom
jasonhernandez:jasonhernandez/sec-740-metabase-smoketest-panics-at-startup-since-reqwest-moved-to
Oct 6, 2026
Merged

jasonhernandez merged 1 commit into
MaterializeInc:mainfrom
jasonhernandez:jasonhernandez/sec-740-metabase-smoketest-panics-at-startup-since-reqwest-moved-to

Conversation

@jasonhernandez

@jasonhernandez jasonhernandez commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

Closes: SEC-740

Since #39415 moved reqwest to rustls with rustls-platform-verifier, building a reqwest client on Linux fails if the system has no CA bundle. debian-base ships none, so metabase-smoketest panics at startup ("No CA certificates were loaded from the system") and the nightly Metabase job has been red since 2026-10-01. The mz-debug, mz-deploy and kgen images sit on the same base and use the same reqwest.

debian-base now gets /etc/ssl/certs/ca-certificates.crt from a separate build stage, so the openssl CLI that the ca-certificates package depends on stays out of the image. This follows the pattern in distroless-prod-base.

Risks: the stage's debian:13-slim digest pin must be bumped with the final stage's. Images that already install ca-certificates themselves regenerate the bundle over the copied one, which is harmless.

Tests: none added. The nightly Metabase job covers this.

🤖 Generated with Claude Code

Since reqwest moved to rustls with rustls-platform-verifier (MaterializeInc#39415),
building a reqwest client on Linux fails when the system has no CA
bundle. debian-base ships none, so metabase-smoketest panics at startup
and the nightly Metabase job has failed since. The mz-debug, mz-deploy
and kgen images are built on the same base with the same dependency.

Install ca-certificates in a separate stage and copy only the bundle,
since the package also pulls the openssl CLI into the image.

Closes: SEC-740

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jasonhernandez
jasonhernandez requested a review from bosconi October 6, 2026 05:06
@jasonhernandez
jasonhernandez enabled auto-merge (squash) October 6, 2026 05:06
@jasonhernandez jasonhernandez added the ci-nightly PR CI control: also trigger Nightly label Oct 6, 2026

@bosconi bosconi left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. One small comment improvement.

Comment on lines +10 to +12
# `ca-certificates` depends on the `openssl` CLI, so install it in a separate
# stage and copy only the bundle into the final image.
FROM debian:13-slim@sha256:a99cfc517144bc59b1978475ec53b46ecabec7e43635402ee5b77cc54cd1b20a AS ca-certs

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dependabot handles keeping the two digest pins in sync. /misc/images/debian-base is in .github/dependabot.yml, and it bumps every debian:13-slim pin in a Dockerfile in one PR. For example, #39383 bumped both the apt-deps and useradd stages in distroless-prod-base. distroless-prod-base says this in a comment. Doing the same here tells the next reader they don't need to bump the pins by hand:

Suggested change
# `ca-certificates` depends on the `openssl` CLI, so install it in a separate
# stage and copy only the bundle into the final image.
FROM debian:13-slim@sha256:a99cfc517144bc59b1978475ec53b46ecabec7e43635402ee5b77cc54cd1b20a AS ca-certs
# `ca-certificates` depends on the `openssl` CLI, so install it in a separate
# stage and copy only the bundle into the final image. Dependabot bumps this
# digest pin together with the final stage's.
FROM debian:13-slim@sha256:a99cfc517144bc59b1978475ec53b46ecabec7e43635402ee5b77cc54cd1b20a AS ca-certs

@jasonhernandez
jasonhernandez merged commit 985d203 into MaterializeInc:main Oct 6, 2026
76 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci-nightly PR CI control: also trigger Nightly

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants