Skip to content

Commit

Permalink
[ML-161] Excluding log4j 1.x dependency from Spark core to avoid log4… (
Browse files Browse the repository at this point in the history
#162)

* [ML-161] Excluding log4j 1.x dependency from Spark core to avoid log4j vulnerability

* Add comments about security concerns
  • Loading branch information
Hong authored Dec 21, 2021
1 parent 559ff5d commit 2fc1e6b
Show file tree
Hide file tree
Showing 8 changed files with 88 additions and 0 deletions.
11 changes: 11 additions & 0 deletions examples/als/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,17 @@
<artifactId>spark-sql_2.12</artifactId>
<version>${spark.version}</version>
<scope>provided</scope>
<!--This is needed to exclude log4j1.x from Spark core dependency to avoid vulnerabilities -->
<exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
</exclusion>
<exclusion>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
</exclusion>
</exclusions>
</dependency>

<dependency>
Expand Down
11 changes: 11 additions & 0 deletions examples/correlation/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,17 @@
<artifactId>spark-sql_2.12</artifactId>
<version>${spark.version}</version>
<scope>provided</scope>
<!--This is needed to exclude log4j1.x from Spark core dependency to avoid vulnerabilities -->
<exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
</exclusion>
<exclusion>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
</exclusion>
</exclusions>
</dependency>

<dependency>
Expand Down
11 changes: 11 additions & 0 deletions examples/kmeans/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,17 @@
<artifactId>spark-sql_2.12</artifactId>
<version>${spark.version}</version>
<scope>provided</scope>
<!--This is needed to exclude log4j1.x from Spark core dependency to avoid vulnerabilities -->
<exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
</exclusion>
<exclusion>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
</exclusion>
</exclusions>
</dependency>

<dependency>
Expand Down
11 changes: 11 additions & 0 deletions examples/linear-regression/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,17 @@
<artifactId>spark-sql_2.12</artifactId>
<version>${spark.version}</version>
<scope>provided</scope>
<!--This is needed to exclude log4j1.x from Spark core dependency to avoid vulnerabilities -->
<exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
</exclusion>
<exclusion>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
</exclusion>
</exclusions>
</dependency>

<dependency>
Expand Down
11 changes: 11 additions & 0 deletions examples/naive-bayes/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,17 @@
<artifactId>spark-sql_2.12</artifactId>
<version>${spark.version}</version>
<scope>provided</scope>
<!--This is needed to exclude log4j1.x from Spark core dependency to avoid vulnerabilities -->
<exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
</exclusion>
<exclusion>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
</exclusion>
</exclusions>
</dependency>

<dependency>
Expand Down
11 changes: 11 additions & 0 deletions examples/pca/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,17 @@
<artifactId>spark-sql_2.12</artifactId>
<version>${spark.version}</version>
<scope>provided</scope>
<!--This is needed to exclude log4j1.x from Spark core dependency to avoid vulnerabilities -->
<exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
</exclusion>
<exclusion>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
</exclusion>
</exclusions>
</dependency>

<dependency>
Expand Down
11 changes: 11 additions & 0 deletions examples/summarizer/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,17 @@
<artifactId>spark-sql_2.12</artifactId>
<version>${spark.version}</version>
<!--<scope>provided</scope>-->
<!--This is needed to exclude log4j1.x from Spark core dependency to avoid vulnerabilities -->
<exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
</exclusion>
<exclusion>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
</exclusion>
</exclusions>
</dependency>

<dependency>
Expand Down
11 changes: 11 additions & 0 deletions mllib-dal/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,17 @@
<artifactId>spark-core_2.12</artifactId>
<version>${spark.version}</version>
<scope>provided</scope>
<!--This is needed to exclude log4j1.x from Spark core dependency to avoid vulnerabilities -->
<exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
</exclusion>
<exclusion>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.spark</groupId>
Expand Down

0 comments on commit 2fc1e6b

Please sign in to comment.