zz_

7ed946d6 ยท zzmq.dev@gmail.com/zz

Commit

7ed946d6fc93b63bf76b8704625b311e5ee76ac9

Git smart-HTTP proxy: clean clone URLs, no exposed credentials Per direct request/question: clone command is now `git clone <origin>/<account>/<repo>` with no token, no raw Artifacts host, nothing to leak if screenshotted or pasted somewhere public. Cloudflare Artifacts' remote is already a real git-smart-HTTP server; new routes GET /:account/:repo/info/refs and POST /:account/:repo/git-upload-pack forward to it with a short-lived (120s), server-side-only read token injected as Basic Auth (base64, never URL-embedded, so the earlier clone-URL encoding bug doesn't apply here at all). Read-only: push still goes through commit_changeset, not this proxy. Real gap found and fixed while answering "is that token safe to make public": repos marked private in meta.json were NOT actually gated on any read path -- handleRepoPage/handleBlob/handleArchive rendered content to anyone who knew the URL regardless of visibility, despite the plan's stated enforcement scope including this. Added canReadRepo(), shared by all four read paths (the three existing ones plus the new proxy): a private repo now needs an explicit roles.json grant (any role) for the signed-in principal or one of their agents. Known, stated limitation: git CLI requests carry no session cookie, so cloning a private repo isn't wired up yet, only browsing it in a logged-in browser -- not silently pretended to work. Verified live: created a repo, confirmed the rendered command has no credential in it, ran a real `git clone` against it (succeeded, real history, correct origin), seeded a second commit via commit_changeset, ran `git fetch` on the existing clone and confirmed it picked up the new commit through the proxy. Test repo/session cleaned up after. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

Troy Howard <thoward37@gmail.com> -- 2026-10-12T01:46:23.000Z

Tree at this commit