Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,7 @@ build/

### Performance recordings ###
perf/

### ZAP scan artefacts ###
gen.conf
zap-report.html
18 changes: 13 additions & 5 deletions zap.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
docker run -v "$(pwd)":/zap/wrk/:rw -t ghcr.io/zaproxy/zaproxy:stable zap-api-scan.py \
#!/usr/bin/env bash
# Run a ZAP API scan against a locally running OpenAPI server.
# Prerequisite: the example server must be listening on :8080, e.g.
# mvn test-compile exec:java \
# -Dexec.mainClass=com.retailsvc.http.start.ServerLauncher \
# -Dexec.classpathScope=test
set -euo pipefail

docker run --rm -v "$(pwd)":/zap/wrk/:rw -t ghcr.io/zaproxy/zaproxy:stable zap-api-scan.py \
-t src/test/resources/openapi.json \
-P 8080 \
-f openapi \
-s -g gen.conf \
-r zap-report.html \
-t http://host.docker.internal:8080
-O http://host.docker.internal:8080 \
-s \
-g gen.conf \
-r zap-report.html
Loading