fix(dast): each browser tab gets its own browser context #1004

Merged
sharang merged 1 commits from feat/cdp-isolated-context into main 2026-11-16 08:16:50 +00:00
1 Commits
Author SHA1 Message Date
Sharang ParnerkarandClaude Opus 5.5 91afd32d15 fix(dast): each browser tab gets its own browser context
CI / Check (push) Skipped
CI / Detect Changes (pull_request) Skipped
CI / Agent integration (pull_request) Successful in 6m7s
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 / Check (pull_request) Successful in 20m29s
The pentest browser tool opened its tabs in Chrome's default context, so
every pentest session on the same Chrome shared one cookie jar: one
session's login was visible to the next.

- New `cdp` module: one tab driven over CDP, created in its own browser
  context and disposed of with it on close.
- The browser tool runs on it; its own copy of the CDP plumbing is gone.
- `fill` no longer echoes the typed value back (it may be a password);
  it reports whether the field took it.
- Test against a real Chrome (skipped without `CHROME_WS_URL`): a second
  tab does not see the first tab's cookie. It fails without the
  separate context.

Refs #1000.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Q9inRcu428A2iNjDHPEAT9
2026-11-16 03:31:58 +01:00