Skip to content

feat(network): validate WebSocket opening response - #198

Draft
seonghobae wants to merge 14 commits into
feat/webdriver-bidi-websocket-opening-writefrom
feat/webdriver-bidi-websocket-handshake-response
Draft

feat(network): validate WebSocket opening response#198
seonghobae wants to merge 14 commits into
feat/webdriver-bidi-websocket-opening-writefrom
feat/webdriver-bidi-websocket-handshake-response

Conversation

@seonghobae

@seonghobae seonghobae commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Validate the RFC 6455 server opening response on the exact peer-verified stream produced by current PR feat(network): write bounded BiDi WebSocket opening request #195 head d5c55e83a6f55a57aac989e3440863a789d4b418.
  • Require HTTP/1.1 101, websocket Upgrade and Connection: Upgrade tokens, and the client-key-correlated Sec-WebSocket-Accept value.
  • Bound response size and monotonic time, reject malformed or duplicate security headers, restore socket mode, and keep framing/browser/Agent authority out of scope.
  • Preserve the current parent security contract that WebSocket client nonce material is redacted from Debug for the raw client-key and handshake-plan production types.
  • Record the protocol boundary in CHANGELOG.md and browser-agent-protocol doctoring with RFC 6455 evidence.

No predecessor check, review, approval, coverage, mergeability, synthetic-merge, or stale-head evidence transfers to this head.

Test-first repair lineage

The branch had diverged from current PR #195 and still derived Debug for the raw WebDriverBiDiWebSocketClientKey and WebDriverBiDiWebSocketHandshakePlan, exposing the RFC 6455 client nonce through diagnostic rendering. The parent-owned redaction regression was reproduced as RED on the equivalent parent test-only head (30da73a684eacd01c78472dc0120258965480091, CI 32569217148, Rust job 97022153631), where both nonce-redaction tests failed before the production redaction existed.

The same regression was then carried onto this canonical branch and the production boundary was repaired by replacing derived Debug with deterministic redacted implementations. The child was structurally rejoined to exact current parent d5c55e83a6f55a57aac989e3440863a789d4b418 without discarding its opening-response validation work.

Exact-current evidence

Current exact head: 0c8b39b2f31979fde0766f86ce71c7b870047b61.

  • CI run 32934250981: success.
  • Rust contracts job 98072330535: success — repository contracts, canonical formatting, locked workspace/all-target check, tests, strict Clippy, and rustdoc all succeeded on Rust 1.97.1.
  • Production coverage job 98072330593: success with exact owned-production function/line/region/branch enforcement on this unchanged head.
  • Exact coverage artifact 9594321529, digest sha256:18e933fce4a4ad42c5f8bc34abb275fbc202635122279467180953ff9149b34f.
  • Current live base is exact PR feat(network): write bounded BiDi WebSocket opening request #195 head d5c55e83a6f55a57aac989e3440863a789d4b418; the child is strictly ahead with no current-parent work discarded.
  • Current formal reviews: none.
  • Current inline review threads: none.
  • No independent approval is claimed or inferred from checks, statuses, comments, author activity, or model output.

Same-head SAST/Semgrep, Security Scan, Manifest V3, OpenCode, Noema, or Strix success is not claimed unless separately present on this exact head.

Safety boundary

This slice proves bounded RFC 6455 opening-response validation and nonce-safe diagnostics only. It does not authenticate Chromium/ChromeDriver process provenance, implement WebSocket frame/message semantics, grant browser/page/policy/Agent authority, substitute TLS, resolve DNS, reconnect, or inherit ambient authority.

Protected-main AGENTS.md remains authoritative. This scheduled actor does not merge, self-approve, alter workflows/rulesets, add secrets, weaken checks, tag, publish, or promote stale evidence.

@coderabbitai

coderabbitai Bot commented Aug 20, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant