bharos opened a new pull request, #11898:
URL: https://github.com/apache/gravitino/pull/11898

   ### What changes were proposed in this pull request?
   
   Add `exclude("org.apache.logging.log4j")` to the 
`compileOnly(libs.hive2.common)` block in:
   - `flink-connector/v1.18/flink/build.gradle.kts`
   - `flink-connector/v1.19/flink/build.gradle.kts`
   - `flink-connector/v1.20/flink/build.gradle.kts`
   
   ### Why are the changes needed?
   
   These modules declare `org.apache.hive:hive-common:2.3.9` as a `compileOnly` 
dependency, which transitively pulls `org.apache.logging.log4j:log4j-1.2-api` / 
`log4j-web` / `log4j-core:2.6.2` (affected by Log4Shell, CVE-2021-44228) onto 
the compile classpath.
   
   `flink-common` already excludes `org.apache.logging.log4j` from its 
`hive2.exec` dependency; the versioned Flink modules omit the same exclude on 
`hive2.common`. This change makes them consistent, removes the vulnerable log4j 
from the compile classpath, and avoids SCA false positives. The `flink-runtime` 
shadow jar already forbids `org.apache.logging.log4j`, so the connector runtime 
artifact is unaffected.
   
   _Issue: to be created and linked._
   
   ### Does this PR introduce _any_ user-facing change?
   
   No.
   
   ### How was this patch tested?
   
   Local compilation of all three modules:
   
   ```
   ./gradlew :flink-connector:flink-1.18:compileJava \
             :flink-connector:flink-1.19:compileJava \
             :flink-connector:flink-1.20:compileJava
   ```
   
   All succeed; the connector code does not reference log4j classes.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to