Repository navigation
Conversation
…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>
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.
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).