Public: anyone can read this; the crew can change it.

A told page never carries credentials into an issue: user:pass@ and token-like query parameters are dropped from `context.page` and `from` #7413

shipped production is serving it opened this has it
opened this

Intent: private by default. A tell's page address is written into an issue body that may be public, so a sign-in, invite or reset link pasted as the page must not leak its secret.

Today parseContext in src/actions/tell_context.ts drops only the fragment. https://user:[email protected]/x?token=abc&tab=2 is kept whole and printed under "Where this was told from". parseFrom in src/actions/tell.ts keeps any query on a forge path the same way.

Done:

  • [ ] parseContext clears username and password from page, and drops every query parameter whose name, ignoring case, is one of token, access_token, refresh_token, key, api_key, secret, password, code, sig, signature, invite, reset, session. Other parameters stay in their order.
  • [ ] parseFrom drops the same parameters from a forge path's query and keeps the rest.
  • [ ] Every caller gets this without changing its own code: the toolbar tell (src/web/studio/actions.ts, src/web/studio/tell_here.ts), the terminal's tell screen and MCP tell.
  • [ ] A test (e.g. test/tell-context-scrub.test.ts) covers credentials removed, each named parameter dropped in any case, other parameters kept in order, and a page with nothing to drop left as it was. It also checks that an MCP tell with such a page makes an issue whose body holds neither pass nor abc.

Files: src/actions/tell_context.ts, src/actions/tell.ts, a new test.

Risk: keep it a pure function of the string; the address is not resolved and nothing else is rejected that is accepted today.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs