Skip to content

Commit 3f38510

Browse files
committed
Fix Jackson and Scala vulnerabilities (#373)
* fix jackson and scala vulnerabilities * fix * fix * lint
1 parent 011de5c commit 3f38510

File tree

6 files changed

+17
-15
lines changed

6 files changed

+17
-15
lines changed

core/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
<maven.compiler.source>1.8</maven.compiler.source>
3030
<maven.compiler.target>1.8</maven.compiler.target>
3131
<scala.version>2.12.15</scala.version>
32-
<jackson.version>2.13.4</jackson.version>
32+
<jackson.version>2.13.5</jackson.version>
3333
<scala.binary.version>2.12</scala.binary.version>
3434
</properties>
3535

@@ -153,7 +153,7 @@
153153
<dependency>
154154
<groupId>com.fasterxml.jackson.core</groupId>
155155
<artifactId>jackson-databind</artifactId>
156-
<version>2.13.4.2</version>
156+
<version>${jackson.version}</version>
157157
</dependency>
158158
<dependency>
159159
<groupId>com.fasterxml.jackson.core</groupId>

core/raydp-main/pom.xml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -240,23 +240,20 @@
240240
<artifactId>maven-assembly-plugin</artifactId>
241241
<version>3.0.0</version>
242242
<configuration>
243-
<!--<descriptors>-->
244-
<!--<decriptor>src/main/assembly/assembly.xml</decriptor>-->
245-
<!--</descriptors>-->
246243
<appendAssemblyId>false</appendAssemblyId>
247244
<descriptorRefs>
248245
<descriptorRef>jar-with-dependencies</descriptorRef>
249246
</descriptorRefs>
250247
</configuration>
251-
<executions>
248+
<!-- <executions>
252249
<execution>
253250
<id>assembly</id>
254251
<phase>package</phase>
255252
<goals>
256253
<goal>single</goal>
257254
</goals>
258255
</execution>
259-
</executions>
256+
</executions> -->
260257
</plugin>
261258

262259
<plugin>

core/raydp-main/src/main/scala/org/apache/spark/deploy/raydp/RayAppMaster.scala

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -119,9 +119,14 @@ class RayAppMaster(host: String,
119119
val id = PlacementGroupId.fromBytes(DatatypeConverter.parseHexBinary(hex))
120120
PlacementGroups.getPlacementGroup(id)
121121
}.orNull
122-
private val bundleIndexes: List[Int] = conf.getOption("spark.ray.bundle_indexes")
123-
.map(_.split(",").map(_.toInt).toList)
124-
.getOrElse(List.empty)
122+
private val bundleIndexesOpt: Option[Array[Int]] = conf.getOption("spark.ray.bundle_indexes")
123+
.map(_.split(",").map(_.toInt))
124+
125+
private val bundleIndexesNum: Int = bundleIndexesOpt match {
126+
case Some(n) => n.size
127+
case None => 0
128+
}
129+
125130
private var currentBundleIndex: Int = 0
126131

127132
override def receive: PartialFunction[Any, Unit] = {
@@ -316,9 +321,9 @@ class RayAppMaster(host: String,
316321
}
317322

318323
private def getNextBundleIndex: Int = {
319-
if (placementGroup != null && bundleIndexes.nonEmpty) {
324+
if (placementGroup != null && bundleIndexesNum != 0) {
320325
val previous = currentBundleIndex
321-
currentBundleIndex = (currentBundleIndex + 1) % bundleIndexes.size
326+
currentBundleIndex = (currentBundleIndex + 1) % bundleIndexesNum
322327
previous
323328
} else {
324329
-1

core/shims/spark322/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
<properties>
1919
<scala.version>2.12.15</scala.version>
20-
<jackson.version>2.12.0</jackson.version>
20+
<jackson.version>2.13.5</jackson.version>
2121
</properties>
2222

2323
<build>

core/shims/spark330/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
<properties>
1919
<scala.version>2.12.15</scala.version>
20-
<jackson.version>2.13.3</jackson.version>
20+
<jackson.version>2.13.5</jackson.version>
2121
</properties>
2222

2323
<build>

core/shims/spark340/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
<properties>
1919
<scala.version>2.12.15</scala.version>
20-
<jackson.version>2.13.3</jackson.version>
20+
<jackson.version>2.13.5</jackson.version>
2121
</properties>
2222

2323
<build>

0 commit comments

Comments
 (0)