You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@gravitino.apache.org by "bharos (via GitHub)" <gi...@apache.org> on 2026/06/08 20:27:40 UTC

[PR] [#10457] fix: Exclude log4j 1.x globally (CVE-2020-9493) [gravitino]

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

   ### What changes were proposed in this pull request?
   
   Add a global `exclude(group = "log4j", module = "log4j")` in the root `configurations.all` block to prevent the vulnerable Log4j 1.x artifact from being resolved anywhere in the project.
   
   ### Why are the changes needed?
   
   Hive 2.3.9 and Hadoop 2.10.2 transitively pull in `log4j:log4j:1.2.x`, which is vulnerable to [CVE-2020-9493](https://nvd.nist.gov/vuln/detail/CVE-2020-9493) (CVSS 9.8 — deserialization flaw in Apache Chainsaw/Log4j 1.x `SocketServer`).
   
   The safe `log4j-1.2-api` bridge from Log4j 2.x is already included in the log4j bundle (`libs.versions.toml`), so this exclusion does not break any logging functionality. No source files in the project import `org.apache.log4j`.
   
   PR #10465 already excludes `log4j` from `hive-metastore2-libs` and `hive-metastore3-libs`, but `hive-metastore-common` and other modules still resolve it. This change makes the exclusion global.
   
   Fix: #10457
   
   ### Does this PR introduce _any_ user-facing change?
   
   No. This only removes a vulnerable transitive dependency that is already replaced by the `log4j-1.2-api` bridge.
   
   ### How was this patch tested?
   
   1. Verified `./gradlew :catalogs:hive-metastore-common:compileJava :catalogs:hive-metastore2-libs:compileJava :catalogs:hive-metastore3-libs:compileJava :catalogs:catalog-hive:compileJava` passes (BUILD SUCCESSFUL).
   2. Confirmed `log4j:log4j` no longer appears in the dependency tree.
   3. Confirmed zero source imports of `org.apache.log4j` across the entire project.


-- 
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: commits-unsubscribe@gravitino.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [#10457][followup]fix(deps): Exclude log4j 1.x globally (CVE-2020-9493) [gravitino]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #11506:
URL: https://github.com/apache/gravitino/pull/11506#issuecomment-4653831470

   <!-- coverage-report -->
   ### Code Coverage Report
   |Overall Project|67.04%|:green_circle:|
   |:-|:-|:-:|
   |Files changed|No Java source files changed|-|
   <br>
   
   |Module|Coverage||
   |:-|:-|:-:|
   |aliyun|1.72%|:red_circle:|
   |api|46.8%|:green_circle:|
   |authorization-common|85.96%|:green_circle:|
   |aws|3.66%|:red_circle:|
   |azure|2.47%|:red_circle:|
   |catalog-common|10.42%|:red_circle:|
   |catalog-fileset|80.35%|:green_circle:|
   |catalog-glue|67.41%|:green_circle:|
   |catalog-hive|79.35%|:green_circle:|
   |catalog-jdbc-clickhouse|80.02%|:green_circle:|
   |catalog-jdbc-common|45.31%|:green_circle:|
   |catalog-jdbc-doris|80.28%|:green_circle:|
   |catalog-jdbc-hologres|54.03%|:green_circle:|
   |catalog-jdbc-mysql|79.23%|:green_circle:|
   |catalog-jdbc-oceanbase|78.38%|:green_circle:|
   |catalog-jdbc-postgresql|82.29%|:green_circle:|
   |catalog-jdbc-starrocks|78.51%|:green_circle:|
   |catalog-kafka|77.01%|:green_circle:|
   |catalog-lakehouse-generic|58.53%|:green_circle:|
   |catalog-lakehouse-hudi|79.1%|:green_circle:|
   |catalog-lakehouse-iceberg|85.94%|:green_circle:|
   |catalog-lakehouse-paimon|79.29%|:green_circle:|
   |catalog-model|77.72%|:green_circle:|
   |cli|44.51%|:green_circle:|
   |client-java|77.91%|:green_circle:|
   |common|50.17%|:green_circle:|
   |core|82.51%|:green_circle:|
   |filesystem-hadoop3|76.97%|:green_circle:|
   |flink|0.0%|:red_circle:|
   |flink-common|46.3%|:green_circle:|
   |flink-runtime|0.0%|:red_circle:|
   |gcp|14.12%|:red_circle:|
   |hadoop-common|10.39%|:red_circle:|
   |hive-metastore-common|53.9%|:green_circle:|
   |iceberg-common|57.41%|:green_circle:|
   |iceberg-rest-server|73.8%|:green_circle:|
   |idp-basic|86.07%|:green_circle:|
   |integration-test-common|0.0%|:red_circle:|
   |jobs|66.17%|:green_circle:|
   |lance-common|20.81%|:red_circle:|
   |lance-rest-server|60.54%|:green_circle:|
   |lineage|53.02%|:green_circle:|
   |optimizer|82.87%|:green_circle:|
   |optimizer-api|21.95%|:red_circle:|
   |server|85.73%|:green_circle:|
   |server-common|73.28%|:green_circle:|
   |spark|29.85%|:red_circle:|
   |spark-common|41.01%|:green_circle:|
   |trino-connector|39.97%|:red_circle:|
   


-- 
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: commits-unsubscribe@gravitino.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [#10457][followup]fix(deps): Exclude log4j 1.x globally (CVE-2020-9493) [gravitino]

Posted by "bharos (via GitHub)" <gi...@apache.org>.
bharos commented on PR #11506:
URL: https://github.com/apache/gravitino/pull/11506#issuecomment-4661342330

   > @bharos I could not see the jar you are intending to exclude from the distribution package based on the current main branch, so if I'm not wrong, this PR will not affect the final result of the distribution package. Is that true?
   
   You're right that log4j:log4j does not end up in the distribution package , it's not in the runtimeClasspath of any module.
   
   However, it is still resolved on the current main branch as a transitive test dependency:
   ```
    ./gradlew :catalogs:catalog-lakehouse-paimon:dependencies --configuration testRuntimeClasspath | grep "log4j:log4j:"
   |         |    |    |    |    |         |    \--- log4j:log4j:1.2.17
   (base) ╭─bmurali@FVFHP28PQ05N ~/Code/gravitino  ‹main*› 
   ╰─➤  ./gradlew :catalogs:catalog-hive:dependencies --configuration testRuntimeClasspath | grep "log4j:log4j:"
   
   |    |    \--- log4j:log4j:1.2.17
   |    |    |    |    |    |    \--- log4j:log4j:1.2.17
   |    |    |    |    |    +--- log4j:log4j:1.2.17
   ```
   
   This means the vulnerable JAR still gets downloaded to ~/.gradle/caches/ during builds and test runs, which triggers security scanners on developer machines (which is how I found it - our vulnerability scanner flagged it repeatedly on my laptop).
   
   This global exclusion serves as defense-in-depth: it prevents the JAR from being resolved anywhere (including test configurations), and ensures that if a future module introduces a new transitive dependency on log4j 1.x, it will be caught automatically rather than requiring per-module exclusions.


-- 
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: commits-unsubscribe@gravitino.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [#10457][followup]fix(deps): Exclude log4j 1.x globally (CVE-2020-9493) [gravitino]

Posted by "yuqi1129 (via GitHub)" <gi...@apache.org>.
yuqi1129 merged PR #11506:
URL: https://github.com/apache/gravitino/pull/11506


-- 
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: commits-unsubscribe@gravitino.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [#10457][followup]fix(deps): Exclude log4j 1.x globally (CVE-2020-9493) [gravitino]

Posted by "yuqi1129 (via GitHub)" <gi...@apache.org>.
yuqi1129 commented on PR #11506:
URL: https://github.com/apache/gravitino/pull/11506#issuecomment-4656906723

   @bharos 
   I could not see the jar you are intending to exclude from the distribution package based on the current main branch, so if I'm not wrong, this PR will not affect the final result of the distribution package. Is that true?


-- 
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: commits-unsubscribe@gravitino.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [#10457][followup]fix(deps): Exclude log4j 1.x globally (CVE-2020-9493) [gravitino]

Posted by "jerryshao (via GitHub)" <gi...@apache.org>.
jerryshao commented on PR #11506:
URL: https://github.com/apache/gravitino/pull/11506#issuecomment-4656718793

   @yuqi1129 can you please review this PR?


-- 
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: commits-unsubscribe@gravitino.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org