Skip to content

fix(deps): upgrade shadow plugin to resolve log4j-core XmlLayout vuln (COMP-1573)#120

Merged
cristianrcv merged 4 commits into
masterfrom
fix/COMP-1573-log4j-xmllayout-fails-sanitize-characters
Jul 6, 2026
Merged

fix(deps): upgrade shadow plugin to resolve log4j-core XmlLayout vuln (COMP-1573)#120
cristianrcv merged 4 commits into
masterfrom
fix/COMP-1573-log4j-xmllayout-fails-sanitize-characters

Conversation

@cristianrcv

@cristianrcv cristianrcv commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Summary

org.apache.logging.log4j:log4j-core is pulled in transitively by the com.github.johnrengelman.shadow 8.1.1 Gradle build plugin (build-tooling classpath only — it is not on the application runtime classpath). Shadow 8.1.1 bundles log4j-core 2.20.0, affected by CVE-2026-34480 / GHSA-3pxv-7cmr-fjr4 (Apache Log4j Core's XmlLayout fails to sanitize XML-1.0-forbidden characters; fixed in log4j-core 2.25.4).

Per policy we do not force-pin transitive dependencies — we upgrade the declaring build plugin. Only the shadow 9.x line bundles log4j-core ≥ 2.25.4 (the 8.3.x line tops out at 2.25.3), and shadow 9.x requires Gradle 9:

  • com.github.johnrengelman.shadow 8.1.1com.gradleup.shadow 9.5.0 (successor lineage; ships log4j-core 2.26.12.25.4)
  • Gradle wrapper 8.139.6.1 (required by shadow 9.x)
  • org.graalvm.buildtools.native 0.10.60.11.5 (the 0.11.x line adds Gradle 9 support while keeping the legacy GraalVM reachability-metadata schema)

The build toolchain is unchanged from master: GraalVM/JDK 21, Groovy 4.0.24, source/targetCompatibility 17. The shipped fat jar still runs on JRE 17+.

Note on native-build-tools version choice

An earlier iteration used native-build-tools 1.1.3, which broke nativeCompile: the 1.x line downloads the latest GraalVM reachability-metadata repository, whose new unified reachability-metadata.json schema is not accepted by GraalVM for JDK 21 or 25.0.1 (verified in CI — bumping the JDK did not help). 0.11.5 supports Gradle 9 but keeps the legacy metadata schema, so the metadata repository stays enabled and the schema mismatch disappears without any JDK/Groovy changes.

Also included

  • Pinned the pre-existing graalvm/setup-graalvm@v1 refs to a full commit SHA (cabbb10818fabc989d6dbd508e4846596d20dd2d, v1.6.0), now required by org policy.
  • Fixed a pre-existing broken test-report artifact name that referenced the undefined matrix.java_version (collided across all OS jobs) → now matrix.os, matching the nativeCompile artifact naming.

Verification

  • ./gradlew clean test shadowJar passes under Gradle 9.6.1 on the JDK 21 toolchain
  • The produced wave.jar runs (--version)
  • Native compile (nativeCompile) requires GraalVM and is verified by CI on this PR

JIRA

COMP-1573: Fix Apache Log4j Core's XmlLayout fails to sanitize characters

Security Advisory

https://github.com/seqeralabs/wave-cli/security/dependabot/16

🤖 Generated with Claude Code

… (COMP-1573)

The com.github.johnrengelman.shadow 8.1.1 build plugin transitively bundled
org.apache.logging.log4j:log4j-core 2.20.0 in the build tooling classpath, which
is affected by CVE-2026-34480 / GHSA-3pxv-7cmr-fjr4 (XmlLayout fails to sanitize
characters forbidden by the XML 1.0 spec; fixed in log4j-core 2.25.4).

Migrate to the successor plugin com.gradleup.shadow 9.5.0, which ships
log4j-core 2.26.1 (>= 2.25.4). Shadow 9.x requires Gradle 9, so the Gradle
wrapper is bumped 8.13 -> 9.6.1 and the GraalVM native-build-tools plugin
0.10.6 -> 1.1.3 (first line to support Gradle 9). Verified: shadowJar builds
and all tests pass under Gradle 9.6.1.

See: https://github.com/seqeralabs/wave-cli/security/dependabot/16

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
cristianrcv and others added 3 commits July 6, 2026 09:56
The repo/org policy requires all GitHub Actions to be pinned to a full-length
commit SHA. Pin graalvm/setup-graalvm@v1 -> @cabbb10818fabc989d6dbd508e4846596d20dd2d
(v1.6.0) in build.yml (both native-image steps) and the dependency-graph workflow,
matching the SHA-pinning convention already used for the other actions.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The shadow-plugin migration for the log4j fix pulled in Gradle 9 and
native-build-tools 1.1.3, whose GraalVM reachability-metadata repository
requires a newer reachability-metadata schema than GraalVM for JDK 21
provides. CI `nativeCompile` failed on that schema mismatch.

Bump the build toolchain to JDK 25 across the repo so the GraalVM
reachability metadata schema is supported:
- setup-graalvm / setup-java java-version 21 -> 25 in build.yml and
  security-submit-dependecy-graph.yml
- Gradle toolchain and native launcher languageVersion 21 -> 25
- Groovy test deps 4.0.24 -> 4.0.32 (4.0.24 cannot compile against JDK 25
  class files: "Unsupported class file major version 69")

sourceCompatibility/targetCompatibility stay at 17, so the shipped fat
jar still runs on JRE 17+.

Also fix a pre-existing broken test-report artifact name that referenced
the undefined matrix.java_version (collided across all OS jobs); use
matrix.os to match the nativeCompile artifact naming.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…OMP-1573)

The nativeCompile failure was not a JDK-too-old problem: native-build-tools
1.1.3 downloads the latest GraalVM reachability-metadata repository, which
uses the new unified reachability-metadata schema that GraalVM for JDK 21
(and 25.0.1) does not accept. Bumping the JDK could not fix it.

native-build-tools 0.11.x supports Gradle 9 (needed for the shadow 9.x
migration) but still uses the legacy metadata-repository schema that
GraalVM 21 accepts. Downgrading 1.1.3 -> 0.11.5 removes the schema
mismatch with the metadata repository left enabled.

This lets us revert the collateral bumps that were only introduced to
chase the 1.1.3 schema:
- native-build-tools 1.1.3 -> 0.11.5
- Gradle toolchain + native launcher languageVersion 25 -> 21
- setup-graalvm / setup-java java-version 25 -> 21
- Groovy test deps 4.0.32 -> 4.0.24

Net toolchain (GraalVM/JDK 21, Groovy 4.0.24) now matches master; the only
new tool versions are shadow 9.5.0, Gradle 9.6.1, and native-build-tools
0.11.5. Retains the setup-graalvm SHA pinning and the test-report artifact
name fix.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@cristianrcv cristianrcv merged commit 967749b into master Jul 6, 2026
11 checks passed
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.

3 participants