Skip to content

ZAP Script - #550

Open
darkspirit510 wants to merge 2 commits into
OWASP-Benchmark:masterfrom
darkspirit510:run-zap-script
Open

darkspirit510 wants to merge 2 commits into
OWASP-Benchmark:masterfrom
darkspirit510:run-zap-script

Conversation

@darkspirit510

Copy link
Copy Markdown
Contributor

I used Claude to create script to invoke ZAP locally. It creates a JSON directly, but can also be used with --keep-zap to use scripts/fetchZAPResults.sh.

AI Stuff:

Summary

One command: build and start Benchmark, scan it with ZAP in Docker, write the report to results/java/, then shut everything down.

runZAP.sh [--depth=quick|standard|full|insane] [--discovery=spider|spider+ajax|spider+crawler] [--debug] [--keep-zap]
  start Benchmark (8443)
  start ZAP container (127.0.0.1:809x, random API key, scope locked to /benchmark/)
  spider → active scan (only rules for the Benchmark's DAST CWEs)
  write Benchmark_<ver>-ZAPweekly-<date>-<secs>.json
  stop ZAP (unless --keep-zap) and Benchmark

--keep-zap leaves ZAP running, so a report can be fetched over its API (e.g. with #450).

Evidence

  • Report: ./scripts/runZAP.sh → results/java/Benchmark_1.2-ZAPweekly-20261102-1545.json, scored by ./createScorecards.sh
  • --keep-zap: curl http://localhost:8090/OTHER/core/other/xmlreport/ → 200, <OWASPZAPReport …>

Merge Danger

Door: two-way

Blast Radius: none (new script, no existing files touched)

🤖 Generated with Claude Code

@davewichers

Copy link
Copy Markdown
Contributor

Maybe change the script name to be more descriptive? something like scanBenchmark_wZapInDocker.sh?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants