This is an automated email from the ASF dual-hosted git repository.

yuqi1129 pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/gravitino.git


The following commit(s) were added to refs/heads/main by this push:
     new 115411fed3 [#15012] improvement(bundles): Update org.json in the 
Tencent bundle to 20260814 (#15013)
115411fed3 is described below

commit 115411fed31e0214996e127c399042b4dc2c12fb
Author: geyanggang <[email protected]>
AuthorDate: Wed Nov 18 20:02:02 2026 +0800

    [#15012] improvement(bundles): Update org.json in the Tencent bundle to 
20260814 (#15013)
    
    ### What changes were proposed in this pull request?
    - Declare `org.json:json` 20260814 directly in
    `bundles/tencent-bundle/build.gradle.kts`. The version is in
    `gradle/libs.versions.toml` as `org-json`.
    - Remove the `org.json/json@20180130` entries from
    `.github/trivy/trivyignore.yaml`.
    
    ### Why are the changes needed?
    `cos-sts-java` 3.0.8 (from `hadoop-cos`) pulls in `org.json:json`
    20180130, which is bundled in the Tencent bundle shaded jar. A direct
    dependency overrides the transitive version in the shaded jar and in the
    published POM.
    
    Fix: #15012
    
    ### Does this PR introduce _any_ user-facing change?
    No.
    
    ### How was this patch tested?
    - `dependencyInsight` on `:bundles:tencent-bundle` shows
    `org.json:json:20180130 -> 20260814` through `cos-sts-java`. The
    generated POM lists `org.json:json:20260814` as a runtime dependency.
    - `./gradlew :bundles:tencent-bundle:build -PskipITs` passes. The shadow
    jar contains `META-INF/maven/org.json/json` 20260814.
    - The classes in the shadow jar call only `JSONObject` (`<init>()`,
    `<init>(String)`, `get`, `getLong`, `keySet`, `optJSONObject`,
    `optString`, `put(String, long)`, `put(String, Object)`, `toString`) and
    `JSONArray` (`<init>()`, `put(Object)`). All exist in 20260814, and a
    smoke test against the shadow jar exercised them. The 20260814 classes
    target Java 8 (class version 52).
    - `spotlessCheck`, `.github/trivy/scan.sh check-exemptions` and `node
    --test .github/scripts/tests/*.test.cjs` pass.
---
 .github/trivy/trivyignore.yaml          | 11 -----------
 bundles/tencent-bundle/build.gradle.kts |  3 +++
 gradle/libs.versions.toml               |  2 ++
 3 files changed, 5 insertions(+), 11 deletions(-)

diff --git a/.github/trivy/trivyignore.yaml b/.github/trivy/trivyignore.yaml
index 01ec6c4c7c..941c4e08fe 100644
--- a/.github/trivy/trivyignore.yaml
+++ b/.github/trivy/trivyignore.yaml
@@ -755,17 +755,6 @@ vulnerabilities:
       - pkg:maven/org.jline/[email protected]
     expired_at: 2027-02-07
     statement: "Pre-existing finding, tracked in apache/gravitino#14777."
-  # org.json/json
-  - id: CVE-2022-45688
-    purls:
-      - pkg:maven/org.json/json@20180130
-    expired_at: 2027-02-07
-    statement: "Pre-existing finding, tracked in apache/gravitino#14777."
-  - id: CVE-2023-5072
-    purls:
-      - pkg:maven/org.json/json@20180130
-    expired_at: 2027-02-07
-    statement: "Pre-existing finding, tracked in apache/gravitino#14777."
   # org.lz4/lz4-java
   - id: CVE-2025-12183
     purls:
diff --git a/bundles/tencent-bundle/build.gradle.kts 
b/bundles/tencent-bundle/build.gradle.kts
index f8c59de939..209a7200d2 100644
--- a/bundles/tencent-bundle/build.gradle.kts
+++ b/bundles/tencent-bundle/build.gradle.kts
@@ -26,6 +26,9 @@ plugins {
 
 dependencies {
   implementation(project(":bundles:tencent"))
+  // cos-sts-java 3.0.8 (from hadoop-cos) pulls in org.json:json 20180130. 
Declare it directly so
+  // that both the shaded jar and the published POM resolve the version in the 
catalog.
+  implementation(libs.org.json)
 
   implementation(libs.commons.collections3)
   implementation(libs.commons.io)
diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml
index e59292ab76..35c1940dc5 100644
--- a/gradle/libs.versions.toml
+++ b/gradle/libs.versions.toml
@@ -183,6 +183,7 @@ woodstox-core = "6.5.1"
 mail = "1.4.1"
 rome = "1.0"
 jettison = "1.5.4"
+org-json = "20260814"
 thrift = "0.12.0"
 derby = "10.14.2.0"
 datanucleus-core = "4.1.17"
@@ -408,6 +409,7 @@ servlet = { group = "javax.servlet", name = 
"javax.servlet-api", version.ref = "
 mail = { group = "javax.mail", name = "mail", version.ref = "mail" }
 rome = { group = "rome", name = "rome", version.ref = "rome" }
 jettison = { group = "org.codehaus.jettison", name = "jettison", version.ref = 
"jettison" }
+org-json = { group = "org.json", name = "json", version.ref = "org-json" }
 
 google-auth-http = { group = "com.google.auth", name = 
"google-auth-library-oauth2-http", version.ref = "google-auth" }
 google-auth-credentials = { group = "com.google.auth", name = 
"google-auth-library-credentials", version.ref = "google-auth" }

Reply via email to