diff --git a/zaproxy/Dockerfile b/zaproxy/Dockerfile new file mode 100755 index 0000000000000000000000000000000000000000..dfd8afef08f615d48798090c4f2213e68d44d510 --- /dev/null +++ b/zaproxy/Dockerfile @@ -0,0 +1,40 @@ +FROM debian:bullseye-slim + +ARG BUILD_DATE +ARG VCS_REF +ARG VERSION +LABEL org.label-schema.build-date=$BUILD_DATE \ + org.label-schema.name="Owasp Zap Proxy" \ + org.label-schema.description="Docker image to run ZAP proxy web application scans." \ + org.label-schema.vcs-ref=$VCS_REF \ + org.label-schema.vendor="University of Nebraska - Lincoln" \ + org.label-schema.version="0.1.0" \ + org.label-schema.schema-version="1.0" \ + maintainer="Roger Feese <rfeese@nebraska.edu>" + +# Based on https://github.com/zaproxy/zaproxy/blob/main/docker/Dockerfile-stable +# But try to make slimmer. Use Debian as we also are using that for docker build server. + +RUN apt-get update && apt-get install -y \ + wget \ + curl \ + openjdk-11-jdk \ + xmlstarlet \ + unzip \ + python3-pip \ + python-is-python3 \ + firefox-esr \ + && rm -rf /var/lib/apt/lists/* + +WORKDIR /zap + +RUN wget -qO- https://raw.githubusercontent.com/zaproxy/zap-admin/master/ZapVersions.xml | xmlstarlet sel -t -v //url |grep -i Linux | wget --content-disposition -i - -O - | tar zxv && \ + mv ZAP*/* . && \ + rm -R ZAP* + +# Update add-ons +RUN ./zap.sh -cmd -silent -addonupdate +# Copy them to installation directory +RUN cp /root/.ZAP/plugin/*.zap plugin/ || : + +RUN pip3 install --upgrade awscli pip python-owasp-zap-v2.4 pyyaml urllib3