Spec v0.2.1 (§4.1 row 5, R-D2): the in-house compliance-dast crate re-implements spidering and active checks that OWASP ZAP already does deterministically and with broader rule coverage. Keep the LLM agents on top (context-seeded exploitation, chaining, explanation) and put ZAP underneath for reproducible coverage — good for control evidence (deterministic detector → control-map LUT → grounded judge) and for the nightly regression (#188). Follows the Nuclei integration; same architecture.
Documented as a decided integration in docs/reference/tools.md (Planned integrations) and docs/features/control-mapping.md; this issue is the source-code half.
Scope
Runner: zaproxy/zap-stable container as a Werkbank job (zap-baseline.py first, zap-full-scan.py behind the existing "destructive tests" flag). Never against production — only the target's declared LiveUrl / provisioned twin.
## Why
Spec v0.2.1 (§4.1 row 5, R-D2): the in-house `compliance-dast` crate re-implements spidering and active checks that OWASP ZAP already does deterministically and with broader rule coverage. Keep the LLM agents on top (context-seeded exploitation, chaining, explanation) and put ZAP underneath for reproducible coverage — good for control evidence (deterministic detector → `control-map` LUT → grounded judge) and for the nightly regression (#188). Follows the Nuclei integration; same architecture.
Documented as a decided integration in `docs/reference/tools.md` (Planned integrations) and `docs/features/control-mapping.md`; this issue is the source-code half.
## Scope
1. **Runner**: `zaproxy/zap-stable` container as a Werkbank job (`zap-baseline.py` first, `zap-full-scan.py` behind the existing "destructive tests" flag). Never against production — only the target's declared `LiveUrl` / provisioned twin.
2. **Auth**: map `WebArtifactConfig` auth (basic / bearer / cookie / form) to ZAP context/auth scripts; honour excluded paths and rate limit.
3. **Parser**: ZAP JSON (or SARIF) report → `Finding` (rule_id = plugin id, `cwe` from `cweid`, evidence = URL + param + evidence string, severity from risk). Dedup with nuclei/agentic findings via existing fingerprinting (same URL + CWE + param).
4. **Control mapping**: ZAP plugin-id/CWE rows in `control-map/data/cra_control_map.json`.
5. **Agentic layer**: feed ZAP alerts into the DAST/pentest prompt as seed context; the agent verifies/exploits rather than rediscovers.
6. **Docs**: promote ZAP from "Planned integrations" to the live tool list; update `docs/features/dast.md` and the control-mapping detector list.
## Acceptance
- [ ] Juice Shop demo target: ZAP baseline findings stored with CWE + control_refs; agent run shows them as seed context.
- [ ] Authenticated (form) scan works against a demo target.
- [ ] Reproducible: two consecutive baseline runs on an unchanged target produce the same finding set (basis for #188 golden baseline).
- [ ] Deterministic detectors (semgrep, gitleaks, syft/osv, nuclei, ZAP, PLC linter) all listed in `docs/features/control-mapping.md`.
Depends on: Nuclei detector issue (shared runner + parser + LUT plumbing). Relates: #186, #188, werkbank#1. Spec: R-D2.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Why
Spec v0.2.1 (§4.1 row 5, R-D2): the in-house
compliance-dastcrate re-implements spidering and active checks that OWASP ZAP already does deterministically and with broader rule coverage. Keep the LLM agents on top (context-seeded exploitation, chaining, explanation) and put ZAP underneath for reproducible coverage — good for control evidence (deterministic detector →control-mapLUT → grounded judge) and for the nightly regression (#188). Follows the Nuclei integration; same architecture.Documented as a decided integration in
docs/reference/tools.md(Planned integrations) anddocs/features/control-mapping.md; this issue is the source-code half.Scope
zaproxy/zap-stablecontainer as a Werkbank job (zap-baseline.pyfirst,zap-full-scan.pybehind the existing "destructive tests" flag). Never against production — only the target's declaredLiveUrl/ provisioned twin.WebArtifactConfigauth (basic / bearer / cookie / form) to ZAP context/auth scripts; honour excluded paths and rate limit.Finding(rule_id = plugin id,cwefromcweid, evidence = URL + param + evidence string, severity from risk). Dedup with nuclei/agentic findings via existing fingerprinting (same URL + CWE + param).control-map/data/cra_control_map.json.docs/features/dast.mdand the control-mapping detector list.Acceptance
docs/features/control-mapping.md.Depends on: Nuclei detector issue (shared runner + parser + LUT plumbing). Relates: #186, #188, werkbank#1. Spec: R-D2.