Problem: the security-header, Content-Security-Policy, cookie and TLS checks existed only as tools the LLM pentest could call. A DAST scan of a site without a CSP said nothing about it (#270).
Change:
New compliance_dast::checks::run_checks runs the four checks against the target's base URL. It uses the scan's client (with the target's login) and NetGuard. A check that cannot run is logged; the others still run.
The DAST scan runs them at the start of its vulnerability analysis and adds their findings to the run. With #1008 they also become findings of the target.
CORS stays with the API fuzzer agent, which every scan runs already. Running cors_checker as well would report the same problem twice under another title.
Docs (features/dast.md): the Check step of a DAST scan.
Tests (compliance-dast/tests/checks.rs, a local fake site):
A site without a policy and with a flagless session cookie gets the missing-CSP and cookie findings. On main's scan code this test fails.
A site that sends a policy does not get the missing-CSP finding.
cargo test -p compliance-dast passes in full (the login tests count requests too), and clippy with CI's flags is clean.
Open, not in this PR: a missing CSP is reported as CWE-16, and the CRA control map binds no control to CWE-16 (or CWE-693). So the missing-CSP finding gets no control ref, and #998's acceptance needs that mapping decided.
Part 3 of #998 (point 3). Independent of #1008.
**Problem:** the security-header, Content-Security-Policy, cookie and TLS checks existed only as tools the LLM pentest could call. A DAST scan of a site without a CSP said nothing about it (#270).
**Change:**
- New `compliance_dast::checks::run_checks` runs the four checks against the target's base URL. It uses the scan's client (with the target's login) and NetGuard. A check that cannot run is logged; the others still run.
- The DAST scan runs them at the start of its vulnerability analysis and adds their findings to the run. With #1008 they also become findings of the target.
- CORS stays with the API fuzzer agent, which every scan runs already. Running `cors_checker` as well would report the same problem twice under another title.
- DNS/DMARC wait on #318, as the issue says.
- Docs (`features/dast.md`): the Check step of a DAST scan.
**Tests** (`compliance-dast/tests/checks.rs`, a local fake site):
- A site without a policy and with a flagless session cookie gets the missing-CSP and cookie findings. On main's scan code this test fails.
- A site that sends a policy does not get the missing-CSP finding.
- `cargo test -p compliance-dast` passes in full (the login tests count requests too), and clippy with CI's flags is clean.
**Open, not in this PR:** a missing CSP is reported as CWE-16, and the CRA control map binds no control to CWE-16 (or CWE-693). So the missing-CSP finding gets no control ref, and #998's acceptance needs that mapping decided.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_01Q9inRcu428A2iNjDHPEAT9
The security-header, Content-Security-Policy, cookie and TLS checks
existed only as tools the LLM pentest could call. A DAST scan of a site
without a CSP therefore said nothing about it.
- New `compliance_dast::checks::run_checks`: the four checks against the
target's base URL, with the scan's (logged-in) client and NetGuard. A
check that cannot run is logged; the others still run.
- The scan runs them at the start of its vulnerability analysis and adds
their findings to the run.
- CORS stays with the API fuzzer agent, which every scan runs already;
running the CORS tool too would report the same problem twice.
- Docs: the Check step of a DAST scan.
Tests (`compliance-dast/tests/checks.rs`): a site without a policy and
with a flagless session cookie gets the missing-CSP and cookie findings
(fails on main); a site that sends a policy does not get the missing one.
Part 3 of #998 (point 3; DNS/DMARC wait on #318).
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 3 of #998 (point 3). Independent of #1008.
Problem: the security-header, Content-Security-Policy, cookie and TLS checks existed only as tools the LLM pentest could call. A DAST scan of a site without a CSP said nothing about it (#270).
Change:
compliance_dast::checks::run_checksruns the four checks against the target's base URL. It uses the scan's client (with the target's login) and NetGuard. A check that cannot run is logged; the others still run.cors_checkeras well would report the same problem twice under another title.features/dast.md): the Check step of a DAST scan.Tests (
compliance-dast/tests/checks.rs, a local fake site):cargo test -p compliance-dastpasses in full (the login tests count requests too), and clippy with CI's flags is clean.Open, not in this PR: a missing CSP is reported as CWE-16, and the CRA control map binds no control to CWE-16 (or CWE-693). So the missing-CSP finding gets no control ref, and #998's acceptance needs that mapping decided.
🤖 Generated with Claude Code
https://claude.ai/code/session_01Q9inRcu428A2iNjDHPEAT9