Skip to content

Trust only nonce-verified terminal cwd for command approval - #335978

Closed
Anthony Kim (anthonykim1) wants to merge 10 commits into
mainfrom
anthonykim1/trust-terminal-cwd
Closed

Anthony Kim (anthonykim1) wants to merge 10 commits into
mainfrom
anthonykim1/trust-terminal-cwd

Conversation

@anthonykim1

@anthonykim1 Anthony Kim (anthonykim1) commented Sep 12, 2026 •

Copy link
Copy Markdown
Contributor
  • Send the shell integration nonce with OSC 633 ; P ; Cwd from the bash, zsh, fish, and PowerShell scripts, so the cwd they report is trusted. The parser already accepts this optional nonce and marks a cwd without it as untrusted.
  • Make the fish script's nonce global so its functions can send it.
  • Drop the trailing nonce in the Agent Host OSC 633 parser, as it already does for E.
  • When preparing a terminal command, treat an untrusted cwd as unknown instead of using it, so relative writes require confirmation instead of being resolved against a cwd that terminal output reported.

Testing:

  • npm run transpile-client (passed)
  • ./scripts/test.sh --run src/vs/workbench/contrib/terminalContrib/chatAgentTools/test/electron-browser/runInTerminalTool.test.ts --run src/vs/workbench/contrib/terminal/test/browser/xterm/shellIntegrationAddon.test.ts (289 passing, 108 pending); the new test fails without the change
  • npm run test-node -- --run src/vs/platform/agentHost/test/node/osc633Parser.test.ts --run src/vs/platform/agentHost/test/node/agentHostTerminalManager.test.ts (57 passing); the updated parser test fails without the change
  • bash -n, zsh -n, and fish -n on the changed scripts (passed); the bash and fish forms emit ESC ] 633 ; P ; Cwd=/x ; <nonce> BEL
  • npm run eslint -- <4 changed TypeScript files> (passed)
  • npm run typecheck-client (no errors in changed files; the remaining errors are in Agent Host Copilot and local transcription files and come from locally linked packages that differ from the versions pinned on main)

Inspirations from:

Copilot AI balanced review requested due to automatic review settings September 12, 2026 21:32

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

Backend CWD lookup failures can still authorize against the stale initial directory, and the new security-sensitive paths lack effective regression coverage.

Get a fresh assessment by requesting another Copilot review.

Review tier: Balanced
Findings: 1 High severity · 2 Low severity

Open findings (3)
What changed in this PR

Authenticates terminal CWD reporting and prevents untrusted paths from influencing command authorization.

Changes:

  • Adds nonce authentication to shell CWD sequences.
  • Resolves untrusted CWD through the terminal backend.
  • Prevents workspace fallback for existing terminals with unknown CWD.
File Description
shellIntegrationAddon.ts Requires a non-empty matching nonce.
terminalInstance.ts Selects trusted or backend-reported CWD.
runInTerminalTool.ts Avoids unsafe workspace fallback.
shellIntegration.ps1 Adds nonce to PowerShell CWD updates.
shellIntegration.fish Persists and sends the Fish nonce.
shellIntegration-rc.zsh Adds nonce to Zsh CWD updates.
shellIntegration-bash.sh Adds nonce to Bash CWD updates.
shellIntegrationAddon.test.ts Tests nonce trust classification.
terminalInstance.test.ts Adds trusted-CWD scenarios.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@github-actions

github-actions Bot commented Sep 13, 2026 •

Copy link
Copy Markdown
Contributor

Screenshot Changes

Base: ec2e5806 Current: 14dafaaf

Changed (1)

chat/aiCustomizations/aiCustomizationManagementEditor/DiscoverPluginsLoadingMore/Light
Before After
before after

3 insignificant change(s) omitted (≤20 px, Δ≤2). See CI logs for details.


blocks-ci screenshots changed

Replace the contents of test/componentFixtures/blocks-ci-screenshots.md with:

Updated blocks-ci-screenshots.md
<!-- auto-generated by CI — do not edit manually -->

