Skip to content
This repository was archived by the owner on Jun 2, 2025. It is now read-only.

Commit e4a21e5

Browse files
committed
add apt-get upgrade to address critical vulnerabilities
1 parent 2b0b72a commit e4a21e5

File tree

2 files changed

+18
-6
lines changed

2 files changed

+18
-6
lines changed

Dockerfile

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ ENV DEBIAN_FRONTEND=noninteractive
55
LABEL com.amazonaws.sagemaker.capabilities.accept-bind-to-port=true
66

77
RUN apt-get update \
8+
&& apt-get -y upgrade \
89
&& apt-get -y install apt-utils \
910
net-tools \
1011
apt-transport-https \
@@ -77,20 +78,26 @@ RUN rm /usr/share/java/wagon-http-shaded-3.3.4.jar
7778
# comment out if need to use maven utilities
7879
RUN find / -depth -name plexus-utils -type d -exec rm -r "{}" \;
7980

80-
# remove old version of json-smart with vulnerability
81-
# RUN find / -depth -name json-smart -type d -exec rm -r "{}/2.3" \;
82-
8381
# remove old version of commons-compress with vulnerability
8482
RUN find / -depth -name commons-compress -type d -exec rm -r "{}/1.20" \;
8583

8684
# remove jar files from common-io v2.5 and 2.6 both have vulnerabilities
8785
RUN find / -name commons-io*2.5.jar -type f -exec rm "{}" \;
8886
RUN find / -name commons-io*2.6.jar -type f -exec rm "{}" \;
8987

90-
# remove old version of spring-core with vulnerability
91-
# RUN find / -depth -name spring-core -type d -exec rm -r "{}/5.1.19.RELEASE" \;
92-
9388
# remove jackson-databind
9489
RUN find / -name jackson-databind -type d -exec rm -r "{}/2.13.3" \;
9590

91+
# remove junit-4.12.jar
92+
RUN find / -name junit-4.12.jar -type f -exec rm "{}" \;
93+
94+
# remove maven-compiler-plugin jar from maven repo
95+
RUN find / -name maven-compiler-plugin*.jar -type f -exec rm "{}" \;
96+
97+
# remove guava jar files
98+
RUN rm /usr/share/java/guava.jar && rm /root/.m2/repository/com/google/guava/guava/10.0.1/guava-10.0.1.jar
99+
100+
# remove commons-codec jar
101+
RUN find / -name commons-codec-1.11.jar -type f -exec rm "{}" \;
102+
96103
ENTRYPOINT ["/usr/local/bin/serve.sh"]

pom.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -395,6 +395,11 @@
395395
<artifactId>logback-core</artifactId>
396396
<version>1.2.11</version>
397397
</dependency>
398+
<dependency>
399+
<groupId>commons-codec</groupId>
400+
<artifactId>commons-codec</artifactId>
401+
<version>1.15</version>
402+
</dependency>
398403
</dependencies>
399404
<properties>
400405
<java.version>1.8</java.version>

0 commit comments

Comments
 (0)