How to use Copilot to remove tokens from socket URLs
Copilot moved a monitoring token from WebSocket URLs into a coordinated header handshake; the open draft still awaited review and documented remaining risks.
Original prompt
Shared by the source author. See source notes for context.
Please review this repository and open one pull request with findings and fixes.
Reach people exploring AI agents
See placements →What happened
The open draft removes the token from request URLs and coordinates the authenticated WebSocket upgrade, with dependency fixes and deployment risks documented.
Reported by Aswinmcw with Copilot — GitHubHow the agent did it
- Copilot identified an ingestion token embedded in the monitoring client’s WebSocket URL.
- It changed the client, Worker and Durable Object to authenticate and negotiate through the subprotocol header.
- It updated dependencies and workflow pinning while retaining container-image pinning as a report-only item.
Where a person stepped in
The owner supplied a safe-fixes audit prompt; the draft awaited review. An automatic branch-deployment report does not establish human approval or merge.
A repository audit of a home status page produced a concrete change to its persistent monitoring-agent connection. The client included its ingestion credential in the WebSocket URL, exposing that value wherever request URLs were retained. Copilot moved the authentication material out of the query string.
The draft changes both ends of the connection. The client supplies the token as a WebSocket subprotocol; the Worker reads that header, validates it, and the Durable Object echoes the negotiated protocol when upgrading. This coordinated change matters because editing only the client would break the authenticated handshake.
Copilot also updated vulnerable development dependencies and pinned a privileged reusable workflow to an immutable revision. It left mutable container-image tags as an explicit finding for a separate deployment-focused change.
The public patch was still a draft without human approval or merge when checked. A Cloudflare bot reported a successful deployment for the branch, but that is not evidence of owner acceptance. The narrow result is an implemented, reviewable credential-transport proposal. It reduces URL exposure; it does not establish that every proxy, header log or credential lifecycle is safe.
Prompt
Original prompt
Source: GitHub · Aswinmcw with Copilot
Frequently asked questions
Why change both client and server?
They must agree on where the credential is sent and how the upgrade is negotiated.
Does the change eliminate every possible leak?
No. It addresses URL exposure rather than proving all header logging safe.
Was the draft approved?
No human approval or merge was visible when verified.
More details
About this account
Copilot identified an ingestion token embedded in the monitoring client’s WebSocket URL. It changed the client, Worker and Durable Object to authenticate and negotiate through the subprotocol header.
Opened original PR, API dates, diff and comments. Copilot execution is explicit. Branch deployment was bot-reported; production acceptance is not established. No credential values are reproduced. Original prompt excerpt.
Credit: Aswinmcw with Copilot — GitHub
Source published 12 Oct 2026
Source checked 14 Oct 2026
Tools and topics
GitHub Copilot · WebSocket · Cloudflare Workers · Durable Objects
credential handling · WebSocket · pending review
Editorial completeness: 100/100. Measures documented fields, not agent performance or verified outcomes.