sandboxes: document branch-mode in-container clone and source-repo isolation#25007
Draft
ndeloof wants to merge 1 commit intodocker:mainfrom
Draft
sandboxes: document branch-mode in-container clone and source-repo isolation#25007ndeloof wants to merge 1 commit intodocker:mainfrom
ndeloof wants to merge 1 commit intodocker:mainfrom
Conversation
…olation Update the branch-mode workflow to reflect the move from on-host worktrees to an in-container clone exposed over git-daemon, and add a new source-repository isolation layer to the security model. Highlights the strong guarantee that an unconstrained agent cannot corrupt the host's .git directory or working tree, since the source mount is read-only and the agent operates on a private clone with its own index, refs, and working tree. Tracks docker/sandboxes#2477.
✅ Deploy Preview for docsdocker ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
docker-agent
reviewed
May 8, 2026
docker-agent
left a comment
There was a problem hiding this comment.
Assessment: 🟢 APPROVE
The documentation changes are well-written and follow Docker's style guidelines. The branch-mode section rewrite, source-repository isolation explanation, and security model updates are clear, accurate, and appropriately scoped.
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.
Summary
Documents the branch-mode rework introduced in docker/sandboxes#2477, which replaces on-host Git worktrees with an in-container clone exposed over
git-daemon, and surfaces the new source-repository isolation guarantee.User-facing changes in
usage.md:sandbox-<name>Git remote that gets wired on the host.git worktree list,cd .sbx/...) with the simplergit fetch sandbox-<name>review flow..sbx/-directory and "multiple branches per sandbox" sections.--workspace-volume, host worktree).Security-model changes:
security/isolation.mdthat explains why the agent — even running unconstrained — cannot corrupt the host's.gitstate. The host source is bind-mounted read-only at/run/sandbox/source; the agent's clone is private (own index, own refs, own working tree) and shares only the immutable object database via.git/objects/info/alternates.security/_index.md.security/workspace.mdto correct the previous "branch mode is a workflow convenience, not a security boundary" caveat, which is no longer accurate after added compose file example in accordion #2477.The changes lean heavily on the threat-model framing the user asked for: the new design is not just ergonomic, it is the first time
--branchprovides a hard isolation boundary for the source repository.Dependency
This documentation describes behavior introduced by docker/sandboxes#2477, which is not yet merged at the time of opening this PR. Please hold this PR or land it on the next sandboxes release that ships #2477.
Test plan
usage.mdbranch-mode sectionsecurity/isolation.mdsource-repository-isolation sectionusage.md,security/workspace.md, andsecurity/isolation.md