Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Add Origin header validation to CDP proxy WebSocket server - #2668

Merged
Joaquin Jares (joj) merged 7 commits into
microsoft:masterfrom
lucygramley:fix/cdp-proxy-origin-validation
Jun 2, 2026
Merged

Joaquin Jares (joj) merged 7 commits into
microsoft:masterfrom
lucygramley:fix/cdp-proxy-origin-validation

Conversation

@lucygramley

Copy link
Copy Markdown
Contributor

Reject WebSocket connections that include an Origin header in the CDP proxy. Only the raw vscode-js-debug WebSocket client should connect to the proxy, and it does not send an Origin header.

Reject WebSocket connections that include an Origin header, as only the raw vscode-js-debug client should connect to the CDP proxy.

Co-authored-by: Copilot <[email protected]>
@ConnorQi01

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@ConnorQi01

ConnorQi01 commented May 28, 2026

Copy link
Copy Markdown
Collaborator

Hi lucygramley

Thanks for the contribution and for the CDP proxy hardening work here.

Could you please create or link a corresponding issue for this PR? It would help us track the security motivation, affected surface, and expected client behavior separately from the implementation.

Also, the PR validation is currently failing on Linux, Windows, and macOS in the unit test pipeline. Could you please take a look at the failing test logs and update the PR accordingly?

For this change specifically, it would be helpful to confirm that rejecting every WebSocket connection with an Origin header does not break any supported local debugging flow. A small test or validation note for the expected vscode-js-debug connection behavior would make the review much easier.

auto-merge was automatically disabled May 28, 2026 21:55

Head branch was pushed to by a user without write access

@ConnorQi01

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@ConnorQi01

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@joj

Copy link
Copy Markdown
Member

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@joj
Joaquin Jares (joj) merged commit 86995c6 into microsoft:master Jun 2, 2026
5 checks passed
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.

4 participants