forked from google/tsunami-security-scanner
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request google#20 from rayanht:feature/docker-image
PiperOrigin-RevId: 346512529 Change-Id: I3cbc95956c0b9286deb90577e7af1917b37ef5bf
- Loading branch information
Showing
3 changed files
with
99 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Git-related files | ||
.gitattributes | ||
.gitignore | ||
.git/ | ||
|
||
# IDE files | ||
.idea/ | ||
.vscode/ | ||
|
||
# Build cache | ||
.gradle/ | ||
|
||
# Documentation | ||
docs/ | ||
LICENSE | ||
README.md | ||
|
||
# Miscellaneous | ||
quick_start.sh | ||
Dockerfile | ||
.dockerignore |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
FROM openjdk:13-jdk-slim-buster | ||
|
||
# Install dependencies | ||
RUN apt-get update \ | ||
&& apt-get install -y --no-install-recommends nmap ncrack git ca-certificates \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
WORKDIR /usr/tsunami/repos | ||
|
||
# Clone the plugins repo | ||
RUN git clone --depth 1 "https://github.com/google/tsunami-security-scanner-plugins" | ||
|
||
# Build plugins | ||
WORKDIR /usr/tsunami/repos/tsunami-security-scanner-plugins/google | ||
RUN chmod +x build_all.sh \ | ||
&& ./build_all.sh | ||
|
||
RUN mkdir /usr/tsunami/plugins | ||
RUN cp build/plugins/*.jar /usr/tsunami/plugins | ||
|
||
# Compile the Tsunami scanner | ||
WORKDIR /usr/repos/tsunami-security-scanner | ||
COPY . . | ||
RUN ./gradlew shadowJar | ||
|
||
RUN cp $(find "./" -name 'tsunami-main-*-cli.jar') /usr/tsunami/tsunami.jar | ||
RUN cp ./tsunami.yaml /usr/tsunami | ||
|
||
WORKDIR /usr/tsunami | ||
|
||
RUN mkdir logs/ | ||
|
||
ENTRYPOINT ["java", "-cp", "tsunami.jar:plugins/*", "-Dtsunami-config.location=tsunami.yaml", "com.google.tsunami.main.cli.TsunamiCli"] | ||
CMD ["--ip-v4-target=127.0.0.1", "--scan-results-local-output-format=JSON", "--scan-results-local-output-filename=logs/tsunami-output.json"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters