Skip to content

Which git data may reach the guest, and how far does the host trust its own git?

Decided 2026-10-04: A. Export repository. The decision and its reasons are in the I41I41 (closed): S08-workspace-and-git: which git data reaches the guest, and host git as a parserS08-workspace-and-git says how bytes move, but not which data the guest may get or how much the host trusts its own git when it parses guest data: comment that starts Decision (2026-10-04):. Source: I41I41 (closed): S08-workspace-and-git: which git data reaches the guest, and host git as a parserS08-workspace-and-git says how bytes move, but not which data the guest may get or how much the host trusts its own git when it parses guest data:, item 5 waits on X07-git-round-tripX07-git-round-trip: Git round tripRemote helper over vsock, read-only upload-pack, restricted receive-pack into the landing repository, flagging of risky paths. (I21I21 (closed): X07-git-round-trip: Git round tripDoes the git round trip work as S08-workspace-and-git describes: a remote helper over vsock, read-only upload-pack against the user's repository, restricted receive-pack into the landing repository, and flagging of…). Affects S05-cliS05-cli: Command Line InterfaceSpecify wb, the single user-facing command. and S08-workspace-and-gitS08-workspace-and-git: Workspace and Git Round TripHow code gets into the guest and how the agent's work gets back out, without sharing the host filesystem.. Note 2026-10-04: X07-git-round-tripX07-git-round-trip: Git round tripRemote helper over vsock, read-only upload-pack, restricted receive-pack into the landing repository, flagging of risky paths. answered item 5 with a Go filter on the command list, and receive.hideRefs as a second layer only (B21-git-round-tripB21-git-round-trip: Does the git round trip work, and what keeps the guest's pushes on its own branches?Yes, with conditions.). Note 2026-10-06: the decision is now in S08-workspace-and-gitS08-workspace-and-git: Workspace and Git Round TripHow code gets into the guest and how the agent's work gets back out, without sharing the host filesystem., see “The spec change” below.

host: trustedyour repositoryHEAD branchother branches, tags, notes, stashuntracked files, remote URLswb-hostdgit upload-packread-onlywb-hostdgit receive-packparses guest packslanding.gitrefs/heads/wb/<session>/*guest, untrustedgit-remote-wbproject clone, agentevery refwb land fetches into your repository

Figure 1. Both directions of the git round trip in S08-workspace-and-gitS08-workspace-and-git: Workspace and Git Round TripHow code gets into the guest and how the agent's work gets back out, without sharing the host filesystem.. Into the guest, upload-pack serves your repository, and the guest can ask for more than the branch it works on (red). Out of the guest, your own git parses packs the guest built, and later fetches them into your repository at wb land.

What the decision became in S08-workspace-and-gitS08-workspace-and-git: Workspace and Git Round TripHow code gets into the guest and how the agent's work gets back out, without sharing the host filesystem., with the details the table below left open:

The issue bundles six items. Item 1 is a real fork, with options below. The rest have one recommendation each.

Item Recommendation Now or later
1. Ref scope A below: an export repository with only the HEAD branch and refs the user adds in project settings. now
2. Untracked files Scan carried-in untracked files, and the staged and unstaged diff, with the image-seal secret scanner (S06-vm-lifecycleS06-vm-lifecycle: VM Lifecycle, Images and the Guest AgentHow guest images are built, how VMs are kept warm, how projects and sessions map onto guests, and what wb-guestd does.). Skip a file that matches and list it in the session summary, as for oversize files. now
3. Remote URLs Strip user names, passwords and query strings from every URL that reaches the guest. Rewrite SSH remotes to HTTPS for the guest, shared with I47I47 (closed): S07-egress-gateway: non-HTTP streams, SSH remotes and ECHS07-egress-gateway describes TLS and HTTP.. now
4. Host git Require a minimum git version, checked by wb setup and at each session start. Keep receive.fsckObjects and receive.maxInputSize. Don’t bundle git (GPL-2.0, against the license rule of S10-tech-stackS10-tech-stack: Technology ChoicesFix languages, libraries, packaging, and repository layout, with the reason for each choice.). A receive side in Go is a later option. now
5. Ref restriction receive.hideRefs set to hide everything but refs/heads/wb/<session-id>/. A Go filter on the command list is optional on top. after X07-git-round-tripX07-git-round-trip: Git round tripRemote helper over vsock, read-only upload-pack, restricted receive-pack into the landing repository, flagging of risky paths.
6. Landing lifecycle wb discard deletes the session’s refs and guest worktree. wb-hostd runs git gc on the landing repository after land and discard. A size cap per project, refused with an explanation (SEC13-bounded-resourcesSEC13-bounded-resources: Bounded resourcesCPU, memory and disk of each VM are capped., NFR06-explained-refusalsNFR06-explained-refusals: OperabilityEvery refusal names the rule that caused it and how to change it.). now

wb-hostd keeps a bare repository per project (projects/<id>/export.git), fetches only the selected branches into it from your repository, and serves upload-pack from there. Objects reachable only from other refs are never in it.

What the issue proposes (uploadpack.hideRefs), plus forcing git’s older protocol v0, which refuses a fetch of an object it didn’t advertise.

The issue’s proposal as written.

Advertise every ref, as upload-pack does by default.

RequirementA. Export repoB. Hidden, v0C. Hidden onlyD. As is
SEC04-no-guest-secretsSEC04-no-guest-secrets: No secrets in the guestThis includes the model credential. no secrets in the guestother refs absentknown attacksfetch by IDall refs
FR04-carry-inFR04-carry-in: Uncommitted changes carried inUncommitted host changes (staged, unstaged, untracked-not-ignored) are carried into the session at start. uncommitted changes carried inunchangedsameunchangedsame
NFR01-startupNFR01-startup: StartupGoals: a warm VM reaches the Claude prompt in about 4 s and a suspended VM in about 7 s, and no start takes more than 10 s (p95), excluding first-time project setup and the first boot after a host restart. session start timeone local fetchv0 slowerunchangedsame
Spec workS08-workspace-and-gitS08-workspace-and-git: Workspace and Git Round TripHow code gets into the guest and how the agent's work gets back out, without sharing the host filesystem.S08-workspace-and-gitS08-workspace-and-git: Workspace and Git Round TripHow code gets into the guest and how the agent's work gets back out, without sharing the host filesystem.S08-workspace-and-gitS08-workspace-and-git: Workspace and Git Round TripHow code gets into the guest and how the agent's work gets back out, without sharing the host filesystem.none

Items 2 to 6 strengthen SEC03-no-host-execSEC03-no-host-exec: No host code execution via returned workNothing the agent produces executes on the host without an explicit user action; returned changes to files the host may later execute are flagged., SEC04-no-guest-secretsSEC04-no-guest-secrets: No secrets in the guestThis includes the model credential., SEC06-repo-writesSEC06-repo-writes: Repository-scoped writesGit pushes and repository-mutating API calls are allowed only for the repositories of the projects that have a session in the VM. and SEC13-bounded-resourcesSEC13-bounded-resources: Bounded resourcesCPU, memory and disk of each VM are capped., and weaken nothing.

Details and glossary

Why the guest can name a hidden commit. The ID of a commit is in plain sight more often than it seems: cherry-picks with -x, reverts (“This reverts commit …”), issue comments, CI logs. With protocol v2 the guest asks for that ID and receives the commit with its whole history, unless the object isn’t in the served repository at all, which is what an export repository ensures.

Why a minimum version. Each receive-pack parses packs the guest built, and wb land later runs your own git against them. Git has had security fixes in these code paths, and Apple’s git ships them later than upstream. wb setup names the git it uses and refuses one below the minimum, with the reason.

Glossary