#### agentSessionsViewer/SessionWithPeerChat/Light
![screenshot](https://hediet-screenshots.azurewebsites.net/images/94b92b6e5fd52a5ea9fcb83263897e39cdca0c1c1731eae9b7932cb03c79aded)

#### baseUI/KeyboardFocusedToggle/Light
![screenshot](https://hediet-screenshots.azurewebsites.net/images/dfbb0ce3586e7a15bdb7354ff70df81563ed19b5b857c71d7a02e11ef7ad13fd)

#### chat/chatPetAccessoryRig/chatPetAccessoryRig/AllAccessoriesFacing/Light
![screenshot](https://hediet-screenshots.azurewebsites.net/images/53dc97e97d4f9e8d02d144012794cce528d3d25d659149df8c854f7c42e54d74)

#### chat/chatPetAccessoryRig/chatPetAccessoryRig/AllRuntimeStates/Light
![screenshot](https://hediet-screenshots.azurewebsites.net/images/52a7631f8a6714054e07db345ae85b18029e958476e99d6b79d0741d07784bee)

#### chat/chatPetAccessoryRig/chatPetAccessoryRig/CoveredAntennaeComparison/Light
![screenshot](https://hediet-screenshots.azurewebsites.net/images/8ce92ebc6cc359112d5e8e356f3556ca99906901736105c3b3af5d1840348b0c)

#### chat/chatPetAccessoryRig/chatPetAccessoryRig/CriticalPoses/Light
![screenshot](https://hediet-screenshots.azurewebsites.net/images/850e813a535b920e614f45c370874ea13e39b095d9930d51863afdb5c03abacd)

#### chat/chatPetAccessoryRig/chatPetAccessoryRig/LiveEyeLayering/Light
![screenshot](https://hediet-screenshots.azurewebsites.net/images/28743055f10abdf3c0a7809b2b3e830b7a04dc65157febf48215eecdf8b03772)

#### chat/chatQuestionCarousel/MarkdownLinks/Light
![screenshot](https://hediet-screenshots.azurewebsites.net/images/1e70224f8b2a92241ff8183ec48d7e57b56c40364984fd99a73abefba9a5d4ef)

#### chat/input/chatInput/CompactWithProviderIcon/Light
![screenshot](https://hediet-screenshots.azurewebsites.net/images/f2b0ae064e6b3b4769c0667cdb73b94bea28f878ad21c73189165dd369497d84)

#### chat/input/chatInput/CopilotHarnessCompactPickers/Light
![screenshot](https://hediet-screenshots.azurewebsites.net/images/3d0aeb33cbc6f818cc4d5fe1549d310f746e83326998d45e925429eb547656bb)

#### chat/petAchievements/standaloneModal/chatPetAchievementsEditor/MixedSelected/Light
![screenshot](https://hediet-screenshots.azurewebsites.net/images/b4e697f87416c5f384d7dd0338fcf76ca128bf695efa96ed885abc124a8736e1)

#### comments/commentTree/CommentTreeMetadataZoomed/Light
![screenshot](https://hediet-screenshots.azurewebsites.net/images/a81446b88a24acb43f7713d0d84c921bb9d79d4c06448e77b4baae5c1f5c9026)

#### editor/codeEditor/CodeEditor/Light
![screenshot](https://hediet-screenshots.azurewebsites.net/images/10e1881a8125f12fa8a45164f5bda6b55319bd0dad93e465246b407bed6bc3e1)

#### editor/fullwidthCharacterWidth/FullwidthCharacterWidthClassification/Light
![screenshot](https://hediet-screenshots.azurewebsites.net/images/55d5ee041108b8fd525642374564c62fb96f0c5a098412876615262a87e5f5c6)

#### editor/fullwidthCharacterWidth/FullwidthCharacterWidthCode/Light
![screenshot](https://hediet-screenshots.azurewebsites.net/images/b84c6f6f05420ba33e71cec227c976481b166a2967e9f295b9723c0a32228969)

#### editor/fullwidthCharacterWidth/FullwidthCharacterWidthFont/Light
![screenshot](https://hediet-screenshots.azurewebsites.net/images/0028778f2f2a0859c2def1a544d03b53b791b7510a8264c2af47e4e0024f4ee5)

#### editor/fullwidthCharacterWidth/FullwidthCharacterWidthProportionalFont/Light
![screenshot](https://hediet-screenshots.azurewebsites.net/images/467e6c59b70fbd0153e463f8a5bbdb778f9b96aa27117fa8c276e126004fe2ac)

#### editor/fullwidthCharacterWidth/FullwidthCharacterWidthSelection/Light
![screenshot](https://hediet-screenshots.azurewebsites.net/images/d2f28d080bfa99f2f93566c860e11ca891eb8e38ef27a4b20286b7227d235d89)

#### editor/fullwidthCharacterWidth/FullwidthCharacterWidthTwoCells/Light
![screenshot](https://hediet-screenshots.azurewebsites.net/images/07cc96d028f69fd9609b88fa23b1c087cde223393dd0fd9ad6341e480068db95)

#### editor/injectedTextDecorations/ColorDecorators/Light
![screenshot](https://hediet-screenshots.azurewebsites.net/images/ca4563d37cccd40a5f49e1d6075dde7bbf085b718ca52a3e22d91e5d951242d2)

#### editor/injectedTextDecorations/InlayHints/Light
![screenshot](https://hediet-screenshots.azurewebsites.net/images/76ab9ccd41b2b1a400c2feece58e56e8f49cad84023ed07708305e2ed75db8f5)

#### editor/injectedTextDecorations/InlineProgress/Light
![screenshot](https://hediet-screenshots.azurewebsites.net/images/4aaae3363f8f4637ecde8de278eefc8a04f04a70f0ba6567309d9e8c76e8a260)

#### editor/injectedTextDecorations/SelectedColorDecorator/Light
![screenshot](https://hediet-screenshots.azurewebsites.net/images/ba9f3a1f916231953b82851a61bafbe0e2738056cac9d9a5be47da573d8ea5da)

#### editor/inlineChatZoneWidget/InlineChatZoneWidget/Light
![screenshot](https://hediet-screenshots.azurewebsites.net/images/149a3762c5eef80f2a1c74385c9d45871821de012a9cc36ecaa8d22858ac1ad2)

#### editor/inlineChatZoneWidget/InlineChatZoneWidgetTerminated/Light
![screenshot](https://hediet-screenshots.azurewebsites.net/images/8d8b39f9a3dd85453ad1594df888c7ac1908d5c7ed80a5b15238d818a89aeb1b)

#### editor/wordWrapIndicator/WordWrapIndicator/Light
![screenshot](https://hediet-screenshots.azurewebsites.net/images/9b7191f3dc7cede99687efc61bc2e50324e23b2bd0781ab62aed5bb6c113e77e)

#### editor/wordWrapIndicator/WordWrapIndicatorDisabled/Light
![screenshot](https://hediet-screenshots.azurewebsites.net/images/bfd14bc97613141a7bb9914a204d04b4d2e4f1cd3cedfd806201827fdfa6b05c)

#### editor/wordWrapIndicator/WordWrapIndicatorFixedColumnBeyondViewport/Light
![screenshot](https://hediet-screenshots.azurewebsites.net/images/44a44a161770ed83c0d9e6214175f1153fe44938942ed85c722fc2d1858cac07)

#### editor/wordWrapIndicator/WordWrapIndicatorVariableLineHeight/Light
![screenshot](https://hediet-screenshots.azurewebsites.net/images/f6a34b4ac5a13300f402a922b935765ec0a55b712b2bc6951da7be8fa1c1eb7c)

#### editor/wordWrapIndicator/WordWrapIndicatorViewportWrapping/Light
![screenshot](https://hediet-screenshots.azurewebsites.net/images/2945563f28440c62c812e2c80ac40620807822ec8b691bac9b79a85610b4fc50)

#### sessions/accountMenu/petAchievementBadges/chatPetAchievementBadges/AllBadges/Light
![screenshot](https://hediet-screenshots.azurewebsites.net/images/fe4b95bf8348637bba9f8c0dda791924e6c67fd7b5d173398f9b2c0bfc9f7071)

#### sessions/chat/newWidget/newChatWidget/MigrationsBackground/Light
![screenshot](https://hediet-screenshots.azurewebsites.net/images/8e385d1dbb4f325dfd536c0965773398e726bd7868e01949afb2c740a9ef84af)

#### sessions/chat/newWidget/newChatWidget/NewSessionAttachedContext/Light
![screenshot](https://hediet-screenshots.azurewebsites.net/images/cca0913727b6c9f3c15485a743fa9b04474cc7ebb881125df6037b9a25ec205c)

#### sessions/chat/newWidget/newChatWidget/NewSessionAutoModel/Light
![screenshot](https://hediet-screenshots.azurewebsites.net/images/4111269bba29551efb1d4cf99c1934617fdaf535c50f92255d64f51e1ed8f4c3)

#### sessions/chat/newWidget/newChatWidget/NewSessionChatBackground/Light
![screenshot](https://hediet-screenshots.azurewebsites.net/images/49297eb8fe9467e2f1c0607233368414b8d1717c24a4bea9e0cf2cd5c1adbfae)

#### sessions/chat/newWidget/newChatWidget/NewSessionCompactAutoModel/Light
![screenshot](https://hediet-screenshots.azurewebsites.net/images/56b9ac7ce8ad6692c3269e73900a765e59c5705d6dc93d35b3134cf9ff571cde)

#### sessions/chat/newWidget/newChatWidget/NewSessionExperimentalComposerBackground/Light
![screenshot](https://hediet-screenshots.azurewebsites.net/images/a7661db84cd3f7febb2c036cb8f7b17bdc09d05dccb6114ba7ba21aa3e439f3b)

#### sessions/chat/newWidget/newChatWidget/NewSessionGitHubContextPicker/Light
![screenshot](https://hediet-screenshots.azurewebsites.net/images/bd4b7314d7d4e2bb7f1765f25901efdb6d4b6d08f6acc5766f95d597d87ea968)

#### sessions/chat/newWidget/newChatWidget/NewSessionPhoneAttachedContext/Light
![screenshot](https://hediet-screenshots.azurewebsites.net/images/44a9a72f5d00532c1586d755d73b51034bcde48fe6b4f3a103f4cb9517d6e579)

#### sessions/chat/newWidget/newChatWidget/NewSessionRemoteWorkspace/Light
![screenshot](https://hediet-screenshots.azurewebsites.net/images/310fc08cf62e403c7d3e5edf9a4eb6123c85ba89823af0b1322283f643017417)

#### sessions/chat/newWidget/newChatWidget/NewSessionWorkspacePicker/Light
![screenshot](https://hediet-screenshots.azurewebsites.net/images/76513a6627a21c4369f44aa2471631b745b8f7aad5dbd8c941cdd6ab7ad42853)

#### sessions/chat/view/chatView/AssistantResponseBackground/Light
![screenshot](https://hediet-screenshots.azurewebsites.net/images/db58e4759c306d88dc45145dcc3274c252efca83368dc0d6d45ecb2f21f15f07)

#### sessions/chat/view/chatView/AssistantResponsePlain/Light
![screenshot](https://hediet-screenshots.azurewebsites.net/images/247814f062d556d98a5474ef65d2040128237d94c1616e379fd37a26fb616b13)

#### sessions/chat/view/chatView/CheckpointControlsBackground/Light
![screenshot](https://hediet-screenshots.azurewebsites.net/images/8103a4528aa4899566d3316f213ebb0775ba6e6021882c99877aa8c2f131ee77)

#### sessions/chat/view/chatView/RequestAttachmentBackground/Light
![screenshot](https://hediet-screenshots.azurewebsites.net/images/b143a14c0a785fd33a98619f34607323a542186bbaef728e4cacef566686d013)

#### sessions/sessionsList/SessionsList_ArchivedNestedChat/Light
![screenshot](https://hediet-screenshots.azurewebsites.net/images/cd4aaf5692563c82f5e57ba63f66d6a53f21a175326fab3a5792bd6e1b27bc0f)

#### sessions/sessionsList/SessionsList_AutomationsNewBadge_Accent/Light
![screenshot](https://hediet-screenshots.azurewebsites.net/images/94f7cde512c7f36230bb9c28a00da607606deae120aaadaec21cb3f897d75665)

#### sessions/sessionsList/SessionsList_AutomationsNewBadge_Narrow/Light
![screenshot](https://hediet-screenshots.azurewebsites.net/images/2606a555f61bee5a888a37ea70017c5f49586f690fe7a422a4effcc8fc0fbcfe)

#### sessions/sessionsList/SessionsList_AutomationsNewBadge_Running/Light
![screenshot](https://hediet-screenshots.azurewebsites.net/images/4595a2d9daba193936585fb0639d0391a78a6784ef5cea49e071a432c5248195)

#### sessions/sessionsList/SessionsList_AutomationsNewBadge_Soft/Light
![screenshot](https://hediet-screenshots.azurewebsites.net/images/061e8c6fb21a2dfbdcb23b8fd06b55f36b0a5813f6de60a471846445fe62d2c2)

#### sessions/sessionsList/SessionsList_AutomationsNewBadge_Unread/Light
![screenshot](https://hediet-screenshots.azurewebsites.net/images/f13d49c292f750405a446a3f96f36105e30b72218a2a4b8a4f3361138227a89c)

#### sessions/sessionsList/SessionsList_AutomationsNewBadge/Light
![screenshot](https://hediet-screenshots.azurewebsites.net/images/c9af7a19fa45814fce40ae49349c72d8841ed534fef87404c76514322ce7dad4)

#### sessions/sessionsList/SessionsList_CompactArchivedNestedChat/Light
![screenshot](https://hediet-screenshots.azurewebsites.net/images/3ce9a8db1738c11cbb108706da41e8c292589eca2ce222d3d606ec2f9fddf41d)

#### sessions/sessionsList/SessionsList_CompactChatRename/Light
![screenshot](https://hediet-screenshots.azurewebsites.net/images/133b77cee2dd44df7906261b12cbf019eb0a4dbc2dc9d88a865d04687cdbbf8f)

#### sessions/sessionsList/SessionsList_CompactNeedsInput/Light
![screenshot](https://hediet-screenshots.azurewebsites.net/images/755ab63f991baa7ceb71e029a5a141e62b5e671ae0f31a23b8e2b02c7debbe42)

#### sessions/sessionsList/SessionsList_CompactNestedChatActions/Light
![screenshot](https://hediet-screenshots.azurewebsites.net/images/885bf41a816baf3853f177205f4dd8c40228a3f65b2cbfa7c76e494d8f4ef957)

#### sessions/sessionsList/SessionsList_CompactNestedChatApprovals/Light
![screenshot](https://hediet-screenshots.azurewebsites.net/images/7b250c7f38c05f8bb820f8617ff7fdd39c209002aa2d6af41ab8644e809f43e6)

#### sessions/sessionsList/SessionsList_CompactNestedChatPrimaryAction/Light
![screenshot](https://hediet-screenshots.azurewebsites.net/images/bcd08646aed6646420511b3f1f1e6514f55c448867fd43b99652ddb2c90cd1ef)

#### sessions/sessionsList/SessionsList_CompactNestedChats/Light
![screenshot](https://hediet-screenshots.azurewebsites.net/images/215206e89ccd65cf37d6b31d6e31e4393b510bec1f0c0001be9dd624f7b5a299)

#### sessions/sessionsList/SessionsList_CompactSessionRename/Light
![screenshot](https://hediet-screenshots.azurewebsites.net/images/6b828caeeddb011cc2031c2d349c4f322fed4bac62e928cc0765f5249c4815d9)

#### sessions/sessionsList/SessionsList_CompactUnreadStatusIcons/Light
![screenshot](https://hediet-screenshots.azurewebsites.net/images/6b55aca75f5a6d0083f5ca287fd06343294ad5db730db2919f1842c96b9f8f2b)

#### sessions/sessionsList/SessionsList_LightweightNewButton/Light
![screenshot](https://hediet-screenshots.azurewebsites.net/images/27750194694cd6b4941e11c7752732c04f934269141b93ad9bbd6131217ace45)

#### sessions/sessionsList/SessionsList_LightweightNewButtonWithKeybindingBackground/Light
![screenshot](https://hediet-screenshots.azurewebsites.net/images/54f5cf2d72ea720ff9c6f07388c686f91f7541abff62ef516b321588260da824)

#### sessions/sessionsList/SessionsList_NarrowHoverToolbar/Light
![screenshot](https://hediet-screenshots.azurewebsites.net/images/f9131b39316ff95f77330e056a208bcc4ac7a9f23122a237cee65724a99d1f4b)

#### sessions/sessionsList/SessionsList_NestedChatHierarchyGuides/Light
![screenshot](https://hediet-screenshots.azurewebsites.net/images/57948fc81ca82530917b6c16bfebbaeb3d0675dd954b9df170eaeccb69fd9904)

#### sessions/sessionsList/SessionsList_PeerChatInProgress/Light
![screenshot](https://hediet-screenshots.azurewebsites.net/images/01c505cc13342d1319d1b69c7bb97ea7afec5ffc5e000460b2aee66d45e74c5f)

#### sessions/sessionsList/SessionsList_SelectedKeyboardFocus/Light
![screenshot](https://hediet-screenshots.azurewebsites.net/images/8ce3a612a7d5f50553d976259d4cbf04007a7d709bd0d7fd6734d57fbe69d271)

#### sessions/sessionsList/SessionsList_UnreadStatusIcons/Light
![screenshot](https://hediet-screenshots.azurewebsites.net/images/88c647be929c8888beb6c218940f4ed9d6cb02b6cb901851c24dcf4f1d0be5ce)

#### workbench/activityBarMenu/CompactActivityBarMenu_CompactDensity/Light
![screenshot](https://hediet-screenshots.azurewebsites.net/images/6dc0ca91d25531aeea79c4b9d145c1fafd7b705047d0805fc69192d1b372e650)

#### workbench/activityBarMenu/CompactActivityBarMenu_DefaultDensity/Light
![screenshot](https://hediet-screenshots.azurewebsites.net/images/2786fba1b7f0b41a26e238ea678ef381bd004d977f16abcb600239e142d1488e)

#### workbench/statusBar/statusBar/CompactDensity/Light
![screenshot](https://hediet-screenshots.azurewebsites.net/images/b8d16bfa494f5199f0f12641dbeb4cd46253302adee8420b6377a8f80c8418cc)

#### workbench/statusBar/statusBar/DefaultDensity/Light
![screenshot](https://hediet-screenshots.azurewebsites.net/images/0868da3910e76f140c77881af39dfc566aca0dd1222f075937c7be1f02d2adf2)
Patch
--- test/componentFixtures/blocks-ci-screenshots.md	2026-10-01 04:02:35.130422158 +0000
+++ /tmp/blocks-ci-updated.md	2026-10-01 04:09:30.239181330 +0000
@@ -172,7 +172,7 @@
 ![screenshot](https://hediet-screenshots.azurewebsites.net/images/7b250c7f38c05f8bb820f8617ff7fdd39c209002aa2d6af41ab8644e809f43e6)
 
 #### sessions/sessionsList/SessionsList_CompactNestedChatPrimaryAction/Light
-![screenshot](https://hediet-screenshots.azurewebsites.net/images/cbee88e0a4fe22e22c4b14427462ef16783b67cf13aa693b2d4c8edc81cfa1e3)
+![screenshot](https://hediet-screenshots.azurewebsites.net/images/bcd08646aed6646420511b3f1f1e6514f55c448867fd43b99652ddb2c90cd1ef)
 
 #### sessions/sessionsList/SessionsList_CompactNestedChats/Light
 ![screenshot](https://hediet-screenshots.azurewebsites.net/images/215206e89ccd65cf37d6b31d6e31e4393b510bec1f0c0001be9dd624f7b5a299)

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

Copilot-Session: cca5e5b9-d046-4b57-b3af-78d6efa639cb
Addresses review thread comments 3997723189 and 3997723220.
Return unknown when authorization CWD lookup fails and exercise the production method in tests.
Addresses review thread comment 3997723253.
Keep command analysis from substituting the session workspace for an associated terminal with unknown CWD.
Keep Agent Host terminal CWD state compatible with nonce-bearing OSC 633 properties and ignore mismatched nonces.

Co-authored-by: Copilot <[email protected]>
Copilot-Session: cca5e5b9-d046-4b57-b3af-78d6efa639cb
Remove shell-integration nonce and Agent Host protocol changes while retaining authoritative CWD resolution for terminal auto-approval.

Co-authored-by: Copilot <[email protected]>
Copilot-Session: cca5e5b9-d046-4b57-b3af-78d6efa639cb
@anthonykim1 Anthony Kim (anthonykim1) changed the title Use trusted terminal CWD for file authorization Use authoritative terminal CWD for auto-approval Sep 18, 2026
Copilot-Session: cca5e5b9-d046-4b57-b3af-78d6efa639cb
Replace the mock-only changes with one test of the real getCwdResourceForAuthorization and getCwdResource behavior.
Send the shell integration nonce with the cwd from the bash, zsh, fish, and PowerShell scripts, drop that nonce in the Agent Host parser, and treat an untrusted cwd as unknown when preparing terminal commands. Revert the process cwd lookup, which is no longer needed.
@anthonykim1 Anthony Kim (anthonykim1) changed the title Use authoritative terminal CWD for auto-approval Trust only nonce-verified terminal cwd for command approval Oct 1, 2026
@anthonykim1

Copy link
Copy Markdown
Contributor Author

Replaced by #350618, which has the same change rebased onto current main.

Authored with Copilot on behalf of anthonykim1

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.

2 participants