Skip to content

chore(examples): move echo-command-app to distroless java17-debian13 - #1661

Merged
zimeg merged 5 commits into
slackapi:mainfrom
davidmreed:emudhra-53119/docker
Oct 27, 2026
Merged

zimeg merged 5 commits into
slackapi:mainfrom
davidmreed:emudhra-53119/docker

Conversation

@davidmreed

@davidmreed davidmreed commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

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 the latest digest, uploaded 2026-10-21 17:36 UTC.
  • Java 17 is the smallest JDK step from 11 that has a rebuilt Debian 13 distroless image. Distroless publishes no Java 11 image on Debian 12 or 13.
  • The build stage (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

  • This is an example; nothing in this repo builds it.
    • The final stage is the distroless image (Dockerfile:6), with ENTRYPOINT ["java", "-jar", "/app/slack-app-backend.jar"] at :9.
    • The library itself ships to Maven Central from .github/workflows/release.yml:20-28 and carries no truststore.
  • gcr.io/distroless/java:11 is deprecated and built on Debian 11 bullseye (its base-files is 11.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:

    • the example JRE (Temurin 17.0.20.1 in this image)
    • the CI matrix (Zulu 8/14/17, .github/workflows/ci-build.yml:17)
    • the release JDK (Zulu 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-debian13 tag, as preferred.

Verification

  • Rebuild date of the image: the GCR tag list for distroless/java17-debian13 shows latest = sha256:bc5ad38faf05… with timeUploadedMs = 2026-10-21 17:36:26 UTC. The OCI created field is the reproducible-build epoch (1970-01-01), so it cannot be used.
  • Contents of the pinned image: /var/lib/dpkg/status.d lists ca-certificates 20250419+deb13u1 (the fixed trixie version) and base-files 13.8+deb13u7.
  • docker build --no-cache of the example (Gradle 8.14.6 on JDK 11.0.32.1): BUILD SUCCESSFUL, image built.
  • docker run of the image with a dummy SLACK_BOT_TOKEN:
    • java -version reports Temurin-17.0.20.1+1.
    • The app calls POST https://slack.com/api/auth.test. TLS completes and the API answers invalid_auth (dummy token), so the app exits as expected.
  • Negative: the old base gcr.io/distroless/java:11 reports base-files 11.1+deb11u3 (bullseye, no fixed package). Neither distroless image has a shell, so no gate is possible.
  • CI: Java CI is 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).

…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]>
@davidmreed davidmreed changed the title [eMudhra 53119][Docker] Move the echo-command-app example to distroless java21-debian13 [eMudhra 53119][Docker] Move the echo-command-app example to distroless java17-debian13 Oct 22, 2026
@davidmreed
davidmreed marked this pull request as ready for review October 22, 2026 19:57
@davidmreed
davidmreed requested a review from a team as a code owner October 22, 2026 19:57
@codecov

codecov Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 72.98%. Comparing base (e5f5b44) to head (208ed85).
⚠️ Report is 1 commits behind head on main.
✅ All tests successful. No failed tests found.

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              
Flag Coverage Δ
jdk-14 72.98% <ø> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

@zimeg zimeg added area:examples issues related to example or sample code semver:patch labels Oct 26, 2026
@zimeg zimeg added this to the 1.52.1 milestone Oct 26, 2026
@zimeg zimeg changed the title [eMudhra 53119][Docker] Move the echo-command-app example to distroless java17-debian13 chore(examples): move echo-command-app to distroless java17-debian13 Oct 26, 2026
zimeg and others added 2 commits October 26, 2026 16:31
A digest pin freezes the example on one image, so developers who copy it never get later distroless security fixes.

@zimeg zimeg 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.

☕ @davidmreed Praises more I leave a comment but want to get this merged soon afterwards

Comment thread bolt-docker-examples/echo-command-app/Dockerfile Outdated
@zimeg

zimeg commented Oct 26, 2026

Copy link
Copy Markdown
Member

@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!

@zimeg
zimeg enabled auto-merge (squash) October 26, 2026 23:53

@mwbrooks mwbrooks 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.

note: Switched the digest pin to the tag so the example picks up future distroless security fixes.

@zimeg
zimeg merged commit b670e42 into slackapi:main Oct 27, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:examples issues related to example or sample code cla:signed semver:patch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants