Repository navigation
Upgrade Jackson to 2.18.12 via jackson-bom - #253
Open
deepika-lalwani123 wants to merge 2 commits into
Open
deepika-lalwani123 wants to merge 2 commits into
deepika-lalwani123 wants to merge 2 commits into
Conversation
kafka-plugins-client declared netty-all, netty-http and the kafka_2.12 broker at compile scope, so the plugin jar packaged about 30 Netty 4.1.75 / 4.1.48 modules, kafka_2.12 2.6.0 and ZooKeeper 3.5.8 under lib/. Image scanning of gcr.io/cdapio/cdap reports the Netty, kafka_2.12 and ZooKeeper CVEs against /opt/cdap/master/artifacts/kafka-plugins-client-*.jar/lib/. Only the embedded-broker unit tests use these jars: every kafka.*, scala.*, io.netty.*, io.cdap.http.* and org.apache.zookeeper.* import is under src/test. Main code uses only org.apache.kafka.clients/common from kafka-clients. The root POM already declares netty-all and netty-http as test scope; the client module overrode that. Versions: - io.netty:netty-all 4.1.75.Final: compile -> test (kafka-plugins-client) - io.cdap.http:netty-http 1.3.0: compile -> test (kafka-plugins-client) - org.apache.kafka:kafka_2.12 2.6.0: compile -> test (kafka-plugins-client), which also drops zookeeper 3.5.8, scala-library/-reflect 2.12.11, jackson-module-scala and metrics-core from the plugin jar Bugs: b/578427766, b/578434052, b/578497139 (kafka_2.12); Plugins side done for the kafka-plugins Netty bugs and zookeeper b/578633351. Risk: low. No main-code dependency on the removed jars. Scala comes from the Spark runtime that already provides spark-streaming at runtime. Testing: JDK 8, Checkstyle on (0 violations). mvn -B clean install (all modules): BUILD SUCCESS, 13 tests, 0 failures (KafkaBatchSourceTest, KafkaSinkAndAlertsPublisherTest, KafkaStreamingSource*Test, KafkaStreamingSourceUtilTest). unzip -l kafka-plugins-client-3.5.0-SNAPSHOT.jar: lib/ goes from 74 to 26 jars; no netty-*, kafka_2.12-*, zookeeper-* or scala-* left; nothing added. mvn dependency:tree -Dincludes=io.netty,org.apache.kafka, org.apache.zookeeper,io.cdap.http: kafka_2.12, netty-all and netty-http are test scope; the only compile-scope match is kafka-clients 2.6.0.
The kafka plugin jar packages jackson-databind 2.10.5.1 and
jackson-core 2.10.5. Image scanning of gcr.io/cdapio/cdap reports the
jackson-databind and jackson-core CVEs against
/opt/cdap/master/artifacts/kafka-plugins-client-*.jar/lib/.
Import com.fasterxml.jackson:jackson-bom in the root
dependencyManagement so every Jackson 2 module (including the ones that
come transitively through kafka_2.12 and the CDAP test jars) resolves to
one version.
Versions:
- jackson 2.10.5.1 -> 2.18.12 (root jackson.version, now also the
jackson-bom import version; kafka-plugins-client jackson-databind
keeps using ${jackson.version})
Bugs: no single-ID list for the kafka-plugins Jackson rows in the plan;
this is the Plugins side for the kafka-plugins jackson-databind and
jackson-core rows.
Risk: low. Jackson 2.x minor upgrade; plugin main code has no direct
Jackson imports. jackson-core-asl / jackson-mapper-asl 1.9.13 (Jackson
1, from avro 1.8.2) are untouched here and go away with the avro
upgrade.
Testing: JDK 8, Checkstyle on (0 violations).
mvn -B clean install (all modules): BUILD SUCCESS, 13 tests, 0 failures.
mvn dependency:tree -pl kafka-plugins-client -Dincludes=
com.fasterxml.jackson.*: every Jackson 2 artifact resolves to 2.18.12;
compile scope = jackson-databind/-core/-annotations 2.18.12. Plugin jar
lib/ has jackson-databind-2.18.12, jackson-core-2.18.12,
jackson-annotations-2.18.12 and no 2.10.x jar.
This was referenced Nov 17, 2026
There was a problem hiding this comment.
Code Review
This pull request updates dependency scopes and versions in the Maven configuration files. Specifically, it scopes several dependencies (kafka_2.12, netty-all, and netty-http) to test in kafka-plugins-client/pom.xml. Additionally, it upgrades the Jackson version to 2.18.12 and introduces the jackson-bom in the dependencyManagement section of the root pom.xml to align Jackson 2 modules. There are no review comments, and I have no feedback to provide.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Upgrade Jackson to 2.18.12 via jackson-bom
Repo: data-integrations/kafka-plugins
Base: develop (stacked)
Commit: 066a5cf
Part of the CVE fixes for the CDAP 6.11.2 patch release (container image scanning of gcr.io/cdapio/cdap).
The kafka plugin jar packages jackson-databind 2.10.5.1 and
jackson-core 2.10.5. Image scanning of gcr.io/cdapio/cdap reports the
jackson-databind and jackson-core CVEs against
/opt/cdap/master/artifacts/kafka-plugins-client-*.jar/lib/.
Import com.fasterxml.jackson:jackson-bom in the root
dependencyManagement so every Jackson 2 module (including the ones that
come transitively through kafka_2.12 and the CDAP test jars) resolves to
one version.
Versions:
jackson-bom import version; kafka-plugins-client jackson-databind
keeps using ${jackson.version})
Risk: low. Jackson 2.x minor upgrade; plugin main code has no direct
Jackson imports. jackson-core-asl / jackson-mapper-asl 1.9.13 (Jackson
1, from avro 1.8.2) are untouched here and go away with the avro
upgrade.
Testing: JDK 8, Checkstyle on (0 violations).
mvn -B clean install (all modules): BUILD SUCCESS, 13 tests, 0 failures.
mvn dependency:tree -pl kafka-plugins-client -Dincludes=
com.fasterxml.jackson.*: every Jackson 2 artifact resolves to 2.18.12;
compile scope = jackson-databind/-core/-annotations 2.18.12. Plugin jar
lib/ has jackson-databind-2.18.12, jackson-core-2.18.12,
jackson-annotations-2.18.12 and no 2.10.x jar.