A locked-down workstation is only as tight as the credentials on it. As long as there is a GitHub token, PAT or SSH key on the box, anyone (or any coding agent) with a shell can push the source somewhere else. AgentValet now speaks git's own protocol, so the machine keeps one thing, an agent identity key, and every clone, pull and push goes through the broker: checked against the repositories that agent is allowed to reach, attributed, logged, and revocable in one click.
Nothing about the developer's workflow changes except the remote URL. Clone, branch, commit, pull, push, rebase: all unchanged. The remote points at the broker instead of github.com, and a tiny credential helper answers git's password prompt with a short-lived token that proves which agent is calling.
# 1. register this machine as an agent (once) npx @agentvalet/register # 2. tell git to authenticate to the broker with the agent key npx @agentvalet/register git-setup # 3. use the broker as the remote git clone https://api.agentvalet.ai/git/acme/ledger-service.git
github:contents.read (clone, fetch, pull) and, if it may push, github:contents.write.acme/ledger-service, or acme/* for everything under one owner. Anything not on the list is unreachable, for reads as well as writes.A git operation is not a special case. It runs through the exact pipeline a Slack message or a Stripe refund runs through, with the real path recorded, so the rules you already wrote apply to source code too.
contents.read; push needs contents.write. Deny-by-default: no grant, no call.For a push, the broker reads git's command header (never the file contents) and records the refs that changed and how. An auditor can answer "who pushed to main on the ledger service last Tuesday" from the same log that holds every other agent action.
{
"service": "receive-pack",
"upstream_status": 200,
"request_bytes": 48213,
"refs": [ { "ref": "refs/heads/main", "op": "update" } ]
}
If the organisation connects GitHub as a GitHub App rather than a personal login, the token the broker uses upstream is minted for that one repository and that one permission level, for that one call. Even the upstream credential cannot wander.
AgentValet governs what goes through it. The customers who want this most (regulated shops, agencies handling client code, anyone with an Intune-managed developer VM) pair it with a perimeter that leaves the broker as the single hole. The checklist is short.
gh auth login, no PAT, no SSH key, no Git Credential Manager account.api.agentvalet.ai; deny github.com, api.github.com, *.githubusercontent.com. If git can reach GitHub directly the broker is decorative.git push, so those are refused with a clear message rather than queued. The honest claim is: the only sanctioned path is the only path, and every use of it has a name on it.Reference, error table and limits: Governed git in the docs. Repository allow-lists are a Studio-and-up control; the passthrough itself is on every plan.
Register the machine, restrict the grant to the repositories it needs, and point git at the broker. Free to start, no credit card.