Files
pruefwerk/compliance-agent
Sharang ParnerkarandClaude Opus 5.5 535c62ffb7
CI / Check (push) Skipped
CI / Detect Changes (pull_request) Skipped
CI / Deploy Dashboard (pull_request) Skipped
CI / Deploy Docs (pull_request) Skipped
CI / Deploy MCP (pull_request) Skipped
CI / Agent integration (pull_request) Successful in 4m45s
CI / Deploy Agent (pull_request) Skipped
CI / Check (pull_request) Successful in 21m4s
feat(pipeline): DAST findings are findings of the target (#998)
A target's DAST scan stored its findings in `dast_findings` only, so they
had no control refs and never reached the findings list, the issue
tracker or the evidence pack.

- New `pipeline::dast_findings::as_finding`: a DAST finding as a finding
  of the target (scanner `dast`, `ScanType::Dast`, rule `dast-<type>`).
  - Fingerprint: target + the existing DAST fingerprint (canonical title,
    endpoint, method, parameter), so a later scan finds it again instead
    of adding it twice.
  - CWE normalised; control refs from the CWE, as for imported pentest
    findings (`import::control_refs`, now `pub(crate)`).
  - The endpoint, method and parameter go into the description; the
    request/response evidence stays with the DAST finding.
- The DAST stage stores each new one (as the ICS probe does) and counts
  it in the run's new findings.
- Docs: where DAST findings show up.

Tests:
- unit: the mapping, and which findings share a fingerprint;
- `tests/dast_findings.rs`: a target whose live URL allows any CORS
  origin gets a `dast` CWE-942 finding with `cra-ai-1`, and a second scan
  adds nothing. It fails on main.

Part 2 of #998 (point 2).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Q9inRcu428A2iNjDHPEAT9
2026-11-16 11:39:50 +01:00
..