Problem:maybe_trigger_dast started each DAST scan in a detached tokio::spawn. The scan run never waited for it, and a failed DAST scan was only a log line. A run read "completed" whether DAST ran or not.
Change:
The DAST stage awaits each DAST target's scan, with a 20-minute limit, and stores its run and findings as before.
A scan that fails, times out or cannot be stored is recorded as the dast stage with SkipCode::ToolFailed.
The subject is "DAST", so the dashboard's existing wording reads "DAST did not complete; what it checks counts as not assessed."
It fails the stage, not the run.
The error goes to the log only, like the other stages; the DAST run keeps the scanner's reason.
The DAST scan drops its "Exploitation" phase, which was recorded as completed without doing anything. The enum variant stays for stored runs.
Docs (features/dast.md): what a target's scan does with DAST.
Tests:
New integration::api::dast::a_dast_scan_that_does_not_complete_is_a_failed_stage_of_the_run: a target whose live URL does not resolve finishes its scan as completed, with one failed dast stage and a stored, failed DAST run.
On main's graph_build.rs the same test fails, because the run has no dast entry.
Locally against Mongo 7: the DAST integration tests, cargo test -p compliance-dast, and clippy for agent, core and dast with CI's flags.
Note: a scan run now takes as long as its DAST scans, up to 20 minutes per DAST target.
Next parts of #998: DAST findings in the main findings (point 2), the deterministic checks in every scan (point 3), SAST hints (point 4).
Part 1 of #998 (points 1 and 5).
**Problem:** `maybe_trigger_dast` started each DAST scan in a detached `tokio::spawn`. The scan run never waited for it, and a failed DAST scan was only a log line. A run read "completed" whether DAST ran or not.
**Change:**
- The DAST stage awaits each DAST target's scan, with a 20-minute limit, and stores its run and findings as before.
- A scan that fails, times out or cannot be stored is recorded as the `dast` stage with `SkipCode::ToolFailed`.
- The subject is "DAST", so the dashboard's existing wording reads "DAST did not complete; what it checks counts as not assessed."
- It fails the stage, not the run.
- The error goes to the log only, like the other stages; the DAST run keeps the scanner's reason.
- The DAST scan drops its "Exploitation" phase, which was recorded as completed without doing anything. The enum variant stays for stored runs.
- Docs (`features/dast.md`): what a target's scan does with DAST.
**Tests:**
- New `integration::api::dast::a_dast_scan_that_does_not_complete_is_a_failed_stage_of_the_run`: a target whose live URL does not resolve finishes its scan as completed, with one failed `dast` stage and a stored, failed DAST run.
- On main's `graph_build.rs` the same test fails, because the run has no `dast` entry.
- Locally against Mongo 7: the DAST integration tests, `cargo test -p compliance-dast`, and clippy for agent, core and dast with CI's flags.
**Note:** a scan run now takes as long as its DAST scans, up to 20 minutes per DAST target.
**Next parts of #998:** DAST findings in the main findings (point 2), the deterministic checks in every scan (point 3), SAST hints (point 4).
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_01Q9inRcu428A2iNjDHPEAT9
`maybe_trigger_dast` started each DAST scan in a detached task. The scan
run never waited for it and a failed DAST scan was only a log line, so a
run read "completed" whether DAST ran or not.
- The stage now awaits each DAST target's scan, with a 20-minute limit,
and stores its run and findings as before.
- A scan that fails, times out or cannot be stored is recorded as the
`dast` stage with `ToolFailed` (subject "DAST", so the dashboard reads
"DAST did not complete"). It fails the stage, not the run. The error
goes to the log; the DAST run keeps the scanner's reason.
- The DAST scan drops its "Exploitation" phase, which was recorded as
completed without doing anything. The variant stays for stored runs.
- Docs: what a target's scan does with DAST.
Test: a target whose live URL does not resolve finishes its scan with a
failed `dast` stage and a stored, failed DAST run. It fails on main,
where the run has no `dast` entry.
Part 1 of #998 (points 1 and 5). Findings in the main findings, the
deterministic checks and the SAST hints follow.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Q9inRcu428A2iNjDHPEAT9
sharang
merged commit 4f5d713bbc into main2026-11-16 10:30:45 +00:00
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 1 of #998 (points 1 and 5).
Problem:
maybe_trigger_daststarted each DAST scan in a detachedtokio::spawn. The scan run never waited for it, and a failed DAST scan was only a log line. A run read "completed" whether DAST ran or not.Change:
daststage withSkipCode::ToolFailed.features/dast.md): what a target's scan does with DAST.Tests:
integration::api::dast::a_dast_scan_that_does_not_complete_is_a_failed_stage_of_the_run: a target whose live URL does not resolve finishes its scan as completed, with one faileddaststage and a stored, failed DAST run.graph_build.rsthe same test fails, because the run has nodastentry.cargo test -p compliance-dast, and clippy for agent, core and dast with CI's flags.Note: a scan run now takes as long as its DAST scans, up to 20 minutes per DAST target.
Next parts of #998: DAST findings in the main findings (point 2), the deterministic checks in every scan (point 3), SAST hints (point 4).
🤖 Generated with Claude Code
https://claude.ai/code/session_01Q9inRcu428A2iNjDHPEAT9