launch: Encode agent session titles for command safety - #334304
Conversation
Pass the originating session title as URL-safe Base64 so chat-derived cmd metacharacters never cross the Windows launcher shell boundary as raw text. Decode the value only inside the native workbench environment.\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
The Bash encoder permits dash-prefixed titles to be interpreted as Node options, including executable --eval input.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Review tier: Balanced
Findings: 1
New issues introduced by this change (1)
| Severity | Finding |
|---|---|
.agents/skills/launch/scripts/launch.sh — Terminate Node's option parsing before passing the untrusted title. As written, a title beginning… |
What changed in this PR
Encodes agent session titles as Base64URL across launcher boundaries and decodes them in the workbench.
Changes:
- Adds the
--session-title-base64argument. - Encodes titles in Bash and PowerShell launchers.
- Decodes titles in the native environment service.
| File | Description |
|---|---|
environmentService.ts |
Decodes the session title. |
argv.ts (node) |
Registers the encoded argument. |
argv.ts (common) |
Types the encoded argument. |
launch.sh |
Encodes titles before launch. |
launch.ps1 |
Encodes titles before launch. |
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Henning Dieterichs (hediet)
left a comment
There was a problem hiding this comment.
Approved after current-head Copilot Code Review and GPT Luna found no security issue in the full PR patch.
Screenshot ChangesBase: 2 insignificant change(s) omitted (≤20 px, Δ≤2). See CI logs for details. Errored (8)Fixtures that failed to render — no screenshot was produced.
|
Prevent dash-prefixed session titles from being interpreted as Node options by the launch-time Base64URL encoder.\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
5a7d6c4

Summary
cmd.exe /clauncher boundaryFollow-up to #334290.
Validation
npm run typecheck-clientnpm run transpile-clientC&C "%PATH%" ! $HOME; verified the process received only URL-safe Base64 and the visible and accessible Command Center labels reproduced the exact original title