Skip to content

Commit 214ebca

Browse files
committed
fix: fixed docker vulnerabilities
1 parent a9aefe5 commit 214ebca

File tree

2 files changed

+25
-3
lines changed

2 files changed

+25
-3
lines changed

.trivyignore

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# ===========================
2+
# Log4j 1.x – Non-Exploitable
3+
# ===========================
4+
# Rationale:
5+
# vnu.jar uses only the Log4j ConsoleAppender. None of the vulnerable
6+
# components (JMSAppender, SocketServer, Chainsaw, JDBCAppender, etc.)
7+
# are present, configured, or reachable. No logging configuration is
8+
# user-controlled. Therefore, these CVEs are not exploitable in our use
9+
# case (CLI mode only, no network listeners, no untrusted input passed
10+
# into logging).
11+
#
12+
# Allowed for this image only.
13+
14+
CVE-2023-26464 # Log4j 1.x – insecure deserialization paths; not exploitable because ConsoleAppender only
15+
CVE-2022-23302 # Log4j JMSSink; not used, no JMS classes loaded
16+
CVE-2021-4104 # Log4j JMSAppender remote code execution; not used
17+
CVE-2022-23307 # Log4j Chainsaw vulnerability; Chainsaw not present/configured
18+
CVE-2022-23305 # Log4j SocketServer vulnerability; server not used
19+
CVE-2019-17571 # Log4j SocketServer class; not reachable, ConsoleAppender only

Dockerfile

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,15 @@ RUN apk --no-cache add openjdk21
44

55
FROM base AS build-vnu
66

7-
RUN apk add git python3
7+
RUN apk add git python3 apache-ant
88

99
RUN git clone -n https://github.com/validator/validator.git \
1010
&& cd validator \
11-
&& git checkout 84a1b28ff4cc28b7e9a31784688dbee6366b3467 \
12-
&& JAVA_HOME=/usr/lib/jvm/java-21-openjdk python checker.py update-shallow dldeps build jar
11+
&& git checkout 73476a51eaa3edc43acd5466b48bddcba77c7844 \
12+
&& sed -i 's/jetty-version" value="11.0.20"/jetty-version" value="11.0.25"/' build/build.xml \
13+
&& sed -i 's/commons-fileupload-version" value="2.0.0-M2"/commons-fileupload-version" value="2.0.0-M4"/' build/build.xml \
14+
&& sed -i 's/9.2.25.v20180606/9.4.56.v20240826/' langdetect/pom.xml \
15+
&& JAVA_HOME=/usr/lib/jvm/java-21-openjdk python checker.py dldeps build jar
1316

1417
FROM base
1518

0 commit comments

Comments
 (0)