Part 1 of #1000: the header logins. A target's DastAuthConfig was
stored but never read, so every DAST request went out unauthenticated
and a scan of anything behind a login tested only the login page.
- compliance-dast::auth turns basic, bearer and cookie logins plus extra
headers into sensitive default headers of a per-scan client; recon,
crawler and the agents use it, the auth-bypass agent asks as a
stranger. A login that cannot be sent (form login, a missing secret,
an unknown method) fails the scan with the reason.
- POST /api/v1/dast/targets takes an `auth` block, refuses a login the
scan could not send, stores it sealed (header values too, via the new
Credentials::credential_maps_mut) and returns the target with its id.
Scans open the stored secrets in memory only.
- The wizard's basic login lands in the password, not the token.
- The crawler keeps forms to the target's origin (scheme, host, port),
so payloads and the login never go to another site.
- The auth-bypass agent sends PUT/PATCH/DELETE only with destructive
tests allowed (it sent them always and reported its own success).
- CI lints the compliance-dast library and runs its tests.
Form and Keycloak login follow in part 2.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Q9inRcu428A2iNjDHPEAT9