Import log4j-bom before Spring Boot in published BOMs - #16044
Conversation
There was a problem hiding this comment.
Pull request overview
Updates Grails’ published BOMs and internal vulnerability-scan configuration to remediate a Log4j CVE by overriding Spring Boot’s managed Log4j version, and to document/handle an unfixed Jansi CVE via OSS Index exclusions.
Changes:
- Bumps/introduces
log4j2.versionto2.25.5, addslog4j-bomto the managed platform definitions, and explicitly manages key Log4j modules via the shared property. - Imports the Log4j BOM ahead of the Spring Boot BOM in
grails-gradle-bomandgrails-base-bomto align Maven BOM import precedence. - Adds an OSS Index exclusion entry for
org.fusesource.jansi:jansi:2.4.2with documentation of the unfixed CVE and removal conditions.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
grails-gradle/bom/build.gradle |
Imports log4j-bom before spring-boot-dependencies in the Gradle BOM project. |
grails-bom/base/build.gradle |
Imports log4j-bom before spring-boot-dependencies in the base BOM project. |
dependencies.gradle |
Adds log4j2.version=2.25.5, registers log4j-bom as a platform, and adds Log4j module coordinates + combined platform registration. |
build-logic/plugins/src/main/groovy/org/apache/grails/buildsrc/VulnerabilityScanPlugin.groovy |
Documents/excludes the unfixed Jansi CVE coordinate from OSS Index findings. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| // fixed release exists upstream. Grails still uses the fusesource coordinate for ANSI console output | ||
| // (package org.fusesource.jansi). Remove once consumers migrate off fusesource jansi or a patched | ||
| // release ships. | ||
| 'org.fusesource.jansi:jansi:2.4.2', |
|
The observation regarding the Jansi version discrepancy is accurate. The current exemption in build-logic/plugins/src/main/groovy/org/apache/grails/buildsrc/VulnerabilityScanPlugin.groovy |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## 8.0.x #16044 +/- ##
==================================================
- Coverage 51.8852% 51.8820% -0.0031%
- Complexity 18122 18123 +1
==================================================
Files 2046 2046
Lines 96278 96278
Branches 16729 16729
==================================================
- Hits 49954 49951 -3
- Misses 38951 38954 +3
Partials 7373 7373 🚀 New features to boost your workflow:
|
jdaugherty
left a comment
There was a problem hiding this comment.
It looks jline’s fork is the maintained version. We updated our dependencies in 8.x, so I don’t understand why we haven’t adopted the updated version that is maintained
|
Following up on @jdaugherty's comment: #16079 migrates Grails to the maintained Note the existing |
|
FYI: the only real reason this jansi version was required is because logback had the withJansi option- which we no longer default because spring handles this a different way. My other PR will be updated here shortly |
|
FYI: #16078 - this needs merged instead of the jansi changes. Jansi is abandoned on the fusesource coordinates. See PR for details of what was found. |
Log4j 2.25.5 is already managed on 8.0.x. Ensure every published BOM imports log4j-bom ahead of Spring Boot so Maven consumers keep the CVE-2026-49844 fix for the full Log4j family, not only modules Grails constrains directly. Jansi / CLI classpath work is out of scope here; see #16078. Assisted-by: Sisyphus:xai/grok-4.5
ae2835b to
67b98cd
Compare
This comment has been minimized.
This comment has been minimized.
…-8.0.x # Conflicts: # grails-bom/base/build.gradle # grails-bom/hibernate5/build.gradle # grails-bom/micronaut/build.gradle # grails-gradle/bom/build.gradle
Description
Slim residual for CVE-2026-49844 after Log4j
2.25.5management already landed on8.0.x.This PR only ensures every published Grails BOM imports
log4j-bombefore Spring Boot (and before inherited Grails / Micronaut platforms) so Maven consumers resolve the full Log4j family to2.25.5, including modules Grails does not constrain directly (for examplelog4j-layout-template-json).Touched BOMs:
grails-gradle-bomgrails-base-bom/grails-bom(via base)grails-hibernate5-bomgrails-hibernate7-bomgrails-micronaut-bomgrails-hibernate5-micronaut-bomgrails-hibernate7-micronaut-bomdependencies.gradleonly adjustscombinedPlatformsordering so docs / property extraction match the same Log4j-first platform order. Version pins and module constraints are unchanged.Out of scope (handled elsewhere)
Jansi / Grails console / CLI classpath work is not in this PR.
That work lives in #16078 (Remove Jansi and separate CLI from production classpath), which:
org.jline:jansi)Once #16078 merges, the Jansi half of the original #16044 scope is obsolete. This branch no longer documents or exempts Jansi CVEs.
Stacking
Does not need to stack on #16078. The two changes are independent and can merge in either order.
Verification
log4j2-bomin the remaining platform loop to avoid a duplicate Maven import.No user-facing API changes. No application docs required beyond what #16078 covers for CLI/Jansi.