Skip to content

fix: Update GraalVM to 25 and strip AAA Certificate Services from native image trust store - #545

Open
lolgab wants to merge 1 commit into
masterfrom
fix/native-image-trust-store
Open

lolgab wants to merge 1 commit into
masterfrom
fix/native-image-trust-store

Conversation

@lolgab

@lolgab lolgab commented Oct 22, 2026

Copy link
Copy Markdown
Contributor

Why

The native binary embeds the build JDK's default cacerts at build time. GraalVM 22.3.0 (JDK 17.0.5) ships a store that still trusts AAA Certificate Services, and the binary never reads system certs, so the Alpine base image doesn't help.

What

  • nativeImageJvm := graalvm-java25, nativeImageVersion := 25.0.2 (latest GraalVM Community in the Coursier index; still below the patched 25.0.5)
  • New stripDistrustedCerts sbt task, run before nativeImage, uses graalvm/strip-aaa-cacerts.sh to remove the root from the GraalVM home's cacerts

Passing -Djavax.net.ssl.trustStore to native-image at build time was tried and has no effect on the embedded store.

Verified locally (macOS arm64)

  • sbt nativeImage builds on GraalVM 25 with existing flags (deprecation warnings only)
  • binary has no AAA Certificate Services strings (22.3.0-style build had them)

Not verified

Linux musl / ARM builds, CircleCI pipeline. This PR is to see what CI does.

Follow-up

Once a GraalVM >= 25.0.5 is resolvable, drop the strip task and script. Release, get.sh latest pointer and orb bump still needed.

…ive image trust store

native-image embeds the build JDK's cacerts. GraalVM 22.3.0 ships a 2022-era
store that still trusts AAA Certificate Services. Move to GraalVM 25 and remove
the root from the build JDK's cacerts before building, until a GraalVM with
JDK >= 25.0.5 is available.
@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

AI Reviewer: first review requested successfully. AI can make mistakes. Always validate suggestions.

Run reviewer

TIP This summary will be updated as you push new changes.

This branch has not been deployed

No deployments
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