Skip to content

fix(QTDI-3830): bump log4j-core to 2.25.5 in testing-spark - #1334

Open
undx wants to merge 3 commits into
masterfrom
ouf/QTDI-3830_log4j-core_2.25.5
Open

undx wants to merge 3 commits into
masterfrom
ouf/QTDI-3830_log4j-core_2.25.5

Conversation

@undx

@undx undx commented Nov 16, 2026

Copy link
Copy Markdown
Member

Requirements

  • Any code change adding any logic MUST be tested through a unit test executed with the default build
  • Any API addition MUST be done with a documentation update if relevant

Why this PR is needed?

QTDI-3830: upgrade org.apache.logging.log4j:log4j-core to 2.25.5 in component-runtime-testing-spark (CVE-2026-34479). The root pom.xml is already on 2.25.5; this module overrides log4j2.version locally (2.17.2).

What does this PR adds (design/code thoughts)?

  • component-runtime-testing-spark/pom.xml: log4j2.version 2.17.2 -> 2.25.5.
  • BaseSpark: the log4j2 jars downloaded with the Spark distribution (2.20.0) were kept next to the configured version, causing NoSuchMethodError: ServiceLoaderUtil.loadServices when the Spark master started. Stale log4j-api, log4j-core and log4j-slf4j-impl jars not matching log4j2Version are now removed from the Spark lib folder.

mvn test -pl component-runtime-testing/component-runtime-testing-spark passes (the two cluster tests start a real Spark master). Full reactor mvn verify was not run.

AI generated code

https://internal.qlik.dev/general/ways-of-working/code-reviews/#guidelines-for-ai-generated-code

  • this PR has been written with the help of GitHub Copilot or another generative AI tool

…34479)

Remove the log4j2 jars brought by the downloaded Spark distribution when they do not
match the configured log4j2 version, otherwise a mixed log4j-api/log4j-core breaks the master.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@undx undx mentioned this pull request Nov 16, 2026
2 tasks done
@undx
undx requested a lite review from Copilot November 16, 2026 14:31

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

A moderate active finding remains because the newly added stale Log4j JAR cleanup logic lacks default-build unit coverage proving that matching old files are removed.

1 open issue
What changed in this PR

Updates the Spark testing module to use Log4j 2.25.5 for CVE-2026-34479 mitigation and removes incompatible Log4j jars bundled with Spark.

Changes:

  • Bumps the module-local log4j2.version from 2.17.2 to 2.25.5.
  • Removes stale log4j-api, log4j-core, and log4j-slf4j-impl jars from the generated Spark library directory.
File Description
component-runtime-testing/​component-runtime-testing-spark/​src/​main/​java/​org/​talend/​sdk/​component/​runtime/​testing/​spark/​internal/​BaseSpark.java Removes incompatible Log4j jars from the generated Spark library directory before launching the test cluster.
component-runtime-testing/​component-runtime-testing-spark/​pom.xml Updates the Spark testing module's Log4j version override to 2.25.5.

Review effort: Lite

undx and others added 2 commits November 16, 2026 15:38
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Because this security-sensitive Log4j classpath change was only covered by module startup tests, with no full-reactor verification and distribution-specific jar-name compatibility still requiring human build and integration validation.

No open issues 🎉

1 resolved since last review

Review effort: Lite

@sonar-rnd

sonar-rnd Bot commented Nov 16, 2026

Copy link
Copy Markdown

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.

3 participants