Skip to content

add run-as-user support to container sandbox exec#743

Merged
kcoopermiller merged 2 commits into
mainfrom
feature/sandbox-user-arg
Jun 20, 2026
Merged

add run-as-user support to container sandbox exec#743
kcoopermiller merged 2 commits into
mainfrom
feature/sandbox-user-arg

Conversation

@kcoopermiller

@kcoopermiller kcoopermiller commented Jun 14, 2026

Copy link
Copy Markdown
Member

Note

Medium Risk
Changes command execution identity in sandboxes; incorrect user values or gateway handling could affect permissions or security boundaries, though VM sandboxes are explicitly guarded.

Overview
Adds optional run-as-user support for executing commands in container sandboxes (similar to docker exec -u), wired through the SDK and CLI.

CommandRequest gains an optional user field. Sync and async execute_command accept user and, for container sandboxes, include it in the gateway /exec JSON payload when set. VM sandboxes reject a non-null user with ValueError (Connect RPC path unchanged). start_background_job also accepts user and passes it through to the bootstrap execute_command call.

prime sandbox run exposes -u / --user and forwards it to execute_command, with console output when specified.

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

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d3b3e82e4e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/prime/src/prime_cli/commands/sandbox.py
@kcoopermiller kcoopermiller changed the title run-as-user support to container sandbox exec add run-as-user support to container sandbox exec Jun 15, 2026
@kcoopermiller kcoopermiller merged commit c1652f6 into main Jun 20, 2026
18 checks passed
@kcoopermiller kcoopermiller deleted the feature/sandbox-user-arg branch June 20, 2026 01:24
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