Skip to content

Commit

Permalink
add non-vulnerable dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
roo-ahine committed Jan 30, 2025
1 parent a048acf commit 60acf38
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 11 deletions.
14 changes: 3 additions & 11 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,3 @@
# trigger test
FROM public.ecr.aws/docker/library/maven:3.8.4-jdk-8

COPY . /usr/src/poc
WORKDIR /usr/src/poc
RUN mvn clean && mvn package

# set this to disable the exploit
#ENV LOG4J_FORMAT_MSG_NO_LOOKUPS=true
ENV SECRET_VALUE='if you can read this this code is vulnerable'
CMD ["java", "-jar", "/usr/src/poc/target/log4j-rce-1.0-SNAPSHOT-jar-with-dependencies.jar"]
FROM scratch
COPY hello /
CMD ["/hello"]
11 changes: 11 additions & 0 deletions vulnerable_log4j_docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# trigger test
FROM public.ecr.aws/docker/library/maven:3.8.4-jdk-8

COPY . /usr/src/poc
WORKDIR /usr/src/poc
RUN mvn clean && mvn package

# set this to disable the exploit
#ENV LOG4J_FORMAT_MSG_NO_LOOKUPS=true
ENV SECRET_VALUE='if you can read this this code is vulnerable'
CMD ["java", "-jar", "/usr/src/poc/target/log4j-rce-1.0-SNAPSHOT-jar-with-dependencies.jar"]
File renamed without changes.
File renamed without changes.

0 comments on commit 60acf38

Please sign in to comment.