Skip to content

Commit 967749b

Browse files
cristianrcvclaude
andauthored
fix(deps): upgrade shadow plugin to resolve log4j-core XmlLayout vuln (COMP-1573) (#120)
* fix(deps): upgrade shadow plugin to resolve log4j-core XmlLayout vuln (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> * ci: pin graalvm/setup-graalvm to full commit SHA (COMP-1573) 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> * ci(build): bump JDK toolchain to 25 to fix native compile (COMP-1573) 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> * ci(build): use native-build-tools 0.11.5, drop JDK 25/Groovy bumps (COMP-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> --------- Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 9655b24 commit 967749b

4 files changed

Lines changed: 7 additions & 7 deletions

File tree

.github/workflows/build.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,15 +37,15 @@ jobs:
3737

3838
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
3939

40-
- uses: graalvm/setup-graalvm@v1
40+
- uses: graalvm/setup-graalvm@cabbb10818fabc989d6dbd508e4846596d20dd2d # v1.6.0
4141
if: ${{ matrix.musl }}
4242
with:
4343
java-version: '21'
4444
github-token: ${{ secrets.GITHUB_TOKEN }}
4545
native-image-job-reports: 'true'
4646
native-image-musl: 'true'
4747

48-
- uses: graalvm/setup-graalvm@v1
48+
- uses: graalvm/setup-graalvm@cabbb10818fabc989d6dbd508e4846596d20dd2d # v1.6.0
4949
if: ${{ !matrix.musl }}
5050
with:
5151
java-version: '21'
@@ -115,7 +115,7 @@ jobs:
115115
if: failure()
116116
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
117117
with:
118-
name: test-reports-jdk-${{ matrix.java_version }}
118+
name: test-reports-${{ matrix.os }}
119119
path: |
120120
**/build/reports/tests/test
121121
release:

.github/workflows/security-submit-dependecy-graph.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
runs-on: ubuntu-latest
1212
steps:
1313
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
14-
- uses: graalvm/setup-graalvm@v1
14+
- uses: graalvm/setup-graalvm@cabbb10818fabc989d6dbd508e4846596d20dd2d # v1.6.0
1515
with:
1616
java-version: 21
1717

app/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
plugins {
22
id 'groovy'
33
id 'io.seqera.wave.cli.java-application-conventions'
4-
id 'org.graalvm.buildtools.native' version '0.10.6'
5-
id 'com.github.johnrengelman.shadow' version '8.1.1'
4+
id 'org.graalvm.buildtools.native' version '0.11.5'
5+
id 'com.gradleup.shadow' version '9.5.0'
66
}
77

88
java {

gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
distributionBase=GRADLE_USER_HOME
1919
distributionPath=wrapper/dists
20-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip
20+
distributionUrl=https\://services.gradle.org/distributions/gradle-9.6.1-bin.zip
2121
networkTimeout=10000
2222
zipStoreBase=GRADLE_USER_HOME
2323
zipStorePath=wrapper/dists

0 commit comments

Comments
 (0)