Skip to content

Update sdk run as sandbox#71

Merged
Dingway98 merged 5 commits intomainfrom
update-sdk-runAs-sandbox
Apr 7, 2026
Merged

Update sdk run as sandbox#71
Dingway98 merged 5 commits intomainfrom
update-sdk-runAs-sandbox

Conversation

@Dingway98
Copy link
Copy Markdown
Contributor

@Dingway98 Dingway98 commented Apr 7, 2026

Note

Medium Risk
Medium risk because it changes how process commands are serialized (quoting/flattening args and dropping use_shell) and adds runAs propagation across runtime file/process APIs, which could affect command execution and permissions behavior.

Overview
Adds first-class user impersonation support to sandbox runtime calls by introducing run_as/runAs on SandboxExecParams, threading it through SandboxHandle.exec, and providing SandboxFilesApi.with_run_as() to apply runAs to all file requests.

Refactors process execution to accept either a command string or SandboxExecParams plus optional overrides (cwd, env, timeouts, run_as), normalizing legacy fields by shell-quoting and folding args into command while omitting args/useShell from the wire payload.

Updates E2E/contract tests to use the new with_run_as("root") pattern, to accept create events in file watching assertions, and to add retry/backoff when creating sandboxes from newly-created snapshots; bumps SDK version to 0.90.1.

Reviewed by Cursor Bugbot for commit fd38cb4. Bugbot is set up for automated code reviews on this repo. Configure here.

@Dingway98 Dingway98 force-pushed the update-sdk-runAs-sandbox branch from 5f65202 to 8e04ace Compare April 7, 2026 23:35
Copy link
Copy Markdown

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 7350de8. Configure here.

@Dingway98 Dingway98 merged commit 65633b7 into main Apr 7, 2026
1 check passed
@Dingway98 Dingway98 deleted the update-sdk-runAs-sandbox branch April 7, 2026 23:55
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