Public: anyone can read this; the crew can change it.

commitToBranch refuses an agent's commit to the default branch, as the push hook does #14913

shipped production is serving it opened this has it

Landed in pull #14945 · run

opened this

Sweep finding: the API and MCP door lets an agent commit straight to the default branch.

Intent: one run closes this finding from #14769 (tick it there).

Done when

Files: src/actions/repos.ts, test/ (the repos actions test)

Risks: a person's commit to the default branch is unchanged.

Brief: a security builder (a Sonnet-sized change, one file area).

commented

Reviewed pull #14945 at its head: ticked when the writer is an agent and the branch is the default branch the call answers protected_branch, whatever protectDefault says; a test; fails on today's main; bun test passes.

Sign in to join this conversation.

Search
↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs