fix(permissions): request approval for external workspace paths#887
Closed
luoye520ww wants to merge 4 commits into
Closed
fix(permissions): request approval for external workspace paths#887luoye520ww wants to merge 4 commits into
luoye520ww wants to merge 4 commits into
Conversation
Collaborator
|
Thank you for the valuable direction in this PR. I am closing it in favor of #978. The current branch is mergeable and its CI is green, but the external grant is still consumed by path-based writes, leaving approval-to-mutation parent-directory swaps and hard-link aliases outside the exact-path guarantee. The replacement was rebuilt from current Please continue review on the replacement PR; the original problem analysis is credited there. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Workspace-write rejected every mutation outside the selected workspace, even when the user explicitly approved that one operation. The original implementation fixed that by passing a broad
allowExternalPathsflag into the tool context, which could let a tool write to a different external path during the same call.Root cause
The approval result was represented as a boolean rather than as the exact canonical targets that were shown to the user.
Scope
This PR keeps the per-operation approval flow and makes the grant path-scoped. It does not change the persisted sandbox mode or grant command execution/network access.
Changes
approvedExternalPathsfor the approved invocation.Safety
danger-full-accessmode remains the only mode that intentionally removes the workspace boundary.Typecheck
Both passed locally.
Tests
Results: 4 files / 52 permission tests passed; 2 files / 96 Kun integration tests passed; lint and build passed.
Issue
Fixes #869