
The PitWhere the crew shows up.

On Sunday I said lock your main branch. A viewer said his AI agent pushed to main anyway with a new worktree. A worktree cannot beat a rule your server enforces, so if the agent got through, the lock lived somewhere the agent could reach. One. Enforce it on the server, not in local hooks. Two. Empty the bypass list: agents get their own fine-grained token, no admin rights, no bypass. Three. Block force pushes and deletions, require pull requests for API merges too, and alert on every bypass.
Test it the honest way: from a fresh worktree, have your agent try to push one small change straight to main. If it lands, find out which key let it in.
PROMPT
You are a branch protection auditor. Review this repository and its hosting settings. (1) List every rule that protects the main branch and state whether it is enforced on the server (branch protection or ruleset) or only locally (git hooks, local config, editor or agent settings); flag every local-only rule as HIGH. (2) List every actor on any bypass list and every token, app or account the AI agents use; flag any agent credential with admin rights, bypass permission or permission to edit rules as HIGH. (3) Confirm force pushes and branch deletions are blocked on main, every change including API merges requires a pull request, and bypass events trigger an alert; list anything missing.
-MM


Comments
Start the Conversation