Some checks failed
ci / cargo test (abacus) (push) Has been cancelled
ci / cargo test (agent-runtime) (push) Has been cancelled
ci / cargo test (context-passport) (push) Has been cancelled
ci / cargo test (game-economy) (push) Has been cancelled
ci / cargo test (ledgerline) (push) Has been cancelled
ci / cargo test (mint) (push) Has been cancelled
ci / cargo test (rago) (push) Has been cancelled
ci / cargo test (relay) (push) Has been cancelled
ci / cargo test (toolgate) (push) Has been cancelled
ci / cargo test (turnstile) (push) Has been cancelled
ci / cargo test (vend) (push) Has been cancelled
ci / node suites (push) Has been cancelled
Gap 1 (server-side enforcement): a raw `git push --force`/branch-delete made with an agent-session token, bypassing `rit push`'s own client-side hold, landed directly before this change. New apps/rithub-agent-gateway sits in front of the one real git-smart-HTTP write route (POST .../git-receive-pack, Caddy handle block on railyard-box) as a pkt-line-aware reverse proxy: a token the server already knows is agent-session-attributed (marked via the new POST /approvals/api/agent-session/mark, called by every `rit` command when RITHUB_AGENT_SESSION_ID is set) doing a delete or a push to a protected branch is held into refs/pending/<id> and registered as a real approval, same ledger/code path rit push already uses -- the client gets a clean `ng ... held for approval` rejection. Every other push (human tokens, unmarked tokens, agent pushes to non-protected branches) is a pure byte-for-byte passthrough, zero behavior change. Gap 2 (no pasted tokens): /approvals now uses the signed-in rithub.dev session cookie plus a one-time real OAuth2 (PKCE, same "Rit CLI" engine app `rit login` uses) authorize step -- no owner/repo fields, no token field, anywhere on the page. GET /approvals/api/mine lists pending approvals across every repo the signed-in human can push/admin; approve/ deny are one click each (POST /approvals/api/mine/:id/approve|deny). Live-verified on rithub.dev with a fresh mail.tm test account: plain `git push --force` and `git push origin :branch` with an agent-session token both held (target ref/branch untouched); a human-token push landed directly, unaffected; the signed-in web page approved the exact staged commit and denied the delete leaving the branch untouched; full route regression + clone/fetch stayed 200; no token/hash/email leaked in any API response. Test account and repo deleted after. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
15 lines
582 B
JSON
15 lines
582 B
JSON
{
|
|
"name": "rithub-agent-gateway",
|
|
"version": "0.1.0",
|
|
"description": "Server-side enforcement for RIT-ACT (RIT-ACT gap 1, 2026-12-01): a raw `git push`/`git push --force`/branch-delete made with an agent-session token, bypassing `rit` entirely, is held the same as rit push already holds it client-side -- never left to the client to decide. Human tokens and every other push pass through byte-for-byte unchanged.",
|
|
"type": "module",
|
|
"private": true,
|
|
"engines": {
|
|
"node": ">=20"
|
|
},
|
|
"scripts": {
|
|
"start": "node bin/start.mjs"
|
|
},
|
|
"license": "UNLICENSED"
|
|
}
|