Run an OWASP ZAP Passive Baseline in an Isolated Lab
Before you begin
- Applies to:An OWASP ZAP passive baseline in an isolated lab or against an application you own and are authorized to assess.
- Where to start:Start in the isolated lab and confirm the test application's address before using the baseline.
- What you need:Have a disposable test application or approved assessment scope and a suitable location for the report.
Guide tools
OWASP ZAPโs baseline scan performs passive analysis of HTTP traffic. This lab runs it against OWASP Juice Shop inside a Docker network that is not published to the host, then saves a report for review.
Use the lab for training or against an application you own and are authorized to assess. A passive baseline is useful for finding common web security signals, but it is not a penetration test or a complete security assessment.
Prepare an Isolated Lab Network
Lab SetupConfirm Docker is available and create a dedicated bridge network. The application container will not publish a port on the host; the scanner can reach it by its container name over this network.
docker --versionif docker network inspect configcorner-zap-lab >/dev/null 2>&1; then echo 'configcorner-zap-lab already exists; choose a fresh lab name.' >&2 exit 1fiif docker container inspect configcorner-juice-shop >/dev/null 2>&1; then echo 'configcorner-juice-shop already exists; choose a fresh lab name.' >&2 exit 1fimkdir -m 0700 zap-reports || { echo 'zap-reports already exists; choose a fresh output directory.' >&2; exit 1; }docker network create --internal configcorner-zap-lab || exit 1โฏ Illustrative Output (Results Vary)
Docker version ...<network-id>Run Juice Shop Without Publishing a Host Port
Training TargetStart the official Juice Shop container on the private lab network. No host port is published, so Docker does not expose the application through a published host port; the internal network also blocks external connectivity.
docker run -d --name configcorner-juice-shop --network configcorner-zap-lab \ bkimminich/juice-shop || exit 1docker ps --filter name=configcorner-juice-shopโฏ Illustrative Output (Results Vary)
CONTAINER ID IMAGE STATUS... bkimminich/juice-shop Up ...Generate a Baseline Report
Passive ReviewRun the official stable ZAP container on the same network and mount only the report directory. The baseline script spiders the target and reports passive findings; it does not perform active attack scans.
docker run --rm --network configcorner-zap-lab \ -v "$PWD/zap-reports:/zap/wrk/:rw" \ zaproxy/zap-stable \ zap-baseline.py -t http://configcorner-juice-shop:3000 -r baseline.html || exit 1โฏ Illustrative Output (Results Vary)
PASS: The target appears to be availableWARN-NEW: ...Report generated at: /zap/wrk/baseline.htmlReview Evidence and Remove Containers
CloseoutOpen the HTML report, validate each alert in context, and record which findings are real, false positives, or accepted risks. Keep the report access-controlled if it contains application details. Remove the lab when finished.
ls -lh zap-reports/baseline.htmldocker stop configcorner-juice-shop && docker rm configcorner-juice-shop || exit 1docker network rm configcorner-zap-lab || exit 1โฏ Illustrative Output (Results Vary)
baseline.html ...Kconfigcorner-juice-shopconfigcorner-zap-lab
Figure 1: ZAPโs Alerts view lists passive response-header findings for the isolated Juice Shop target.
Your feedback keeps these production procedures accurate and battle-tested.