From 60251d46275da4ecae742b4ae1e66de010404658 Mon Sep 17 00:00:00 2001 From: ManishSihag Date: Thu, 19 Sep 2024 15:59:04 -0700 Subject: [PATCH] Add Dockerfile for OWASP ZAP tool --- tools/owasp/Dockerfile | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 tools/owasp/Dockerfile diff --git a/tools/owasp/Dockerfile b/tools/owasp/Dockerfile new file mode 100644 index 000000000..c4706bdf1 --- /dev/null +++ b/tools/owasp/Dockerfile @@ -0,0 +1,21 @@ +# Dockerfile for building the OWASP ZAP image used by the OWASP ZAP scan job in the pipeline. +# This image is already available in the OpenShift imagestream and does not need to be rebuilt unless changes are necessary. +# The OWASP ZAP scan job is triggered by Argo CD after the application's deployment is complete and will use the image from the imagestream to run the scan. +# Only modify this file and rebuild the image if updates to the image are required. + +# Use the official OWASP ZAP stable image as the base +FROM zaproxy/zap-stable:latest + +# Switch to root user for permission changes +USER root + +# Set permissions for /zap and /home/zap directories +RUN chown -R zap:zap /zap && \ + chmod -R 777 /zap && \ + chmod -R 777 /home/zap + +# Set /zap as the working directory +WORKDIR /zap + +# Switch back to the zap user +USER zap \ No newline at end of file