From 031aa8d145231ad6836cfea636ede441be30473b Mon Sep 17 00:00:00 2001 From: Deepika Lalwani Date: Tue, 17 Nov 2026 06:00:29 +0000 Subject: [PATCH] Import jackson-bom 2.18.12 instead of pinning jackson-databind The image scan of gcr.io/cdapio/cdap reports 14 rows (3 jackson-core, 11 jackson-databind CVEs) against /opt/cdap/master/artifacts/amazon-s3-plugins-*.jar/lib/jackson-*-2.13.4*. Only jackson-databind was pinned (2.13.4.2), so jackson-core and jackson-annotations stayed at 2.13.4 and jackson-dataformat-cbor (from the AWS SDK) at 2.12.6. Import com.fasterxml.jackson:jackson-bom so every Jackson module the plugin packages is aligned on one version. Versions: - jackson-databind 2.13.4.2 -> 2.18.12 (jackson.databind.version replaced by jackson.version + jackson-bom import in root dependencyManagement) - jackson-core / jackson-annotations 2.13.4 -> 2.18.12 (via the BOM) - jackson-dataformat-cbor 2.12.6 -> 2.18.12 (via the BOM; comes from aws-java-sdk-core 1.12.552) Bugs: none completed by this PR alone (plan S3-1: 0 / 0); it removes the amazon-s3-plugins copies of the jackson-core / jackson-databind CVEs, which also need the other plugin repos. Risk: low. Jackson 2.15+ adds default stream read limits (max string length 20M, nesting depth 1000) and 2.18 changes some property introspection; the plugin only uses Jackson through the AWS SDK v1, which supports 2.18. Testing: JDK 8. mvn -B clean verify: BUILD SUCCESS, Checkstyle 0 violations, S3ConnectorTest, S3BatchSourceTest, S3PathTest: Tests run: 8, Failures: 0, Errors: 0, Skipped: 1 (S3ConnectorTest is skipped by Assume without AWS credentials). mvn dependency:tree -Dincludes=com.fasterxml.jackson*: develop shows databind 2.13.4.2, core/annotations 2.13.4, cbor 2.12.6; this branch shows only 2.18.12 (compile, provided and test). unzip -l of target/amazon-s3-plugins-1.22.0-SNAPSHOT.jar: lib/jackson-annotations, -core, -databind and -dataformat-cbor are all 2.18.12. e2e-tests profile not run (needs AWS credentials). --- pom.xml | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index d4db041..8f59ccb 100644 --- a/pom.xml +++ b/pom.xml @@ -66,14 +66,25 @@ 4.5.14 ${project.basedir} ${project.basedir}/src/test/java/ - 2.13.4.2 + 2.18.12 + + + + com.fasterxml.jackson + jackson-bom + ${jackson.version} + pom + import + + + + com.fasterxml.jackson.core jackson-databind - ${jackson.databind.version}