Does the git round trip work, and what keeps the guest's pushes on its own branches?
Answered 2026-10-04. Decided 2026-10-04: A, Go filter plus receive.hideRefs. Source: 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…). Changes 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. and S11-verification-and-spikesS11-verification-and-spikesthe filter's fuzz properties, including one that replays the filtered output and the exit reset into a headless emulator and checks it is back in its initial state, and a conformance case that prints every dropped seq…. Feeds 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:.
Figure 1. The round trip 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.. The guest reaches only wb-hostd. Fetches come from the export repository, so a fetch by ID from your repository (red, top) has nothing to reach. Pushes pass a Go ref filter before git parses them, so a push to main (red, bottom) stops there. The landing repository borrows objects from the export repository. A push then sends only new objects.
Options for the push guard
Section titled “Options for the push guard”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. said refs are “restricted to refs/heads/wb/<session-id>/*” without saying what restricts them. 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: left this to the spike.
Impact
Section titled “Impact”Evidence
Section titled “Evidence”- verified Clone, incremental fetch and push through
git-remote-wbover a socketpair, Go repository (679,335 objects, 426 MiB), git 2.56.0 and Apple git 2.54.0. First clone 16.3 s median through the tunnel, against 17.1 s for a local clone without it. A fetch of 200 new commits 0.6 s, a 3-commit push 0.1 s. Source: 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., “Measurements”, andresults/run1.txttorun6.txton the spike branch. - verified Protocol v2
upload-packwithuploadpack.hideRefsand everyallow*SHA1InWantoff served three unadvertised objects by ID. The export repository refused them on the server side under v2. The guest’s own git client refused to send the v0 request, so the server side under v0 against a hostile client wasn’t tested. Source:results/run2.txtandrun3-apple.txt, “Hidden data”. - verified The Go filter refused pushes to
main, a tag, another session, a lookalike sessionS10, the bare session ref, deletes, and a mixed push, with landing unchanged in every case. Source:results/run5.txtandrun3-apple.txt, “Push abuse”. - verified
receive.hideRefsalone createdrefs/heads/wb/S1from a push to that name (one run, Homebrew git,results/run5.txt), and applied the allowed ref of a mixed push (run3-apple.txt,run5.txt). - verified Strict fsck refused trees with
.git,.GIT,git~1,.., symlinked.gitmodulesand.gitattributes, mode100666, a bad commit date, and a.gitmodulesURL starting with-. Garbage, truncated and bit-flipped packs were refused. Your repository’s files were unchanged across the raw protocol attacks. Source:results/run3-apple.txt, “Push abuse” and “Raw protocol abuse”. - verified Push commands sent to
upload-packended in a protocol error, andwb-hostdrefused other services, extra arguments and bad protocol values before running git. Source:results/run3-apple.txt, “Raw protocol abuse”. - verified The flagger flagged 2% of 400 Go commits, 17% of 400 Express commits and 51% of 43 Wraith Box commits, at 11 to 18 ms per commit. Source:
results/run2.txt, “Risky-path flagger”. - inferred v2
upload-packalso serves objects from a borrowed object store, since it served an unreferenced object (results/run2.txt), though no run tried a borrowed store. So the export repository stores a copy of every object it serves. - assumed That vsock behaves like the socketpair: a byte stream with half-close. X18-vsock-handoffX18-vsock-handoff: Host-guest socket and descriptor hand-offCan wb-guestd, written in Go, open AFVSOCK sockets in a macOS guest? tests vsock in a macOS guest.
What this unblocks
Section titled “What this unblocks”- 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, settled here, and inputs for items 1, 4 and 6 (see the comment on 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:).
- The git gateway and the risky-path flagger in
wb-hostd(docs/implementation-plan.md), towards V1-M4-claude-end-to-endV1-M4-claude-end-to-end: `wb claude` end to endGit round trip with carry-in, landing and flagging, the model credential, the terminal records and the session summary, wb diff and wb land, on a sealed image..
Details and glossary
Why a filter and not only git. Git checks hidden refs after it has read and unpacked the pack, one ref at a time. The filter reads only the short list of refs at the start of the push, so a refused push never reaches git’s pack parser, and the refusal names the session’s prefix. Keeping receive.hideRefs as well means a bug in either layer alone does not open the landing repository.
Why the landing repository borrows. Git sends what the receiving side doesn’t have. An empty landing repository has nothing. The guest then sends the project’s whole history on its first push. With the export repository listed as an alternate object store, the landing repository already has that history. Garbage collection on the export repository must then keep what landing branches still use (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 6).
Glossary
- Remote helper: a program git runs to reach a remote it has no built-in transport for.
git-remote-wbhandleswb::URLs. connectcapability: the helper only opens a byte stream to the remote git program and copies bytes both ways.- Pkt-line: git’s framing: a 4-digit hex length, then the data.
- Command list: the lines at the start of a push that say which ref moves from which commit to which.
- fsck: git’s object checker.
- Alternates: a list of other object stores a repository may read objects from.
- Socketpair: two connected sockets in one machine, used here in place of vsock.