Files
pruefwerk/docs/features/dast.md
T
Sharang ParnerkarandClaude Opus 5.5 80869b1759
CI / Check (push) Skipped
CI / Detect Changes (pull_request) Skipped
CI / Deploy Agent (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 4m23s
CI / Check (pull_request) Canceled after 11m36s
feat(dast): every scan runs the header, CSP, cookie and TLS checks (#998)
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
2026-11-16 11:49:56 +01:00

109 lines
6.0 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# DAST Scanning
DAST (Dynamic Application Security Testing) performs black-box security testing against live web applications and APIs. Unlike SAST which analyzes source code, DAST tests running applications by sending crafted requests and analyzing responses for vulnerabilities.
## DAST Overview
Navigate to **DAST** in the sidebar to see the overview page.
![DAST overview with scan runs and finding counts](/screenshots/dast-overview.png)
The overview shows:
- Total DAST scans performed
- Total DAST findings discovered
- Number of active targets
- Recent scan run history with status, phase, and finding counts
## Managing Targets
Navigate to **DAST > Targets** to configure applications to test.
### Adding a Target
1. Enter a **target name** (descriptive label)
2. Enter the **base URL** (e.g. `https://staging.example.com`)
3. Click **Add Target**
### Target Settings
Each target supports these settings:
| Setting | Description |
|---------|-------------|
| **Target Type** | WebApp, REST API, or GraphQL |
| **Max Crawl Depth** | How many link levels to follow |
| **Rate Limit** | Maximum requests per second |
| **Destructive Tests** | Allow DELETE/PUT requests |
| **Excluded Paths** | URL paths to skip during testing |
### Authentication
A scan can log in, so it reaches the pages and API routes behind a login. Every request of the crawl and of the tests carries the login. The exception is the authentication-bypass checks, which ask as a stranger on purpose.
| Method | What is sent | Fields |
|--------|--------------|--------|
| **None** | nothing | – |
| **Basic** | `Authorization: Basic …` | `username`, `password` |
| **Bearer** | `Authorization: Bearer …` | `token` |
| **Cookie** | `Cookie: …` | `token` (e.g. `session=abc123`) |
| **Form** | not available yet: logging in through a login page (incl. Keycloak) is the next step | – |
Every method can add extra headers (`headers`, e.g. an API key). The password, the token and the header values are stored encrypted and never returned by the API.
A login that cannot be sent fails the scan with the reason ("Login: …"); the scan never runs without the login instead. Through the API, the login goes in the `auth` block of `POST /api/v1/dast/targets`, and the answer returns the new target with its id.
The scan stays on the target's origin (scheme, host and port): links and forms that lead elsewhere are not followed. Write requests (`PUT`, `PATCH`, `DELETE`) are sent only when **Destructive Tests** is on.
::: warning
Authenticated scans access more of the application surface. Only test applications you own or have explicit authorization to test.
:::
## Running a DAST Scan
Click the **Scan** button on any target row. The scan progresses through:
1. **Crawl** -- discovers pages, forms, and API endpoints by following links and analyzing JavaScript
2. **Check** -- fixed checks of what the base URL sends: security headers, Content-Security-Policy, cookie flags (`Secure`, `HttpOnly`, `SameSite`) and TLS. They follow fixed rules, so the same site gives the same findings in every scan.
3. **Test** -- sends attack payloads to discovered parameters
4. **Report** -- collects results and generates findings
### DAST in a target's scan
A target with a live URL gets a DAST scan in each of its scans, where the deployment runs DAST. The scan waits for it like for its other stages. When the DAST scan does not complete (the site cannot be reached, the login cannot be sent, or it takes longer than 20 minutes), the scan shows the DAST stage as not completed. The rest of the scan is not affected, and the DAST run keeps the reason.
## Viewing DAST Findings
Navigate to **DAST > Findings** to see all discovered vulnerabilities. Each finding shows:
| Column | Description |
|--------|-------------|
| Severity | Critical, High, Medium, Low, or Info |
| Type | Vulnerability category (SQL Injection, XSS, SSRF, etc.) |
| Title | Description of the vulnerability |
| Endpoint | The HTTP path that is vulnerable |
| Method | HTTP method (GET, POST, PUT, DELETE) |
| Exploitable | Whether the vulnerability was confirmed exploitable |
Click a finding to see full details including the CWE identifier, vulnerable parameter, remediation guidance, and evidence showing the exact request/response pairs that triggered the finding.
### Filtering Findings
The findings page provides several filters to help you focus on what matters:
| Filter | Description |
|--------|-------------|
| **Search** | Free-text search across finding titles and descriptions |
| **Severity** | Filter by severity level (Critical, High, Medium, Low, Info) |
| **Vulnerability Type** | Filter by vulnerability category -- supports all 21 DAST vulnerability types including SQL Injection, XSS, SSRF, CORS Misconfiguration, CSP Bypass, and more |
| **Exploitable** | Show only confirmed-exploitable findings, or only unconfirmed |
Filters can be combined. A count indicator shows how many findings match the current filters out of the total (e.g. "Showing 12 of 76 findings"). When no findings match the active filters, a message distinguishes between "no findings exist" and "no findings match your current filters."
::: tip
Findings marked as **Confirmed** exploitable were verified with a successful attack payload. **Unconfirmed** findings show suspicious behavior that may indicate a vulnerability but could not be fully exploited.
:::
## Deterministic detectors (planned)
The DAST engine above is agentic: an LLM drives crawler, browser and testing tools and decides what to try next. That gives depth and code-aware exploitation, but not run-to-run reproducibility. The next step (decided 2026-08-31, not yet implemented) adds two deterministic open-source detectors **under** the agents: **Nuclei** (template checks incl. ICS/OT and default-credential templates) first, then an **OWASP ZAP** baseline scan. Their findings will appear alongside agent findings, carry CWE + compliance `control_refs`, and seed the agent's context so it verifies and chains instead of rediscovering. See [Tools & Scanners](/reference/tools#planned-integrations-decided-2026-08-31-not-yet-in-the-code).