Skip to content

Keep git reads and pushes inside the caller's hub - #9

Merged
keshav55 merged 3 commits into
mainfrom
codex/claude-hub-isolation-for-git-fetch-and-diff-20261106-220800
Nov 6, 2026
Merged

keshav55 merged 3 commits into
mainfrom
codex/claude-hub-isolation-for-git-fetch-and-diff-20261106-220800

Conversation

@keshav55

@keshav55 keshav55 commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Every hub shared one git store. Fetch and diff only checked that a commit existed, so a member of one hub could read another hub's code by hash, and a 4-character prefix was enough to guess one.

Now every hub has its own bare store (directory is a hash of the hub id, so ids never become paths). Pushes that name a commit the bundle does not carry, build on a missing base, or name a non-commit object get 400. Ping no longer refreshes last_seen for the member named in the URL.

Attack tests (other hub by hash and by prefix, thin bundle on a foreign base, forged head, blob head, path escape) fail on the old code and pass now. Full suite: 713 passed. Two review rounds by a second model; the second found no cross-hub path left.

Note: commits pushed before this change sit in the old shared store and need a re-push.

Found by atris sentinel (codex hunted, claude verified).

keshav55 and others added 3 commits November 6, 2026 14:14
…ting other members' last_seen

Every hub shares one git store, and fetch and diff only checked that a commit
existed. Any member of one hub could read another hub's code by hash, and a
4-character prefix was enough to guess one. A thin bundle naming another hub's
commit as its base also pulled that commit into the pusher's history.

Reads now need a full hash in the hub's own history, and pushes may only build
on that history. Found by atris sentinel, checked by a second model.

Co-authored-by: Atris <299057014+atris-builder[bot]@users.noreply.github.com>
Review found two bypasses of the shared-store checks: a forged bundle head could
claim another hub's commit, and the ancestry walk could be made slow. A store per
hub removes the shared objects entirely. Pushes that name a commit the bundle
does not carry, or build on a missing base, now get 400. Hub ids are hashed into
directory names so they never become paths.

Commits pushed before this change live in the old shared store and need a re-push.

Co-authored-by: Atris <299057014+atris-builder[bot]@users.noreply.github.com>
…ets 400, not 500

Co-authored-by: Atris <299057014+atris-builder[bot]@users.noreply.github.com>
@keshav55
keshav55 merged commit d4263bb into main Nov 6, 2026
1 check passed
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.

1 participant