This is an automated email from the ASF dual-hosted git repository.
jerryshao 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 6d60ec058f [#15002] improvement(deps): Exclude the unused JLine
library pulled in by Kerby from the server package (#15003)
6d60ec058f is described below
commit 6d60ec058fb7d60304f052b98d83fd56dd5bbb17
Author: geyanggang <[email protected]>
AuthorDate: Tue Nov 17 19:12:33 2026 +0800
[#15002] improvement(deps): Exclude the unused JLine library pulled in by
Kerby from the server package (#15003)
### What changes were proposed in this pull request?
- Exclude `org.jline` from `libs.bundles.kerby` in
`server-common/build.gradle.kts`, the same way
`iceberg/iceberg-common/build.gradle.kts` already does.
- Remove the `[email protected]` and `[email protected]`
purls from `.github/trivy/trivyignore.yaml`. The `3.9.0` purls stay,
they come from the Hive metastore 2 libs.
### Why are the changes needed?
`org.jline:jline` 3.22.0 came in through `kerb-simplekdc` ->
`kerb-admin` (Kerby 2.0.3) and was packaged as `libs/jline-3.22.0.jar`
in the server. In Kerby 2.0.3 only `RemoteAdminClientTool` (the
interactive admin command line tool) references JLine. The server only
uses `Keytab` and `PrincipalName`, so the library is unused.
Fix: #15002
### Does this PR introduce _any_ user-facing change?
No. `jline-3.22.0.jar` is no longer in the server `libs` directory.
### How was this patch tested?
- Compared the `runtimeClasspath` of `:server` and `:lineage` before and
after: the only difference is the removal of `org.jline:jline:3.22.0`.
- Scanned all Kerby 2.0.3 jars: `RemoteAdminClientTool` is the only
class that references `org/jline`.
- `./gradlew :server:compileTestJava :lineage:compileJava
:iceberg:iceberg-rest-server:compileJava` passes.
- `./gradlew :server-common:test -PskipITs` passes except for
`TestHttpsServerAuthentication` mutual TLS tests, which also fail
without this change.
- `./gradlew :server-common:spotlessCheck`, `.github/trivy/scan.sh
check-exemptions` and `node --test .github/scripts/tests/*.test.cjs`
pass.
---
.github/trivy/trivyignore.yaml | 3 ---
server-common/build.gradle.kts | 6 +++++-
2 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/.github/trivy/trivyignore.yaml b/.github/trivy/trivyignore.yaml
index 70a266b825..d352c7adb3 100644
--- a/.github/trivy/trivyignore.yaml
+++ b/.github/trivy/trivyignore.yaml
@@ -748,20 +748,17 @@ vulnerabilities:
# org.jline/jline-builtins
- id: CVE-2026-77422
purls:
- - pkg:maven/org.jline/[email protected]
- pkg:maven/org.jline/[email protected]
expired_at: 2027-02-07
statement: "Pre-existing finding, tracked in apache/gravitino#14777."
# org.jline/jline-remote-telnet
- id: CVE-2026-56740
purls:
- - pkg:maven/org.jline/[email protected]
- pkg:maven/org.jline/[email protected]
expired_at: 2027-02-07
statement: "Pre-existing finding, tracked in apache/gravitino#14777."
- id: CVE-2026-56741
purls:
- - pkg:maven/org.jline/[email protected]
- pkg:maven/org.jline/[email protected]
expired_at: 2027-02-07
statement: "Pre-existing finding, tracked in apache/gravitino#14777."
diff --git a/server-common/build.gradle.kts b/server-common/build.gradle.kts
index 25876f3c0c..3c33f1e538 100644
--- a/server-common/build.gradle.kts
+++ b/server-common/build.gradle.kts
@@ -41,7 +41,11 @@ dependencies {
implementation(libs.bundles.jwt) {
exclude(group = "com.google.errorprone", module =
"error_prone_annotations")
}
- implementation(libs.bundles.kerby)
+ // Keep the interactive admin shell library (org.jline) out of the server;
only keytab/principal
+ // types are used, and the shell is only referenced by the kerb-admin
command line tool.
+ implementation(libs.bundles.kerby) {
+ exclude("org.jline")
+ }
implementation(libs.bundles.log4j)
implementation(libs.bundles.metrics)
implementation(libs.caffeine)