Repository navigation
Update the trusted CA certificates - #500
Conversation
Install ca-certificates in the base stage, before the build stage fetches gems, so the image takes the distribution's current package rather than the one in the base image, and fail the build if either withdrawn root (emSign ECC Root CA - G3, AAA Certificate Services) is still in the store Ruby's OpenSSL loads.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
🟡 Changes recommended
The validation can miss withdrawn roots when SSL_CERT_DIR contains multiple directories.
1 open issue
What changed in this PR
Updates the image’s trusted CA certificates and adds a build-time check for withdrawn roots.
Changes:
- Install current
ca-certificatesin the shared base stage. - Reject builds containing either withdrawn root or fewer than 100 distinct root subjects.
[!TIP]
If you aren't ready for review, convert to a draft PR.
Click "Convert to draft" or rungh pr ready --undo.
Click "Ready for review" or rungh pr readyto reengage.
| File | Description |
|---|---|
| Dockerfile | Updates CA certificates and validates Ruby’s trust locations. |
Review effort: Balanced
|
🤖 Converged on |

Debian's
ca-certificatesupdate20250419+deb13u1removes two root certificates, emSign ECC Root CA - G3 and AAA Certificate Services. The image builds onruby:3.4.7-slim, which still ships20250419, and no apt step namesca-certificates, so rebuilding the image doesn't pick up the update.Change (Dockerfile only):
ca-certificatesin the base stage, so both the build stage, which fetches gems, and the final image get the updated package.SSL_CERT_FILE/SSL_CERT_DIRwhen set). It also fails if it finds fewer than 100 roots, so it can't pass against an empty store.Verified with a local
linux/amd64build of this branch:ruby:3.4.7-slimand onghcr.io/basecamp/writebook:1.2.4, because both roots are present. It passes in this build, which installs20250419+deb13u1(the package reports 0 added, 2 removed).Net::HTTPwith the default store rejects all 12 test hosts that chain to the two roots and still connects to github.com. The same handshake from the 1.2.4 image accepts all 12.mainis at v1.2.4, so this would be 1.2.5.