Problem: a target's DAST scan stored its findings in dast_findings only. They had no control refs and never reached the findings list, the issue tracker or the evidence pack.
Change:
New pipeline::dast_findings::as_finding turns a DAST finding into a finding of the target: scanner dast, ScanType::Dast, rule dast-<type>.
Fingerprint: the target plus the existing DAST fingerprint (dedup::compute_dast_fingerprint: canonical title, endpoint, method, parameter). A later scan finds the same weakness again instead of adding it twice.
CWE: normalised. Control refs come from the CWE, as for imported pentest findings (import::control_refs, now pub(crate)). The control map has no DAST tool bindings.
Description: names the endpoint, method and parameter. The request/response evidence stays with the DAST finding (DAST > Findings).
The DAST stage stores each new one, as the ICS probe does (skipping known fingerprints), and counts it in the run's new_findings_count.
Docs (features/dast.md): where DAST findings show up.
Tests:
unit: the mapping (CWE-942 → cra-ai-1), and which findings share a fingerprint.
compliance-agent/tests/dast_findings.rs, its own binary because it allows private targets for its process. A target whose live URL allows any CORS origin gets a dast finding with CWE-942 and cra-ai-1, and a second scan adds nothing. On main's pipeline code it fails.
Locally against Mongo 7: this test, the e2e DAST tests and clippy with CI's flags.
Not in this PR:
A missing CSP maps to CWE-693, which has no control in the CRA map. The acceptance ("a missing CSP with control refs") needs a binding there; that comes with point 3, the deterministic checks.
Findings a later scan no longer reports are not resolved yet, the same as for the ICS probe.
Part 2 of #998 (point 2). Builds on #1007.
**Problem:** a target's DAST scan stored its findings in `dast_findings` only. They had no control refs and never reached the findings list, the issue tracker or the evidence pack.
**Change:**
- New `pipeline::dast_findings::as_finding` turns a DAST finding into a finding of the target: scanner `dast`, `ScanType::Dast`, rule `dast-<type>`.
- **Fingerprint:** the target plus the existing DAST fingerprint (`dedup::compute_dast_fingerprint`: canonical title, endpoint, method, parameter). A later scan finds the same weakness again instead of adding it twice.
- **CWE:** normalised. Control refs come from the CWE, as for imported pentest findings (`import::control_refs`, now `pub(crate)`). The control map has no DAST tool bindings.
- **Description:** names the endpoint, method and parameter. The request/response evidence stays with the DAST finding (**DAST > Findings**).
- The DAST stage stores each new one, as the ICS probe does (skipping known fingerprints), and counts it in the run's `new_findings_count`.
- Docs (`features/dast.md`): where DAST findings show up.
**Tests:**
- unit: the mapping (CWE-942 → `cra-ai-1`), and which findings share a fingerprint.
- `compliance-agent/tests/dast_findings.rs`, its own binary because it allows private targets for its process. A target whose live URL allows any CORS origin gets a `dast` finding with CWE-942 and `cra-ai-1`, and a second scan adds nothing. On main's pipeline code it fails.
- Locally against Mongo 7: this test, the `e2e` DAST tests and clippy with CI's flags.
**Not in this PR:**
- A missing CSP maps to CWE-693, which has no control in the CRA map. The acceptance ("a missing CSP with control refs") needs a binding there; that comes with point 3, the deterministic checks.
- Findings a later scan no longer reports are not resolved yet, the same as for the ICS probe.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_01Q9inRcu428A2iNjDHPEAT9
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
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.
Part 2 of #998 (point 2). Builds on #1007.
Problem: a target's DAST scan stored its findings in
dast_findingsonly. They had no control refs and never reached the findings list, the issue tracker or the evidence pack.Change:
pipeline::dast_findings::as_findingturns a DAST finding into a finding of the target: scannerdast,ScanType::Dast, ruledast-<type>.dedup::compute_dast_fingerprint: canonical title, endpoint, method, parameter). A later scan finds the same weakness again instead of adding it twice.import::control_refs, nowpub(crate)). The control map has no DAST tool bindings.new_findings_count.features/dast.md): where DAST findings show up.Tests:
cra-ai-1), and which findings share a fingerprint.compliance-agent/tests/dast_findings.rs, its own binary because it allows private targets for its process. A target whose live URL allows any CORS origin gets adastfinding with CWE-942 andcra-ai-1, and a second scan adds nothing. On main's pipeline code it fails.e2eDAST tests and clippy with CI's flags.Not in this PR:
🤖 Generated with Claude Code
https://claude.ai/code/session_01Q9inRcu428A2iNjDHPEAT9
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