Repository navigation
chore(examples): move echo-command-app to distroless java17-debian13 - #1661
Conversation
…ss java21-debian13 gcr.io/distroless/java:11 is deprecated and based on Debian 11 (bullseye), which has no fixed ca-certificates package. Pin the java21-debian13 digest uploaded 2026-10-21 and build with gradle:8-jdk21 to match. Co-Authored-By: Claude <[email protected]>
…jdk11 build stage java17-debian13:latest was rebuilt on 2026-10-21 with ca-certificates 20250419+deb13u1, and it is a smaller JDK step from 11 than java21. The gradle:8-jdk11 build stage is not shipped, and the Java 11 bytecode it produces runs on 17, so that stage is restored. Co-Authored-By: Claude <[email protected]>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1661 +/- ##
============================================
- Coverage 72.99% 72.98% -0.02%
+ Complexity 4632 4630 -2
============================================
Files 486 486
Lines 14632 14632
Branches 1524 1524
============================================
- Hits 10681 10679 -2
- Misses 3047 3049 +2
Partials 904 904
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. |
A digest pin freezes the example on one image, so developers who copy it never get later distroless security fixes.
zimeg
left a comment
There was a problem hiding this comment.
☕ @davidmreed Praises more I leave a comment but want to get this merged soon afterwards
|
@davidmreed @mwbrooks Thanks both for bumping our minimums to a secure standard. I'm curious if we can keep this on the latest for examples all around but for now let's get this merged! |
mwbrooks
left a comment
There was a problem hiding this comment.
note: Switched the digest pin to the tag so the example picks up future distroless security fixes.
Opened as draft because this moves the example's base distro and JDK line (distroless Debian 11 / Java 11 -> Debian 13 / Java 17). Also, distroless has no shell, so no ca-certificates gate can run inside the image.
What changes
bolt-docker-examples/echo-command-app/Dockerfile:6:gcr.io/distroless/java:11->gcr.io/distroless/java17-debian13@sha256:bc5ad38faf0501a7f60859f85f00cfb285639736e2e948a2d98262f5b022a934. This is thelatestdigest, uploaded 2026-10-21 17:36 UTC.gradle:8-jdk11,:1) is unchanged. It does not ship, and the Java 11 bytecode it produces runs on the Java 17 JRE.Where it ships
Dockerfile:6), withENTRYPOINT ["java", "-jar", "/app/slack-app-backend.jar"]at:9..github/workflows/release.yml:20-28and carries no truststore.gcr.io/distroless/java:11is deprecated and built on Debian 11 bullseye (itsbase-filesis11.1+deb11u3). Bullseye has no fixed ca-certificates package.Not covered by this PR
JDK cacerts: Java ignores the OS trust store and validates against the JDK's own
cacerts. A JDK release that ships the distrust is needed for each of these:.github/workflows/ci-build.yml:17).github/workflows/release.yml:23)That is an owner follow-up; this PR does not change it.
The digest pin will not pick up later distroless rebuilds. Bump it, or switch to the floating
java17-debian13tag, as preferred.Verification
distroless/java17-debian13showslatest=sha256:bc5ad38faf05…withtimeUploadedMs= 2026-10-21 17:36:26 UTC. The OCIcreatedfield is the reproducible-build epoch (1970-01-01), so it cannot be used./var/lib/dpkg/status.dlistsca-certificates20250419+deb13u1(the fixed trixie version) andbase-files13.8+deb13u7.docker build --no-cacheof the example (Gradle 8.14.6 on JDK 11.0.32.1):BUILD SUCCESSFUL, image built.docker runof the image with a dummySLACK_BOT_TOKEN:java -versionreportsTemurin-17.0.20.1+1.POST https://slack.com/api/auth.test. TLS completes and the API answersinvalid_auth(dummy token), so the app exits as expected.gcr.io/distroless/java:11reportsbase-files 11.1+deb11u3(bullseye, no fixed package). Neither distroless image has a shell, so no gate is possible.Java CIis waiting for maintainer approval (fork PR), and it does not build this example.🤖 Generated with Claude Code
Part of the eMudhra 53119 CA-distrust remediation (CVE-2026-111943).