Getting around the gate
The risk: a change reaches your code without the review your policy asks for. Someone approves their own change, an admin merges past a red check, someone with bypass rights pushes straight to the default branch, a merge happens while Arbiter is stopped, or someone weakens the repository that holds the policy.
What Arbiter does: it refuses what it can judge inside a pull request, such as an approval from someone who wrote or pushed the change. It cannot stop what GitHub lets past its check, but it records it and sends an alert to a webhook you choose, within the limits below.
What Arbiter does about each way around
Section titled “What Arbiter does about each way around”- Approving your own change. The approval never counts. Arbiter leaves out the person who opened the pull request, every commit’s author and committer, and everyone who pushed to its branch, even if their commits were later rewritten. A review by a bot does not count either.
- Pushing after an approval. An approval counts only for the commit it approved. A push makes Arbiter check again, and the reviewer must approve the new commit.
- Dismissing an approval. Arbiter checks again, and the dismissed review no longer counts.
- Changing the target branch. Arbiter checks again. From then on, no run of a check your policy ties to a
workflowcounts for that pull request: not a new run, and not after the target is changed back. Such a run also never counts if another pull request has ever been opened from the same branch. To have those checks count again, open a pull request from a branch that has never had one. - A pull request from a fork. Arbiter cannot count approvals or ordinary checks on it, so an approval there never counts. Where your policy needs an approval for the change, the pull request is not allowed. A trusted scan’s result still counts, so a change that needs no approval can be allowed (Pull requests from forks).
- Merging without Arbiter’s allow: an admin or bypass actor merging past a red check, or anyone merging while Arbiter’s check is not required. GitHub lets the merge through. Arbiter records it, comments on the pull request asking for the reason, and sends an alert.
- Pushing straight to the default branch past its ruleset. Arbiter finds the push in GitHub’s rule suites, records
it as
direct_pushand sends an alert. There is no pull request, so there is no comment. - Merging while Arbiter is stopped. GitHub does not resend a webhook Arbiter missed. Arbiter’s catch-up sweep runs at startup and every hour. It finds pull requests merged since its last sweep (the last 24 hours, the first time), then records, comments and alerts as above.
- Weakening the policy repository. Arbiter uses the policy repository only while GitHub protects its default
branch: a rule requires an approval after the latest push (as many approvals as the policy’s
min_approvalsasks, 1 by default) and review from code owners, no review rule can be bypassed, force pushes and deletion are blocked, andArbiter / policy-reviewis required from Arbiter’s App with “Require branches to be up to date before merging” on and no merge queue on the branch, each by a rule nobody can bypass. If any of these is missing, for example a bypass actor on the ruleset that requires the approval, or Arbiter cannot read the protection, Arbiter denies every pull request it checks, with reasonPOLICY_REPO_UNPROTECTED. Its check then fails, even in advisory mode. Arbiter sees a merge queue only in rulesets: check classic protection yourself (administrator manual A3). - Merging into the policy repository without a passing
Arbiter / policy-reviewcheck before the merge, or past one of its rules. Arbiter records the merge, comments and alerts, as for any other repository.
How Arbiter records a merge. Every merged pull request in a repository Arbiter governs gets one class, judged as things stood when it merged:
allowed: Arbiter’s own check had allowed the pull request’s latest commit, and finished, before the merge, with no newer Arbiter check started on that commit. No comment and no alert.bypassed: merged without that pass, in blocking mode (in the policy repository, in any mode).provisional_violation: merged without that pass, in advisory or visibility-only mode.unverified: Arbiter could not read what it needed to tell. It gets a comment and an alert likebypassed. Arbiter keeps trying for 24 hours, and sends a follow-up alert once it can tell.direct_push: a push to the default branch that went past its rules. An alert, and no comment.
The mode is the one used by Arbiter’s latest decision on that commit before the merge, or the current mode if there was no such decision.
Set it up
Section titled “Set it up”- Require Arbiter’s check (
Arbiter / authorize) on every branch that pull requests target (usually each repository’s default branch), with your Arbiter App as its source, in a ruleset, with “Require branches to be up to date before merging” on (administrator manual, A8). - Keep the bypass list empty, then run the posture check
(A9). Look for
overall: passand R4BYPASS_NONE. The posture check answers only when an administrator runs it: it sends no alert. - Turn on alerts (A16): give Arbiter your webhook URL, send a
test alert, and list the repositories that are
not_coveredfor direct pushes. - Protect the policy repository (A3), and require
Arbiter / policy-reviewon it. - Set up an uptime monitor (A15). Arbiter sends no alert while it is stopped.
- Agree who may break glass before you need to (A17). Each merge in the window is recorded.
- Switch on blocking when you are ready (A11): the starter runs in advisory mode.
What it does not cover
Section titled “What it does not cover”- People who can change your rulesets. They can remove Arbiter’s check or add a bypass actor, and Arbiter cannot stop them. It records the merges that follow, and the posture check shows a check that is no longer required, or a new bypass actor, the next time it is run.
- Who asked an AI agent for the change. Arbiter leaves out GitHub accounts only. By default, an agent’s pull request needs
at least 2 different approving accounts wherever the policy asks for a team’s approval (the policy can set another
number), so the person who asked for the change cannot be the only account that approves. A co-author GitHub resolves from a
Co-authored-by:line cannot approve, but a trailer whose email is not linked to a GitHub account leaves no one out. Arbiter counts GitHub accounts, not people: only accounts the policy lists as approvers can approve, so a second account the author controls counts only if it is listed. - Who is on the approver list. Arbiter trusts the list in your policy. Someone who controls two listed accounts can approve twice. A change to the list needs 2 approvals from accounts already on it, but whoever can turn off the policy repository’s protection can change it without them. Arbiter then denies every evaluation, and sends an alert for the policy commit that did not come from a reviewed merge, until your administrator confirms the commit (A17b).
- Direct pushes where no active ruleset governs the default branch. Arbiter does not see them. It lists a
repository with classic branch protection only, or only an
evaluate-mode ruleset, asnot_covered. Only the default branch is watched. Arbiter looks every 5 minutes, so a push is found minutes later, not at once. - Branches where Arbiter’s check is not required. The check blocks a merge only where GitHub requires it. A merge into another branch without Arbiter’s allow is still recorded and alerted.
- A stopped Arbiter. It sends nothing while it is stopped. When it starts again, the catch-up sweep records the merges it missed, and the direct-push check reads back to where it stopped, up to a month.
- Alerts before you set the URL. Alerts are off until the webhook URL is set, and a merge recorded while they were off is never alerted later. A failed alert is retried for 24 hours, then Arbiter stops trying. An alert can arrive more than once.
- The reason for a bypass. The comment asks for it, but Arbiter does not read the reply.
- Advisory mode. It blocks no merge itself (two denials still apply in every mode, administrator manual A10). A merge without Arbiter’s allow is recorded as
provisional_violationand alerted, as in visibility-only mode. - Changes you want from forks. A fork pull request whose change needs an approval is never allowed, whoever opened it (Pull requests from forks).
- A protection change in the policy repository is seen by the next evaluation. An evaluation already running finishes on the policy it read.
- Repositories with no policy. Apart from the policy repository, Arbiter does not sweep them or watch them for direct pushes.
What the pull request author sees
Section titled “What the pull request author sees”- Their own approval: the comment still lists the approval as missing and says whose approvals do not count (Why your own approval does not count).
- A fork: the comment says Arbiter cannot read approvals and checks on a pull request from a fork, and “Open the pull request from a branch in this repository.”
- An unprotected policy repository: the check reads “Blocked: policy repo is not protected”. The comment counts the gaps and says nothing in the pull request needs to change. The server log names each gap for your administrator. If Arbiter could not read the protection, the check says so and the comment asks for a re-run.
- After a merge without Arbiter’s allow: a comment on the merged pull request says it was merged without Arbiter’s
allow, gives Arbiter’s reading of why, and asks for the reason in a reply. For
unverified, it says Arbiter could not confirm that the merge was allowed.
What Arbiter reads
Section titled “What Arbiter reads”To judge approvals, Arbiter reads the pull request, its commits, the pushes to its branch, its reviews and each
reviewer’s team membership. For checks tied to a workflow, it also reads the pull request’s target changes and the
other pull requests from the same branch. To record merges, it reads merged pull requests, its own check runs on
them, the rules on each default branch and GitHub’s rule suites, which name who went past a rule. For the policy
repository, it reads the protection of its default branch. It keeps one record per merge commit, with the merged_by
and bypass_actor logins. An alert carries a one-line text, an event type (merge, or merge_resolved when a
follow-up confirms an earlier unverified merge), the class, owner, repository, pull request number and link, those
two logins, the time Arbiter recorded the merge and, on a follow-up, a notice: no file names, titles or reasons.
Details are in What Arbiter receives, keeps and deletes.
Built from Arbiter 0.1.3 at commit 05d1dcb.