Propagate workspace roots to exec-server sandboxes (#32214)

## What changed

- Pass configured workspace roots from core to the exec server so filesystem and process sandbox permissions are materialized against the intended roots.
- Preserve an explicitly empty workspace-root list instead of treating the sandbox working directory as an implicit root.
- Initialize filesystem sandbox contexts with their working directory as the default workspace root.

## Testing

- Add end-to-end coverage for patch and command writes inside and outside workspace roots.
- Verify remote filesystem and process sandboxes do not grant access through an empty workspace-root list.

GitOrigin-RevId: 6684c8f7de50970b45a29e2a6323df954c96f9f6
This commit is contained in:
pakrym-oai authored and copyberry committed 2026-07-10 16:55:01 +00:00
1 parent 6463ede7db
commit c8dc8e5fd5
9 files changed
+340 -21

No files matched your search

+2 -1
View File
@@ -171,10 +171,11 @@ impl FileSystemSandboxContext {
permissions: PermissionProfile<AbsolutePathBuf>,
cwd: Option<PathUri>,
) -> Self {
let workspace_roots = cwd.iter().cloned().collect();
Self {
permissions: permissions.into(),
cwd,
workspace_roots: Vec::new(),
workspace_roots,
windows_sandbox_level: WindowsSandboxLevel::Disabled,
windows_sandbox_private_desktop: false,
use_legacy_landlock: false,