CtrlK
BlogDocsLog inGet started
Tessl Logo

testland/zap-authenticated-scans

Configures authenticated DAST sessions in ZAP - ZAP Context + Authentication Method (form, JSON, script, browser-based, HTTP/NTLM), Session Management strategy (cookie, header, script), Verification Strategy (regex indicators, poll-URL), CSRF token handling, OAuth/bearer header injection, logged-in/logged-out indicator calibration, and context XML export for use with `-n` in baseline and full scans. Use when the team needs DAST coverage of authenticated routes - the most common DAST gap and the hardest DAST setup to get right.

74

Quality

93%

Does it follow best practices?

Run evals on this skill

Adds up to 20 points to the overall score

View guide

SecuritybySnyk

Low

Low-risk findings worth noting

Overview
Quality
Evals
Security
Files

verification-strategy.mdreferences/

ZAP Authentication Verification Strategy

Per zap-verify, ZAP uses an Authentication Verification Strategy to know whether a request is executing as an authenticated user. Configure in Session Properties > Context > Authentication > Verification:

Logged-In Indicator: a regex present in responses when the user is authenticated. Examples:

  • \QWelcome, \E (welcome banner with the username)
  • \Qhref="/logout"\E (logout link in nav)
  • \Q"role":"user"\E (JSON response field)

Logged-Out Indicator: a regex present in responses when the session has expired. Examples:

  • \QPlease log in\E
  • \Qlocation: /login\E (redirect header)
  • HTTP/1\.1 401

Per zap-verify, four strategies are available:

StrategyUse when
Check Every ResponseTraditional HTML apps (indicator in page body)
Check Every RequestClient-side sessions (JWT in Authorization header)
Check Every Request or ResponseMixed; SPA + API combo
Poll the Specified URLDedicated /api/me or /session/check endpoint

Calibration steps:

  1. Browse the app manually through ZAP proxy while logged in.
  2. Right-click a response in the History tab that contains the logged-in text. Choose Flag as Context > <context-name> Logged in indicator. ZAP extracts the regex automatically.
  3. Browse to a page after logging out. Right-click that response. Choose Flag as Context > <context-name> Logged out indicator.
  4. Confirm both indicators in Session Properties > Context > Authentication.

SKILL.md

tile.json