feat(dast): scans log in with the target's credentials (#1000)
CI / Check (push) Skipped
CI / Agent integration (push) Skipped
CI / Detect Changes (push) Successful in 3s
CI / Deploy Docs (push) Successful in 1m15s
CI / Deploy MCP (push) Successful in 5m14s
CI / Deploy Dashboard (push) Successful in 6m48s
CI / Deploy Agent (push) Successful in 9m2s

This commit was merged in pull request #1003.
This commit is contained in:
sharang committed 2026-11-16 02:31:38 +00:00
1 parent fad023e734
commit f5ac5321bd
16 files changed
+684 -38

No files matched your search

+14 -8
View File
@@ -39,15 +39,21 @@ Each target supports these settings:
### Authentication
DAST supports authenticated scanning so it can test pages behind login:
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 | Description |
|--------|------------|
| **None** | No authentication |
| **Basic** | HTTP Basic Auth with username and password |
| **Bearer** | Bearer token in the Authorization header |
| **Cookie** | Session cookie value |
| **Form** | Login form with URL, field names, and credentials |
| 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.