Skip to content
This repository was archived by the owner on Nov 22, 2024. It is now read-only.

Commit 793bffe

Browse files
Updating databind to fix vulnerability (#1177)
Fixing https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-36518 + removing `val jacksonDatabindOperator` as it's not used anywhere
1 parent 7195cd6 commit 793bffe

1 file changed

Lines changed: 20 additions & 7 deletions

File tree

core/project/Dependencies.scala

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ object Dependencies {
1515
val spark = "2.4.5"
1616
val fabric8 = "5.0.3"
1717
val jackson = "2.13.2"
18+
//TODO remove jacksonDatabind when jackson 2.13.3 plus excludes in avro and jacksonScala
1819
val jacksonDatabind = "2.13.2.2"
1920
val slf4j = "1.7.30"
2021
val scalaTest = "3.2.3"
@@ -73,11 +74,13 @@ object Dependencies {
7374
val akkaGrpcRuntime = "com.lightbend.akka.grpc" %% "akka-grpc-runtime" % Versions.akkaGrpc
7475

7576
val akkaStreamContrib = "com.typesafe.akka" %% "akka-stream-contrib" % "0.10"
76-
val avro = "org.apache.avro" % "avro" % "1.11.0"
77+
val avro = ("org.apache.avro" % "avro" % "1.11.0")
78+
.exclude("com.fasterxml.jackson.core", "jackson-databind")
7779

7880
val jacksonCore = "com.fasterxml.jackson.core" % "jackson-core" % Versions.jackson
7981
val jacksonDatabind = "com.fasterxml.jackson.core" % "jackson-databind" % Versions.jacksonDatabind
80-
val jacksonScala = "com.fasterxml.jackson.module" %% "jackson-module-scala" % Versions.jackson
82+
val jacksonScala = ("com.fasterxml.jackson.module" %% "jackson-module-scala" % Versions.jackson)
83+
.exclude("com.fasterxml.jackson.core", "jackson-databind")
8184

8285
val slf4jApi = "org.slf4j" % "slf4j-api" % "1.7.33"
8386
val sprayJson = "io.spray" %% "spray-json" % "1.3.5"
@@ -127,6 +130,7 @@ object Dependencies {
127130
libraryDependencies ++= Seq(
128131
Compile.fabric8KubernetesClient,
129132
Compile.jacksonScala,
133+
Compile.jacksonDatabind,
130134
Compile.typesafeConfig,
131135
Compile.pureConfig,
132136
Compile.scalatest % Test)
@@ -143,7 +147,11 @@ object Dependencies {
143147
Compile.scalatest % Test)
144148

145149
val cloudflowCrd =
146-
libraryDependencies ++= Seq(Compile.fabric8KubernetesClient, Compile.jacksonScala, Compile.scalatest % Test)
150+
libraryDependencies ++= Seq(
151+
Compile.fabric8KubernetesClient,
152+
Compile.jacksonScala,
153+
Compile.jacksonDatabind,
154+
Compile.scalatest % Test)
147155

148156
val cloudflowIt =
149157
libraryDependencies ++= Seq(Compile.commonsCodec % Test, Compile.commonsCompress % Test, Compile.scalatest % Test)
@@ -157,13 +165,14 @@ object Dependencies {
157165
Compile.sprayJson,
158166
// TODO: check if Avro and ScalaPB can stay in a separate module
159167
Compile.avro,
168+
Compile.jacksonDatabind,
160169
Compile.scalaPbRuntime,
161170
Compile.logback % Test,
162171
Compile.scalatest % Test,
163172
Compile.kafkaClient % Test,
164173
TestDeps.avro4s)
165174

166-
val cloudflowOperator = Seq(
175+
val cloudflowOperator =
167176
libraryDependencies ++= Seq(
168177
Compile.akkaActor,
169178
Compile.akkaStream,
@@ -175,8 +184,7 @@ object Dependencies {
175184
Compile.kubeActions,
176185
Compile.kafkaClient,
177186
Compile.scalatest % Test,
178-
TestDeps.avro4s),
179-
dependencyOverrides += Compile.jacksonDatabind)
187+
TestDeps.avro4s)
180188

181189
val cloudflowExtractor =
182190
libraryDependencies ++= Seq(Compile.typesafeConfig, Compile.classgraph, Compile.scalatest % Test)
@@ -193,7 +201,11 @@ object Dependencies {
193201
Compile.scalatest % Test)
194202

195203
val cloudflowRunnerConfig =
196-
libraryDependencies ++= Seq(Compile.jacksonScala, Compile.typesafeConfig % Test, Compile.scalatest % Test)
204+
libraryDependencies ++= Seq(
205+
Compile.jacksonScala,
206+
Compile.jacksonDatabind,
207+
Compile.typesafeConfig % Test,
208+
Compile.scalatest % Test)
197209

198210
val cloudflowStreamlet =
199211
libraryDependencies ++= Seq(
@@ -220,6 +232,7 @@ object Dependencies {
220232
Compile.akkaDiscoveryK8,
221233
Compile.logback,
222234
Compile.jacksonScala,
235+
Compile.jacksonDatabind,
223236
Compile.sprayJson,
224237
Compile.ficus)
225238

0 commit comments

Comments
 (0)