Administrator manual
Describes: Arbiter 0.1.3. For: the person who installs and runs Arbiter for their organization.
Each task below is a numbered procedure with the result you should see. What Arbiter receives, keeps and deletes is in What Arbiter receives, keeps and deletes.
Before you start
Section titled “Before you start”You need:
- a Linux host with Docker;
- a public HTTPS address that forwards to the host (a reverse proxy). Keep it fixed: the App’s webhook URL (A4) and
ARBITER_BASE_URL(A6) both hold it. If it changes, set the new one in the App’s settings (General → Webhook URL), then replace the container with the newARBITER_BASE_URL(docker rm -f arbiter, then A6 step 2); - an owner of your GitHub organization, for A3 to A5 and A8 (A3 needs at least admin rights on the policy repository);
- a GitHub plan that enforces rules on a private repository (GitHub Team or Enterprise) if your policy repo is private. On GitHub Free, rulesets on a private repository are not enforced, so Arbiter denies every evaluation until the policy repo is protected (A3).
Run every command in this manual from one folder on the host: the folder where A4 creates arbiter-secrets/ and A6
creates arbiter-data/. The commands name both as $PWD/….
Throughout, <release digest> is the full digest of the release you install, sha256: followed by 64 hexadecimal
characters, as listed on Releases.
A1. Get the image
Section titled “A1. Get the image”Each release is one image, named by its digest. The digests are listed on Releases. Only a digest listed there is a release: other tags on the image, such as candidate and rehearsal tags, are not. The image is private. We issue your organization a pull token: a token for a pull account that can read this image and nothing else. We send it, with the account’s user name, through the channel we agreed with you, never by chat or ticket. It expires after 90 days, and we send a new one before then.
-
Log in, in
bashorzsh, giving the token on standard input so it never appears in a command line. The command shows no prompt: paste the token, then press Enter.Terminal window read -rs GHCR_TOKEN && printf '%s' "$GHCR_TOKEN" | docker login ghcr.io -u <the pull account's user name> --password-stdin; unset GHCR_TOKEN -
Pull the release by its digest. The pull itself checks the digest, and fails if the image does not match it:
Terminal window docker pull ghcr.io/arbitercontrol/arbiter-control-plane@<release digest> -
Log out, so the token does not stay in Docker’s settings file on this host. This also logs out any other
ghcr.iologin on this host:Terminal window docker logout ghcr.io
When we send you a new token, use it for the next login; nothing else changes.
Expected: docker pull prints Digest: <release digest> and ends with Status: Downloaded newer image or
Image is up to date; docker logout prints Removing login credentials for ghcr.io.
When your access ends (the pilot ends, or you ask us), we revoke your token:
- pulls are refused from then on, so a release you have not already pulled can no longer be pulled, including one you would roll back to (A14);
- images you already pulled, and a running Arbiter, are not affected.
A2. Create the policy repository
Section titled “A2. Create the policy repository”- Create a private repository in your organization, for example
<your-org>/arbiter-policies. - Copy
policies/andsamples/fromstarter/into it. - Rename
acme/payments-apiin both paths to<your-org>/<your-pilot-repo>, one folder per pilot repository. - In
policy.yamland in each sample, replace theacme/platformandacme/securityteams with your own (org/slug). Change the path patterns to match your repository, and set the trusted repository and pinned commit of theterraform-validateentry (and of the other trusted checks) to yours. - Leave
rollout-mode.yamlasrollout_mode: advisory. - Commit the files and push them to the default branch. The repository is not protected yet (A3 comes next), so this first push can go straight to it. In A6 you confirm the newest commit on that branch to Arbiter. Every change after it goes in through a reviewed pull request (A3).
Expected: for each pilot repository, the policy repo has:
policies/<org>/<repo>/policy.yaml;policies/<org>/<repo>/rollout-mode.yaml;- at least one sample under
samples/<org>/<repo>/.
A pilot repository with no policy.yaml gets POLICY_UNAVAILABLE on every pull request.
A3. Protect the policy repository
Section titled “A3. Protect the policy repository”Arbiter uses the policy repo only while GitHub protects its default branch. Until then it denies every evaluation with
POLICY_REPO_UNPROTECTED.
- On the policy repo’s default branch, add a
CODEOWNERSfile (GitHub reads it from the repository root, adocsfolder or a.githubfolder) that names the people or the team who own the policy files, for example* @<your-org>/<policy-owners-team>. Each owner needs write access. Do this first: code-owner review (step 4) does nothing without it. - In the policy repo, open Settings → Rules → Rulesets → New branch ruleset. Give it a name, for example
policy-repo-protection, and under Target branches choose Add target → Include default branch. - Turn on Require a pull request before merging, with 1 required approval, or the higher number your policy asks for (see “How many approvals” below). Under Allowed merge methods, leave only Squash and Merge on, and turn Rebase off. Arbiter counts a policy change only from a squash or merge commit that GitHub made from a reviewed pull request. A rebase merge is treated as unreviewed (A6). For the same reason, do not add Require merge queue to this ruleset.
- On the same rule, turn on Require approval of the most recent reviewable push and Require review from Code Owners.
- Turn on Block force pushes and Restrict deletions.
- Leave the Bypass list empty.
- Set Enforcement status: Active, then Create.
- Later, not now: require the
Arbiter / policy-reviewcheck from your Arbiter App, with Require branches to be up to date before merging on in that same rule. You do this once, in A8 step 3, after A6: the ruleset screen cannot offer the check until Arbiter has started (the API route below can add it earlier). You do not need a policy repository pull request first: until a rule requires the check, Arbiter posts a failed run of it on the policy repository’s newest commit, titled “Setup marker: no policy change was reviewed”, so GitHub offers the check from your App within a minute of Arbiter starting (A6).
Classic branch protection also works, up to 6 required approvals (GitHub’s classic limit; for a policy count of 7 to 10, use a
ruleset): require pull request reviews (1 approval, or the policy’s higher number,
approval of the most recent push, review from Code Owners), require the Arbiter / policy-review status check from your Arbiter App (add the check
later, as in step 8, with Require branches to be up to date before merging on), turn on Do not allow bypassing the above settings, add no bypass allowances, and leave Allow force pushes and Allow deletions
off. Allow only squash and merge commits under the repository’s Settings → General → Pull Requests. Use no merge queue on the
policy repository’s default branch, in rulesets or in classic protection: Arbiter does not review merge-queue commits, and it
cannot see a queue set in classic protection, so check that setting yourself.
Why the check’s rule must also require up-to-date branches. With Require branches to be up to date before merging
on, GitHub merges a policy pull request only when its branch contains the policy branch’s newest commit, so the merged
files are exactly the ones Arbiter reviewed. A pull request that is behind gets a failed Arbiter / policy-review, “update
your branch: the policy branch moved since this pull request was last updated”: update it, and the review runs again.
Without the setting, Arbiter does not trust the policy repository (P2-up-to-date). It also does not trust it while a ruleset
puts a merge queue on the branch (P2-merge-queue). Turning the setting on and removing a queue are separate actions, and the
setup check shows only the first of these three conditions that applies (check missing, setting off, ruleset queue, in that
order) and also reports any other protection gap in the same run, so run it again after each fix (the two rows below).
How many approvals. Your policy can name the fewest approvals this rule may ask for:
policy_repository.min_approvals, a whole number from 1 to 10 (P17 in the Policy-author manual).
Arbiter takes the highest value across all the policy files at the commit it uses, and 1 when none sets it. The starter
policy sets 2. Arbiter then trusts the policy repository only while one rule requires at least that many approvals and
also approval of the most recent push, so set step 3’s number to the policy’s number or higher. If GitHub requires
fewer, every pull request gets POLICY_REPO_UNPROTECTED; the server log and the Arbiter / policy-review protection line
name both numbers, and the setup check shows the gap as P2-min-approvals.
A policy_repository section already in a policy takes effect when you upgrade: earlier releases ignored it, so it can
start denials until GitHub’s rule matches it. A mistake in it (a mistyped key, or a value outside 1 to 10) stops the policy
loading. Fix every invalid section in one reviewed pull request, without break glass: its Arbiter / policy-review check
names the files and how many writers must approve after the last push. If that is more than the policy repository’s rule
requires, raise the rule first. A file that is not valid YAML or fails another check, or a policy history that already has
a finding, still needs break glass (A17b), then confirm the new commit (A6).
To lower the number, merge a policy change that lowers it first: policy review needs as many approvals as the old
number, from accounts that did not write the pull request. Then lower GitHub’s rule. If too few eligible reviewers
exist, add reviewers first. Otherwise break glass (A17b) to make the change outside the gate, then confirm the new policy
commit with ARBITER_POLICY_ACCEPT_COMMIT (A6). That confirmation is recorded.
The setup marker. The red run on the policy repository’s newest commit is not a review: it reviews and approves
nothing, and the policy repository is still untrusted while it shows. Arbiter posts it only while no rule names
Arbiter / policy-review, and not while it cannot read the policy repository’s protection (P2-unread in A9b: give the
App Administration: read first). It shows on the newest commit until setup is complete and the next commit lands.
A second route. You can add the requirement through GitHub’s rulesets API instead of the ruleset screen. GitHub
accepts it before the check has ever run. Update the policy repository’s ruleset with its existing rules and this one,
where <App ID> is the number in arbiter-secrets/app-id:
{ "type": "required_status_checks", "parameters": { "strict_required_status_checks_policy": true, "required_status_checks": [{ "context": "Arbiter / policy-review", "integration_id": <App ID> }] }}Until step 8 is done, Arbiter does not trust the policy repo: it denies every evaluation in every mode, advisory
included, with POLICY_REPO_UNPROTECTED. Arbiter / authorize still completes, so the pilot pull requests of A8 can
still select it.
Expected: the ruleset shows as Active. Once Arbiter runs (A6) and step 8 is done, the policy repo’s next
Arbiter / policy-review check prints “Policy repo protection: confirmed”. Arbiter reads the protection again for
every evaluation, so a change in GitHub shows at the next one. If it names a gap instead, the server log names the
same gap, on a line starting [evaluation-job] policy repo protection not confirmed:
| Gap | Fix |
|---|---|
protection could not be read: … |
The App needs Administration: read on the policy repo. Check the installation, then run again. A read that GitHub fails is retried once |
no rule requires an approval after the last push |
Steps 3 and 4, on the same rule |
the policy repository requires 1 approval after the last push; the policy requires 2 (the numbers vary) |
GitHub’s rule asks for fewer approvals than the policy’s policy_repository.min_approvals. Raise the number in step 3, on the same rule that requires approval of the most recent push, or lower the number in the policy through a reviewed pull request |
the policy's minimum approval count could not be read |
A policy file is not valid YAML or has an invalid policy_repository section, or GitHub failed, ran out of time or answered in part. If GitHub failed, run again. If a policy_repository section is at fault, fix every invalid section in one reviewed pull request, without break glass: its Arbiter / policy-review check names the files and how many writers must approve after the last push (raise GitHub’s rule if that number is higher). If the file is not valid YAML, fails another check, or the policy history already has a finding, use break glass (A17b), then confirm the new commit (A6) |
review rules can be bypassed: … |
Empty the bypass list of every ruleset with a pull request rule. In classic protection, turn on “Do not allow bypassing” and add no bypass allowances |
force pushes are not blocked by a rule nobody can bypass |
Step 5, on a ruleset with an empty bypass list, or classic “Allow force pushes” off |
the policy-review check is not required from Arbiter's App by a rule nobody can bypass |
Step 8 (A8, step 3), with your Arbiter App as its source, in a ruleset with an empty bypass list |
the policy-review check is required without 'Require branches to be up to date before merging' (P2-up-to-date) |
Turn on Require branches to be up to date before merging on the rule that requires Arbiter / policy-review: in a ruleset, or in classic branch protection with admins enforced |
a merge queue applies to the policy branch; Arbiter doesn't review merge-queue commits (P2-merge-queue) |
Remove the merge queue from the policy branch |
deletion is not blocked by a rule nobody can bypass |
Restrict deletions (step 5), on a ruleset with an empty bypass list, or classic “Allow deletions” off |
code-owner review is not required, on the approval rule, by a rule nobody can bypass |
Require review from Code Owners (step 4) on the same rule as the approval, and the CODEOWNERS file (step 1) |
The check and the pull request comment only count the gaps, because pull request authors cannot fix them.
A4. Create your GitHub App
Section titled “A4. Create your GitHub App”-
On a machine with a browser, create a folder for the App’s secrets, readable only by you:
Terminal window mkdir -m 700 arbiter-secrets -
Run setup. Keep port
8787on both sides of-p:Terminal window docker run --rm -p 127.0.0.1:8787:8787 -v "$PWD/arbiter-secrets:/out" --user "$(id -u):$(id -g)" \ghcr.io/arbitercontrol/arbiter-control-plane@<release digest> setup-app --org <your-org> --url https://<your public host>On a host without a browser, first forward the port from your laptop (
ssh -L 8787:127.0.0.1:8787 <host>).Setup names the App
arbiter-<your-org>. App names are unique across all of GitHub, so if your organization already has an App with that name (for example a staging server’s), add--name <name>: 1 to 34 letters, digits or hyphens, starting with a letter or digit. -
Open
http://127.0.0.1:8787/and approve the App on GitHub. GitHub returns your browser to127.0.0.1:8787. If GitHub says the name is already taken, stop setup (Ctrl+C) and run it again with another--name. -
Open the App link setup prints, and check that the App’s owner is your own organization.
Expected: arbiter-secrets/ holds five files, each with mode 0600:
app-id;github-app-private-key;github-webhook-secret;arbiter-api-token;arbiter-admin-token.
Setup prints only their paths and the App’s link. If writing failed after GitHub created the App, setup prints the App’s address: delete the App there and run setup again.
The App’s permissions:
- repository: Checks write, Contents read, Issues write, Pull requests write, Metadata read, Administration read, Actions read;
- organization: Members read;
- events:
pull_request,pull_request_review,check_run.
Arbiter needs Administration read to confirm GitHub protects your policy repo and requires Arbiter’s check, and
Actions read to confirm which workflow run sent a trusted scan’s result. An App created earlier needs Actions read
added in its settings (Permissions → Repository → Actions: Read-only), then accepted on the installation.
Arbiter does not ask for Secrets or Environments permissions: setup-check reads secret names with a token of your
own instead (A9c).
A5. Install the App on the pilot repositories and the policy repository only
Section titled “A5. Install the App on the pilot repositories and the policy repository only”- On the App’s page, choose Install, then your organization.
- Choose Only select repositories, and select your pilot repositories (one or two to start) and your policy repository (A2).
- Note the installation ID. After installing, GitHub opens the installation’s settings page,
https://github.com/organizations/<your-org>/settings/installations/<id>. The number at the end is the installation ID you give Arbiter in A6.
Expected: the installation lists exactly those repositories. Arbiter acts only where the App is installed. One Arbiter server serves exactly one installation, on an organization, and ignores deliveries from any other.
A6. Start Arbiter
Section titled “A6. Start Arbiter”Arbiter trusts a policy commit only when it came from a reviewed merge. A new server has no earlier commit to compare with, so you name one: read the policy files as they stand on the policy repository’s default branch, then copy the full 40-character ID of its newest commit (open Commits, and use the copy button beside the short ID). Arbiter takes only the full ID, in lowercase letters and digits.
-
Create the data folder:
Terminal window mkdir -m 700 arbiter-data -
Start the container:
Terminal window docker run -d --name arbiter --restart unless-stopped --user "$(id -u):$(id -g)" \-p 127.0.0.1:3000:3000 \-v "$PWD/arbiter-data:/data" -v "$PWD/arbiter-secrets:/run/secrets:ro" \-e GITHUB_APP_ID_FILE=/run/secrets/app-id \-e GITHUB_APP_PRIVATE_KEY_FILE=/run/secrets/github-app-private-key \-e GITHUB_WEBHOOK_SECRET_FILE=/run/secrets/github-webhook-secret \-e ARBITER_API_TOKEN_FILE=/run/secrets/arbiter-api-token \-e ARBITER_ADMIN_TOKEN_FILE=/run/secrets/arbiter-admin-token \-e ARBITER_BASE_URL=https://<your public host> \-e ARBITER_POLICY_REPO=<your-org>/<your policy repo> \-e ARBITER_GITHUB_INSTALLATION_ID=<the installation ID from A5> \-e ARBITER_POLICY_ACCEPT_COMMIT=<the full commit ID from above> \ghcr.io/arbitercontrol/arbiter-control-plane@<release digest>The
--useryou pass must ownarbiter-dataand the secret files. -
Wait about 10 seconds, since Arbiter checks its installation with GitHub before it listens. Then check that it started:
Terminal window docker logs arbiter 2>&1 | head -20curl -sS http://127.0.0.1:3000/healthIf
curlsays the connection was refused, wait a few seconds more and run both again. -
About a minute after start, check that Arbiter confirmed the commit:
Terminal window docker logs arbiter 2>&1 | grep 'confirmed by the admin'curl -sS https://<your public host>/health/status
Expected: the log lists which settings are set, by name only, and /health answers. If a setting is missing,
weak, a placeholder or set twice (both NAME and NAME_FILE), Arbiter refuses to start and names the setting,
never its value. Step 4 prints policy commit <the full ID> confirmed by the admin's setting. /health/status
answers 503 with policy_repo failed until A8’s step 3 adds the Arbiter / policy-review requirement (A3), and 200
after it (A15).
Arbiter also asks GitHub about the installation ID, and refuses to start unless it is an installation of this App,
not suspended, on an organization, and covering the policy repository. The log then shows
Installation: <id> (<your-org>).
Arbiter keeps its working copies of policy and pull request files in one folder of its own, inside the container’s
temporary folder, and clears it at each start. The log shows Temporary folder: <path>. If Arbiter refuses to start
because of the temporary folder, the message names the path and the reason:
is a link,is not a directory,is not owned by this user,could not be removed (<code>),could not be checked (<code>)orappeared while Arbiter was starting: check what is at that path, delete it while Arbiter is stopped, and start Arbiter again.has mode <n>, not 700: check the umask Arbiter runs with, then delete the folder while Arbiter is stopped and start Arbiter again.could not be created (<code>): check that the temporary folder (TMPDIR, or/tmp) exists and Arbiter’s user can write to it.is writable by its group or others and not sticky: this is the temporary folder itself, so do not delete it. PointTMPDIRat a folder only Arbiter’s user can write to, or set the folder’s sticky bit (chmod +t).
While Arbiter is stopped you may also delete any arbiter-server-*, arbiter-eval-*, arbiter-policy-*,
arbiter-trigger-policy-*, arbiter-sample-* or arbiter-review-* folder in the temporary folder; earlier releases
left some there, and a change of the data folder’s device leaves an old arbiter-server-* folder behind.
What the confirmation does. Arbiter runs its policy commit check as it starts, so a server whose commit is
confirmed reports policy_provenance healthy within about a minute. From then on it checks each later policy commit itself, and moves the
confirmed commit forward. A later commit counts only if it is a squash or merge commit that GitHub made, signed, from a
pull request in the policy repository that a writer approved on its final commit before the merge, with Arbiter / policy-review passing before the merge. The approver cannot be the pull request’s
author, the author or committer of any of its commits, or anyone who pushed to its branch. When the policy sets
policy_repository.min_approvals above 1 (A3), that many different writers must approve, by the number the policy
branch had before the change landed. A repair of an invalid section or list follows the repair rule instead (policy-author manual P17).
Until a commit is confirmed, Arbiter uses no policy. Every evaluation is denied, in every mode, with
POLICY_REPO_UNPROTECTED, and the pull request’s check says “the policy repo’s history is not confirmed”. The policy
review check says “waiting for the admin’s confirmation”. /health/status answers 503 with policy_provenance
failed (A15).
Confirm again only when Arbiter reports one of these (A9b’s P4 names which; the server log names each commit):
- a policy commit that did not come from a reviewed merge: a direct push, a rebase merge, a merge made through a merge
queue, a merge nobody else approved, a merge with fewer writer approvals than the policy asked for, or a merge onto a
policy commit whose minimum approval count Arbiter could not read (A9b’s
P4-unreviewedlists it). Arbiter also sends adirect_pushalert for it, once per commit (A16); - the policy branch was reset, rewritten or switched, or more than 50 commits came after the confirmed one;
- the data folder was lost or replaced (A12, A14).
To confirm again, check the policy branch, copy the full ID of its newest commit, put it in the setting, and replace the
container (docker rm -f arbiter, then A6 step 2). Each ID confirms once, for good. To confirm a commit that was
confirmed before, push a new commit on top of it through a reviewed pull request, and confirm that one. Leave the
setting in the command: a used ID is ignored, and the log says so once.
A file instead. Instead of ARBITER_POLICY_ACCEPT_COMMIT, you can set ARBITER_POLICY_ACCEPT_COMMIT_FILE (for
example /run/secrets/policy-accept-commit) to a file that holds the full ID and nothing else. Arbiter reads the file
at each check, so a later confirmation changes only the file, with no new container. Set one of the two, not both.
A7. Expose only the public routes
Section titled “A7. Expose only the public routes”-
Configure your reverse proxy to forward only these routes to
127.0.0.1:3000:POST /webhooks/github;GET /health;GET /health/status, never cached;- optionally
GET /audit/<org>/<repo>/<id>, so the check’s “Details” link works. It needs no login and is reachable by anyone with the link, which includes a random id. - if you use trusted scans,
POST /api/trusted-check-results/*from any source: GitHub Actions posts the scan results there. Arbiter checks each post’s GitHub identity token before reading it. The route also needsARBITER_OIDC_AUDIENCEset on the server, to the audience your trusted workflows use (a value unique to your deployment, not a secret). Without it, the route answers503, every trusted result is refused, and Arbiter’s startup log says that trusted results are off. To set it, add-e ARBITER_OIDC_AUDIENCE=<your audience>to A6 step 2’s command, then replace the container (docker rm -f arbiter, then A6 step 2).
-
From a machine outside your network, run:
Terminal window curl -s -o /dev/null -w '%{http_code}\n' https://<your public host>/api/decisions/00000000-0000-4000-8000-000000000000
Expected: step 2 returns your proxy’s refusal (typically 404 or 403), not 401. A 401 comes from Arbiter
itself, so the proxy forwarded a route it should not have. The same holds for /api/evidence/…: the evidence routes
are reached only from the host. The admin API is not on port 3000 at all: it is reached only with the admin
command inside the container (A9, A10).
A8. Require Arbiter’s checks
Section titled “A8. Require Arbiter’s checks”GitHub lets you require a check from your App only after the App has reported that check in the repository
recently. For Arbiter / authorize, that takes one pilot pull request (step 1). For Arbiter / policy-review, you
need no pull request: until a rule requires it, Arbiter posts a failed “Setup marker” run of it on the policy
repository’s newest commit (A3, step 8).
-
Let
Arbiter / authorizerun once: in each pilot repository, open a pull request with any small change. Wait untilArbiter / authorizehas completed on each. In advisory mode, the pilot pull requests are not blocked. The policy repository is different: until step 3 is done, Arbiter does not trust it and denies every evaluation in every mode (A3), thoughArbiter / authorizestill completes, so you can select it in step 2. -
On each pilot repository’s default branch, in a ruleset: best an organization ruleset (Org → Settings → Rules → Rulesets), or a repository ruleset (the repository’s Settings → Rules → Rulesets) if your plan offers no organization rulesets:
- Create a New branch ruleset, give it a name, and set Enforcement status: Active. Leave the Bypass list empty, or note who is on it (A9 reports them).
- Under Target branches, choose Add target → Include default branch (for an organization ruleset, also choose the pilot repositories).
- Turn on Require status checks to pass, and under it Require branches to be up to date before merging.
- Add
Arbiter / authorizewith your Arbiter App as its source, not “any source”, then Create.
Use a ruleset, not classic branch protection: Arbiter sees direct pushes only on a branch an active ruleset covers (A9b’s
R5).Every branch that pull requests target needs this rule, not only the default branch. For each pull request in a repository that has a policy, Arbiter reads the rules of its target branch. Unless that branch requires
Arbiter / authorizefrom your App with Require branches to be up to date before merging on, in a ruleset or in classic protection, Arbiter denies the pull request withBASE_NOT_KEPT_CURRENT. It does this in every mode, advisory included, and the check fails. Arbiter denies before it looks at the change, so a pull request that would pass is denied too.Both must be on the same rule. The status-check rule that lists
Arbiter / authorizefrom your App must itself have Require branches to be up to date before merging on. The setting on a different ruleset does not count, and neither does a classic check with no source App.Arbiter / authorizestill completes, so you can select it. The check says which of three cases applies: “target branch does not keep pull requests up to date” (the rule is missing), “target branch rules could not be read” (for example, the App lacks Administration: read), or “target branch unknown”. To cover other branches, add them under Target branches (for example Include all branches, or Include by pattern), or protect each one with a classic rule. A9b’sR7lists the branches that still lack it.Why Arbiter asks for this: with the setting on, GitHub does not merge a pull request whose branch is behind its target. Bringing the branch up to date is a new push, which Arbiter decides again, so a decision made before the target branch moved cannot be merged. Actors on the rule’s bypass list can still merge past it; A9 reports them (
R4) and Arbiter records their merges.A limit: Arbiter reads the rule when it decides. If an administrator turns Require branches to be up to date before merging off after a pull request was allowed, GitHub stops holding that pull request when it falls behind its target. The allowed decision can then be merged until the pull request’s next event: a push, a review submitted or dismissed, a required check finishing, a reopen, or a change of its target branch. Arbiter reads the rule again at that event and denies. Do not turn the setting off while pull requests are open.
-
On the policy repository’s default branch, in the ruleset from A3, add the required check
Arbiter / policy-review, again with your Arbiter App as its source, and turn on Require branches to be up to date before merging in that same rule (A3). GitHub offers it once Arbiter has been running for about a minute; the run it offers is the marker, not a review. Until you add it, the policy repository stays untrusted (A3). A3 shows a second route, through the rulesets API.
Expected: the pilot pull requests from step 1 now show Arbiter / authorize as Required, and the policy
repository’s next pull request shows Arbiter / policy-review as Required. You can close the pilot pull requests
without merging. A9b’s R7 is OK for each branch pull requests target.
A9. Confirm GitHub really requires the check
Section titled “A9. Confirm GitHub really requires the check”Run from the host, for each pilot repository:
docker exec arbiter /usr/local/bin/docker-entrypoint.sh admin /api/admin/repos/<org>/<repo>/postureThe command reads the admin token from the container’s secret file, so it never appears in a command line.
Expected: "overall": "pass". Or "overall": "warn", with only R4, if you accept the bypass actors it
reports. What each result means:
| Result | Meaning |
|---|---|
overall: pass |
Arbiter / authorize is required on the default branch and bound to your Arbiter App, matching the repository’s mode |
overall: warn |
Nothing failed, but a source (rulesets or classic protection) was not readable, or a rule is a warning; read rules and sources |
R1 ARBITER_NOT_REQUIRED |
Neither rulesets nor classic protection require the check |
R2 ARBITER_APP_MISMATCH, ARBITER_APP_NOT_BOUND or LEGACY_CONTEXTS_ONLY |
The check is required but not bound to your Arbiter App |
R6 ENFORCE_MODE_DRIFT |
The repository is in enforce, but GitHub does not require the App-bound check |
R4 BYPASS_NONE |
Nobody can bypass the required check |
R4 BYPASS_ALLOWED |
Some actors can bypass the check. The result counts them per ruleset; open the ruleset’s Bypass list in GitHub to see who they are |
R4 BYPASS_NOT_READ |
Arbiter could not tell who can bypass the check. This is never reported as “nobody” |
ARBITER_NOT_INSTALLED |
The App is not installed on the repository |
GITHUB_PERMISSION_DENIED |
The App lacks a permission it needs, usually Administration: read |
GITHUB_API_UNAVAILABLE |
GitHub failed, rate-limited, or returned something malformed; try again |
R1 and R2 passing means the check is required and App-bound, not that nobody can bypass it: R4 says that. After you grant Administration read, restart Arbiter or wait up to 55 minutes before re-checking.
A9b. Check the whole GitHub setup
Section titled “A9b. Check the whole GitHub setup”One command checks the GitHub settings Arbiter depends on, and lists every gap it finds. Run it from the host after A8, and again after any change to your GitHub settings or your policy repository:
docker exec arbiter /usr/local/bin/docker-entrypoint.sh setup-checkIt uses the server’s own settings: the App ID and key, ARBITER_GITHUB_INSTALLATION_ID and ARBITER_POLICY_REPO.
For P4, it also opens the server’s database, read-only. It needs no Arbiter admin token, and it changes nothing on
GitHub. For W3 and W4, it also reads secret names with a
GitHub token of your own, given on standard input (A9c). On disk, it writes only a temporary copy of each policy,
in a folder it deletes before it exits. If the command is killed first, the folder stays in the container’s temporary
directory until the container is replaced.
--repo <org>/<repo>checks only that repository; repeat it to name more. Without it, the command checks every repository that has apolicies/<org>/<repo>/policy.yamlin the policy repo.--repodoes not skip the policy repo’s own checks.--jsonprints one JSON object, with"schema": "setup-check/v1"and aresultslist. Each result hasid,outcome(GAP,NOTEorOK),subject(what it is about: the organization, a repository, or a repository and a team),phrase, andcountwhen the check counts something.--admin-token-stdinreads a GitHub token of your own from standard input, forW3andW4; add-iafterdocker exec(A9c).
Each result line is GAP, NOTE or OK, then a check id, what it is about, and a fixed phrase, after a count when
the check counts something. Under each GAP is what to change. The last line counts the gaps and notes. Results hold
names, counts, fixed phrases and the engine’s rule codes only: no person’s login, no token, no error text, no keyring content,
and no policy content other than team names.
Expected: no GAP line, and exit code 0.
| Exit code | Meaning |
|---|---|
0 |
No gap |
1 |
At least one gap |
2 |
The command could not run: an argument it refuses, a missing or malformed setting, an App key that can’t sign, or an unexpected failure. The message says what is wrong, never a setting’s value |
What each gap means:
| Check | Gap when | Fix |
|---|---|---|
G1 |
The App or its installation can’t be read, the installation is suspended, or it is not on an organization | A4 to A6 |
P1 |
The policy repo is not in the configured installation | A5 |
P2-unread, P2-last-push, P2-bypass, P2-force-push, P2-policy-review, P2-up-to-date, P2-merge-queue, P2-deletion, P2-code-owner |
The policy repo’s protection could not be read, or is missing one of A3’s rules. These are the gaps in A3’s table | A3 |
P2-min-approvals |
The policy repository’s rule requires fewer approvals than the policy’s policy_repository.min_approvals. Fix text: “require at least policy_repository.min_approvals approvals, with approval of the most recent push, on the policy repository’s rule, or lower the number in the policy through a reviewed pull request (Administrator manual A3). Once this gap is gone, run setup-check again: a missing code-owner review is reported only then” |
A3 |
P2-min-unread |
The policy’s minimum approval count could not be read. Fix text: “a policy file’s policy_repository section is not valid, or the policy files could not be read (a GitHub read failed, timed out or was incomplete). If a read failed, run again. If a section is not valid, fix every invalid section in one reviewed pull request, without break-glass: its Arbiter / policy-review check names the files and how many writers must approve after the last push; if that is more than the policy repository’s rule requires, raise the rule (Administrator manual A3). If the check can’t read the policy at the policy branch’s tip, or the policy history already has a finding, use the break-glass route (Administrator manual A17b), then confirm the commit (Administrator manual A6). Once this gap is gone, run setup-check again: a missing code-owner review is reported only then” | A3 |
P2-other |
GitHub’s answer did not confirm the policy repo’s protection for another reason | A3 |
P4-waiting |
The policy repo’s newest commit waits for your confirmation: no commit is confirmed yet. The line shows the commit’s full ID | A6 |
P4-unreviewed |
Policy commits did not come from a reviewed pull request, as a squash or merge commit. The line lists their full IDs, and counts them | Check each commit. Merge policy changes only through reviewed pull requests (A3). Then confirm the newest commit (A6) |
P4-history |
The policy branch was reset, rewritten or switched, or has more than 50 commits since the confirmed one. The line shows the tip’s full ID | Check the branch, then confirm its newest commit (A6) |
P4-unread |
The policy repo’s history could not be read | Give the App Contents, Pull requests and Checks: read, and Metadata: read, on the policy repo (A4), then run again |
P3-unread, P3-none |
Without --repo: the policy repo’s file list can’t be read in full, or no repository has a policy.yaml there, so nothing would be checked |
A2 |
R0 |
With --repo: the repository has no policy.yaml in the policy repo |
A2 |
R-not-installed, R-denied, R-unavailable |
The repository’s posture (A9) could not be checked: the App is not installed on it in the configured installation, the App lacks a permission, or GitHub failed | A5, A9 |
R1 |
Arbiter / authorize is not required on the default branch |
A8 |
R2 |
The required check is bound to a different App, or to none | A8 |
R2-legacy |
The check is required only through classic protection’s legacy contexts, so it is not bound to your Arbiter App | A8 |
R4 |
Arbiter could not tell who can bypass the check | A9 |
R5 |
No active ruleset covers the default branch, so Arbiter does not see direct pushes there | A8 |
R7 |
Read for the default branch and for every branch an open pull request targets. Arbiter / authorize is not required from your App with “Require branches to be up to date before merging” on the same rule, on that branch (the line says every pull request into it that Arbiter decides is denied, in every rollout mode, until it is). Also a gap: “could not be read: R7”, and R-denied when GitHub refuses the read (give the App Administration: read on the repository, A5); “target branches not all checked: more target branches than are checked”, with a count of the branches left out (20 are checked); and “target branches not all checked: more than 1,000 open pull requests” (10 pages of 100 are read) |
In a ruleset or classic protection, require Arbiter / authorize with your Arbiter App as its source and turn on Require branches to be up to date before merging, on every branch pull requests target (A8). For the “not all checked” lines, close or retarget pull requests until they are under the limits, then run again |
R8 |
A branch has a merge queue (“a merge queue is on: Arbiter does not decide merge-queue commits yet, so the queue waits for ever”). Also a gap: “merge queues not checked on every target branch”, when a branch’s rules were not read or the R7 limits above were hit |
Turn off the merge queue on that branch. For “not checked”, fix the R7 gaps, or bring the open pull requests and their target branches under the limits R7 names, then run again (A8) |
L |
The policy does not load: it could not be read, there is no policy.yaml, it is not valid YAML, it lacks provenance.artifact_path or an evidence_requirements list, it breaks the keyring rules, or the engine rejects it (the line names the rule, for example LOAD-009) |
The Policy-author manual |
T1 |
A team the policy names is in another organization, where it counts nobody; GitHub doesn’t know it; it can’t be read; or its name is not <org>/<team-slug> |
Create the team, or correct its name in the policy. GitHub also answers “not found” for a secret team the App can’t see, so check that the App has the organization permission Members: read |
T2 |
The team has fewer members than the highest min_approvals the policy asks of it, or its members can’t be read |
Add members, or lower min_approvals |
T3 |
An entry in approver_accounts can’t be read, no GitHub account has its id (“no GitHub account has this id”), its id is not a user account, or its listed login is not the account’s current login (“renamed?”). The starter’s placeholder ids give the first |
Correct the entry: the id from gh api users/<login> --jq .id and the current login. A change to the list needs 2 approvals from accounts already on it |
T4 |
A team the policy names has fewer listed accounts than the approvals its rules can ask of it: the highest min_approvals, or the agent minimum if that is higher. Accounts are matched by id, so a renamed login still counts |
Add the listed accounts to the team, or list more of its members in approver_accounts |
T5 |
Never a gap: it is a note (below) | Keep at least 3 entries in approver_accounts, so one person away cannot block a change to the list (A17b) |
W0 to W4 |
A GitHub Actions setting lets a branch’s first workflow run reach more than it should: a writing default token, outside contributors’ runs without approval, secrets any workflow can use, or a long-lived cloud key; or the setting can’t be read | A9c |
How the checks fail and depend on each other:
- Anything unreadable is a gap. A read that fails or throws, and any check that takes more than 20 seconds, is
the gap “could not be read” with the check’s id, never
OK. - If
G1fails, nothing else runs. Each other check is then listed as the gapnot checked: G1; without--repo, that is only the policy repo’s checks, because the repository list is read from GitHub. P2-code-ownerwaits for the count. WhileP2-min-approvalsorP2-min-unreadis a gap, the command does not reportP2-code-owner: its fix would point at a setting that may already be on until the count is right. Fix the count, then runsetup-checkagain: a missing code-owner review is reported only then.- Any other check that needs a failed check prints nothing, because that check is already a gap. For example,
if
P1fails nothing else runs;T1andT2run only when the repository’s policy loads (L);T2runs only for a teamT1found;T3toT5run only when that policy hasapprover_accounts, andT4only for a team whose membersT2could read; and R1 to R4 run only when the repository’s policy files could be read.R7andR8read the branches with the App’s own token, and run whenever the App is installed on the repository. - R1 and R2 failures are gaps in every mode,
visibility-onlyincluded, because they matter as soon as the repository moves toenforce. A legacy-only requirement (R2-legacy) is a gap inenforceandadvisory, and a note invisibility-only. - Bypass is a note, not a gap. The command can exit
0while some actors can bypass the check, or while administrators can bypass classic branch protection. Read theR4notes, and each ruleset’s Bypass list in GitHub.
The notes:
R4, for each repository whose check is required: how many bypass actors the rulesets that require the check have,0included.R4-admins: administrators can bypass the classic branch protection that requires the check.P2, when some policy folders have nopolicy_repositorysection: “policy folders without policy_repository.min_approvals, so each counts as 1”, then up to 10 folders as<org>/<repo>, then “and N more”, with their count. It is information, not a gap: each such folder counts as 1 toward the highest value.R2-legacy, invisibility-onlymode.L, inadvisoryorvisibility-onlymode: Arbiter blocks nothing about a change in that repository, but it still denies when it cannot confirm that the policy repository is protected (A3), or that the target branch requires this App’sArbiter / authorizecheck with up-to-date branches (A8).T2: how many maintainers the team has. They can change who is in it.T5: for each team, how many of its members are not on the approver list (their approvals do not count); and how many accounts the list holds, with the warning “if any one of them is unavailable, no change to this list can be approved; see the break-glass route” when it holds fewer than 3.W0, when Actions is off, and thenW1toW4; andW4when no known long-lived key name is found (A9c).
What it does not check:
- the App’s permissions, other than through a read that fails;
- who is in a team: it shows only counts;
- whether a team can meet
min_approvalsonce the pull request’s author and pushers are left out:T2counts every member, members of child teams included; - rulesets in evaluate mode, which GitHub does not return;
- anything outside GitHub, such as the server’s own health: that is
/health/status(A15).
OK means only that GitHub showed the setting when the command ran. A later change is not seen until the next run.
The command reads the policy repo more than once, so a push to it during a run can make two checks read different
commits.
A9c. Fix the GitHub Actions settings
Section titled “A9c. Fix the GitHub Actions settings”setup-check (A9b) runs five checks, W0 to W4, on each repository’s GitHub Actions settings; one check can print
more than one line. They matter because a branch’s own first workflow run starts as soon as the branch is pushed,
before Arbiter’s check on its pull
request. These settings limit what that run can reach: the default token, approval for outside contributors’ runs,
secrets, and long-lived cloud keys.
Each fix is a setting on GitHub, under the repository’s Settings → Actions → General or Settings → Environments. If a setting can’t be changed there, your organization or enterprise sets it: change it in the organization’s settings, or ask its owner.
Give it your own GitHub token
Section titled “Give it your own GitHub token”W3’s secret part and W4 read secret names, and the App can’t read them: it does not ask for Secrets or
Environments permissions (A4). To check them, give setup-check a GitHub token of your own on standard input. Use, in
this order:
-
A fine-grained personal access token (recommended): resource owner your organization; repository access only the repositories Arbiter governs; repository permissions Secrets: Read-only and Environments: Read-only; and a short expiry. Its account must be able to see the repositories’ secrets. Run, then paste the token when the shell waits, and press Enter:
Terminal window read -rs ARBITER_GH_TOKEN && printf '%s\n' "$ARBITER_GH_TOKEN" | docker exec -i arbiter /usr/local/bin/docker-entrypoint.sh setup-check --admin-token-stdin; unset ARBITER_GH_TOKENDelete the token on GitHub when you’re done.
-
Otherwise, your GitHub CLI sign-in:
Terminal window gh auth token | docker exec -i arbiter /usr/local/bin/docker-entrypoint.sh setup-check --admin-token-stdinThat token lasts until it is revoked, and carries all of your account’s rights.
What setup-check does with the token:
- it reads it once from standard input, never from an argument, a setting or a file, so it is not in the process list or your shell history;
- it uses it only to read three lists at
https://api.github.com: the repository’s secrets, the organization secrets the repository can use, and each environment’s secrets; every other read uses the App; - it keeps it in memory for that run only, and never prints, logs, writes or sends it anywhere else. It is not
ARBITER_ADMIN_TOKEN.
GitHub’s API returns secret names, never their values. setup-check holds the names in memory for that run only, uses
them only to count secrets and to match W4’s names, and never prints, logs or keeps one.
A line that is empty, longer than 255 characters or not printable ASCII exits 2 with “the admin token from standard
input is not a token”.
Without --admin-token-stdin, W3 still checks the environments with the App, and W3’s secret part and W4 are
the gaps W3-no-admin-token and W4-no-admin-token.
What each result means
Section titled “What each result means”| Check | OK or note |
Gap when | Fix |
|---|---|---|---|
W0 |
OK: Actions is on. Note: Actions is off, so no workflow runs; W1 to W4 are then each the note “not needed: Actions is off” |
Only when it can’t be read (below) | None needed |
W1 |
OK: the default GITHUB_TOKEN is read-only, and workflows can’t approve pull requests |
The default GITHUB_TOKEN can write, or workflows can approve pull requests |
Under Workflow permissions, choose the option that gives only read access to contents and packages, and clear Allow GitHub Actions to create and approve pull requests |
W2, public repository |
OK: every outside contributor’s workflow run needs approval |
Runs from some outside contributors start without approval | Under Approval for running fork pull request workflows from contributors, choose Require approval for all external contributors |
W2, private or internal repository |
OK: fork pull requests don’t run workflows, or their runs need approval and get no write token and no secrets |
Fork pull request runs can start without approval, or get a write token or secrets | Under Fork pull request workflows, clear Run workflows from fork pull requests; or keep it, select Require approval for fork pull request workflows, and clear Send write tokens to workflows from pull requests and Send secrets to workflows from pull requests |
W2 |
The repository’s visibility is missing, unknown or contradictory | Run again | |
W3 |
OK: no repository or organization secret, and every environment holding a secret needs a reviewer who can’t approve their own run |
Repository or organization secrets are available to every workflow, a pushed branch’s included (the count is how many); or environments hold secrets without such a reviewer (the count is how many environments) | Move each secret into an environment, under Settings → Environments, with Required reviewers set and Prevent self-review selected; or remove the secret if no workflow needs it. Give each environment that holds a secret both settings |
W4 |
Never OK. Note: no known long-lived key name was found |
Secret names exactly match a known long-lived cloud key name (the count is how many) | Replace the long-lived keys with OpenID Connect (OIDC), which gives each run a short-lived credential from your cloud provider, then delete the secrets |
Only a required reviewer with Prevent self-review makes an environment safe for W3. A deployment branch rule
such as “protected branches only” is not enough on its own. On a private or internal repository, required reviewers
need GitHub Enterprise (on GitHub Free, Pro and Team they are available only for public repositories), so without
Enterprise a secret there stays a W3 gap: remove it if no workflow needs it, or accept the gap. An administrator can
still bypass an environment’s rules
unless Allow administrators to bypass configured protection rules is cleared, and can change the environment in
any case.
W1’s OK does not stop a workflow file from setting permissions: to write: no repository setting forbids that.
Review changes to .github/workflows/ before they merge.
W4 matches these names exactly, ignoring case: AWS_SECRET_ACCESS_KEY, AWS_ACCESS_KEY_ID, AWS_SESSION_TOKEN,
GOOGLE_CREDENTIALS, GOOGLE_APPLICATION_CREDENTIALS, GCP_SA_KEY, GCP_CREDENTIALS, AZURE_CREDENTIALS,
ARM_CLIENT_SECRET and AZURE_CLIENT_SECRET. It is not a scan: a key under another name is missed, and Arbiter can’t
confirm that the repository uses OIDC, which is why W4 is never OK. To add your own names, list them in the
repository’s policy:
github_settings: long_lived_key_names: ["ACME_DEPLOY_KEY", "TF_VAR_aws_secret"]The list holds 1 to 50 secret names: letters, digits and _, not starting with a digit or GITHUB_, at most 100
characters, and no name twice, ignoring case. A malformed list stops the whole policy loading (L, rule
LOAD-044), so that repository’s checks
fail closed until it is fixed. Only setup-check reads the list: it changes no allow or deny. When the policy doesn’t
load, W4 uses the built-in names only and says so.
When a check can’t be completed, it is a gap, never OK:
| Gap | Meaning | Fix |
|---|---|---|
W0-denied to W4-denied |
The App can’t read the setting | Give the App Administration: read and Actions: read on the repository (A4), then run again |
W0-unavailable to W4-unavailable |
GitHub failed, was rate-limited or answered something unexpected | Run again |
W3-no-admin-token, W4-no-admin-token |
No token was given on standard input | Run again with --admin-token-stdin (above) |
W3-token-denied, W4-token-denied |
The token’s account can’t see the repository’s secrets | Use a token whose account can read the repository’s secrets and environments |
W3-too-many |
The repository has more than 20 environments | Check its environments by hand |
W4-too-many |
More than 20 environments, or more than 100 names in one list | Check its secret names by hand |
A10. Check the effective mode
Section titled “A10. Check the effective mode”After every start and every restore, run this from the host for each pilot repository:
docker exec arbiter /usr/local/bin/docker-entrypoint.sh admin /api/admin/repos/<org>/<repo>/rollout-modeType <org> and <repo> exactly as the folder under policies/ spells them, capitals included.
Expected: the answer is JSON with "rollout_mode": "advisory", until you choose blocking (A11). A missing,
malformed or unreadable rollout-mode.yaml reads as enforce, because Arbiter fails closed. So does a name typed in
another letter case, because no file is found there: if you see enforce where you expect advisory, check the
spelling first.
In advisory mode, a policy violation shows as a neutral Arbiter / authorize check, and the merge is allowed. Two denials apply in every mode: an unprotected policy repository (A3), and a target branch that does not require Arbiter / authorize from your App with up-to-date branches (A8).
A11. Switch a repository to blocking
Section titled “A11. Switch a repository to blocking”- Open a pull request in the policy repository that changes
policies/<org>/<repo>/rollout-mode.yamltorollout_mode: enforce. - Have someone other than the author approve it, then merge.
- Re-run A10 for that repository.
Expected: the pull request’s Arbiter / policy-review lists the change as rollout mode advisory → enforce.
It is not flagged, because it tightens protection; going back to advisory is flagged. A10 then reads enforce. A
new pull request that violates the policy gets a failing (red) Arbiter / authorize check and cannot merge.
Going back to advisory is the same procedure, and is how you turn blocking off normally.
A12. Back up
Section titled “A12. Back up”-
Take a backup while Arbiter runs:
Terminal window docker exec arbiter node /opt/arbiter/app/dist/tools/backup.js /data/backups/$(date +%Y-%m-%dT%H%M%S)Each backup needs a new folder: the backup refuses a folder that already exists. The time in the name keeps two backups on one day apart.
-
Copy the backup folder off the host.
Expected: arbiter-data/backups/<date and time>/ holds the database and manifest.json, with files at mode 0600.
Policy, modes and the keyring live in the policy repository, so Git is their backup. The database also holds the policy
commit you confirmed (A6) and every confirmation ID you have used. If you lose it, you confirm a commit again.
A13. Upgrade
Section titled “A13. Upgrade”After you upgrade to 0.1.3, add an approver_accounts list to every policy that has an approval rule (policy-author
manual, P16), through one reviewed pull request in the policy
repository. Do not add it before the upgrade, and edit no policy file that has no list before then, not even to add a
policy_repository section. Release 0.1.2 ignores both, and if 0.1.3 starts from an accepted commit that still precedes
such a merge, 0.1.3 can treat it as a repair that 0.1.2 never marked and report a finding that needs break glass. If A9b
shows P4-unreviewed, or the Arbiter / policy-review history line reports a finding, after such a merge, use break
glass (A17b) before the list pull request. Until the list merges, a policy with an approval rule and no list does not load
(LOAD-050), and the evaluations of the pull requests it governs are denied (in enforce mode the required check blocks
their merges); a missing list alone denies only the repositories that file governs. The pull request is a repair: it can pass Arbiter / policy-review once enough writers who did not write, commit or push it
approve after its last push (P17), when nothing else in that file is wrong. A mistake in the list also stops it loading
(one entry, a repeated id, a bad person or an extra key), so check each entry by hand against every rule in
P16 first. An invalid policy_repository section is wider: it
makes the repository-wide minimum unreadable, so it can deny other governed repositories (POLICY_REPO_UNPROTECTED) and
other policy pull requests that do not repair it. If P2-min-unread or LOAD-051 appears, run A9b again first in case a
GitHub read failed; if a section is invalid, fix every invalid section, and any list a touched policy needs, in the same
pull request (P16, P17). A file that is not valid YAML or fails any other check, or a history that already has a finding, still
needs break glass (A17b). Run
A9b afterwards and look for no L, T3 or T4 gap (T3 to T5 are skipped when the policy does not load, and T5 is
a reminder, never a gap).
Also before you upgrade to 0.1.3, turn on “Require branches to be up to date before merging” on the policy repository’s rule that
requires Arbiter / policy-review, and use no merge queue on its default branch (A3). Release 0.1.2 passes either way, so
doing it early is safe. Without it, after the upgrade every pull request is denied (POLICY_REPO_UNPROTECTED), and A9b shows
P2-up-to-date (the box is off) or P2-merge-queue (a ruleset has a merge queue); turning the box on, or removing the
queue, then fixes it, with no pull request and no break glass. For these conditions A9b shows only the first that applies (check missing, setting off, ruleset queue) and reports other
protection gaps beside it: run it again after each fix. On every start,
in the background, Arbiter re-checks the open pull requests into the policy repository’s default branch, up to 300; a
pull request can show a pending placeholder, and keeps its earlier result until the new check starts. After upgrading, wait
for a fresh passing Arbiter / policy-review on each one’s current head before merging it. If no fresh check starts (an
older result can remain on a pull request beyond those 300, or when the re-check could not post), push to it to request
one, or close it.
Also match GitHub’s approval count to the policy’s before you upgrade. Arbiter takes the highest policy_repository.min_approvals
across the policy files (P17). If a valid value above 1 is already in a policy, set the policy repository’s required
approvals to at least that number before you upgrade (A3); otherwise every pull request is denied after the upgrade. A section
you add after the upgrade needs the rule raised before that pull request merges.
-
Back up (A12), and note the row counts and
schema_versionfrom diagnostics (A18). A14 needs both. -
Pull the new release by its digest (A1 steps 1 to 3), then replace the container:
Terminal window docker rm -f arbiterThen start it again with the new release’s digest (A6 step 2).
-
Check
/healthand the mode (A10), and compare the row counts with step 1. Check that/health/statusanswers200about a minute after start (A15).
If you upgrade from 0.1.1 or earlier, the data folder holds no confirmed policy commit, so before step 2 do A6’s
lookup, and add -e ARBITER_POLICY_ACCEPT_COMMIT=<the full commit ID> to A6 step 2’s command. Until you do, Arbiter
denies every pull request and /health/status answers 503 with policy_provenance failed. A later upgrade keeps the
confirmed commit in the data folder and needs nothing.
Expected: the row counts did not drop. A drop, or a log line created a new database, means the data folder was
not mounted. Stop, and fix the mount before going on.
A14. Roll back
Section titled “A14. Roll back”-
Compare
schema_versionin diagnostics (A18) before and after the upgrade. -
If it did not change: no restore is needed, and no data is lost. Remove the running container:
Terminal window docker rm -f arbiterAfterwards, run A6 step 2 with the earlier release’s digest.
-
If it changed: stop Arbiter, restore the pre-upgrade backup with the old release, then start the old release:
Terminal window docker rm -f arbiterdocker run --rm --user "$(id -u):$(id -g)" -v "$PWD/arbiter-data:/data" \ghcr.io/arbitercontrol/arbiter-control-plane@<old release digest> restore /data/backups/<date and time>Afterwards, run A6 step 2 with the earlier release’s digest.
Expected: Arbiter starts on the old release, and A10 shows the same modes. Restore refuses three cases:
- while Arbiter runs;
- a backup newer than the release you restore with;
- a damaged backup.
Decisions written after the backup are lost. Retarget records are kept, and so are merge events recorded since the
backup. A restore onto a readable database also keeps the policy commit you confirmed and the confirmation IDs already
used, so you do not confirm again. A restore onto a lost or empty data folder brings back only the backup’s: Arbiter then
checks the policy commits made since, and if policy_provenance is failed, you confirm again (A6) with an ID not used
before. A merge the catch-up sweep first meets after a restore may be recorded as bypassed even if it was allowed;
the restore output says which to review.
A15. Set up an uptime monitor
Section titled “A15. Set up an uptime monitor”Arbiter can’t tell you it has stopped, so an outside monitor watches it. A16 adds alerts from Arbiter itself.
- Point an uptime monitor you already use at
https://<your public host>/health/status. - Check every 1 to 5 minutes, and alert when it does not return
200twice in a row.
Expected: 200 with "status": "ok" while everything works. The other answers:
503with"status": "unhealthy": at least one part failed. The body names the part, never why;503with"status": "starting": Arbiter has just started and its first check is not finished;- no answer: Arbiter or your proxy is down.
The parts are database, github, policy_repo, stuck_checks, direct_push_poll and policy_provenance. The
reasons are in the log:
docker logs arbiter 2>&1 | grep '\[health\]'| Part | Fails when | Look at |
|---|---|---|
database |
The database can’t be read | The data mount and disk |
github |
GitHub refuses the App’s key, can’t be reached, or says the installation was removed or suspended | The App key, outbound access to api.github.com, and the installation in your organization’s settings |
policy_repo |
The policy repo can’t be read, or its default branch isn’t protected (every evaluation is then denied) | A3 |
stuck_checks |
A check has waited longer than the evidence wait plus 5 minutes (15 minutes by default) | The open pull request. A restart completes a stuck check as failure |
policy_provenance |
No policy commit is confirmed yet; a policy commit did not come from a reviewed merge; the policy branch’s history can’t be read; or no check has stored a good result for 15 minutes. The part is read from the last stored result, never from GitHub, and the background check refreshes it every 5 minutes | The policy commit in the log. A6 (confirm a commit), and P4 in A9b |
direct_push_poll |
For over an hour, Arbiter’s reads of GitHub’s rule suites (which find pushes that skipped pull requests) have failed for any one repository, or Arbiter could not list the repositories your policy repository governs | push poll failed for that repository, or listing governed repos failed, in the log; GitHub rate limits; the App’s Administration: read permission; that the policy repository can be read |
Arbiter re-checks every minute in the background, so the monitor’s requests never reach GitHub. ok does not test
webhook delivery from GitHub, so also look out for pull requests that get no Arbiter / authorize check at all.
A16. Turn on alerts
Section titled “A16. Turn on alerts”Optional, and recommended. Arbiter can post to an https webhook you choose, for example a Slack incoming webhook.
-
Write the webhook URL to a secret file, readable only by you. The URL is a secret: anyone who has it can post to your channel.
Terminal window read -rs ALERT_URL && (umask 077; printf '%s' "$ALERT_URL" > arbiter-secrets/alert-webhook-url); unset ALERT_URL -
Add this line to the
docker runcommand in A6 step 2, before the image name:Terminal window -e ARBITER_ALERT_WEBHOOK_URL_FILE=/run/secrets/alert-webhook-url \Don’t add it without the file: a
_FILEsetting whose file is missing stops Arbiter from starting. -
Replace the container:
docker rm -f arbiter, then A6 step 2. -
Send a test alert:
Terminal window docker exec arbiter /usr/local/bin/docker-entrypoint.sh alert-test
Expected: step 4 prints HTTP 200 (or another 2xx status), and the test alert arrives. It never prints the
URL. A URL that is not https:// stops Arbiter from starting, and names the setting, never its value.
What Arbiter sends:
- a merge alert when a pull request merges:
- without Arbiter’s allow (
bypassed); - when Arbiter could not confirm it was allowed (
unverified); - in advisory mode without an allow (
provisional_violation); - or when someone pushes straight to the default branch past its rules (
direct_push);
- without Arbiter’s allow (
- a health alert when a part in A15 fails or recovers and stays that way for two checks in a row. A failed first check after startup alerts at once. It names the part, never the reason.
Each alert is one JSON object with a plain text line, which Slack-style webhooks show as it is. Microsoft Teams and
PagerDuty need a small relay, or their own webhook transform. The uptime monitor (A15) is still needed: a stopped
Arbiter can’t alert about itself.
Direct pushes need a ruleset. Arbiter finds pushes that skipped pull requests through GitHub’s rule suites, which exist only where an active ruleset governs the default branch. Five minutes after start, list what is covered:
docker exec arbiter /usr/local/bin/docker-entrypoint.sh admin /api/admin/merge-eventsA repository with classic branch protection only, or only an evaluate-mode ruleset, is listed under
not_covered. A repository with a policy folder but no App installation is listed under not_installed.
A17. Break glass when Arbiter is down
Section titled “A17. Break glass when Arbiter is down”Use this only for a merge that can’t wait, in blocking mode, after docker restart arbiter has not brought Arbiter
back.
Before you ever need it: name the people who may break glass (organization owners, or repository admins for repository rulesets), and rehearse once on a test repository. Keep no standing bypass actor for Arbiter’s check.
- Note the time. Open the ruleset that requires
Arbiter / authorize(Settings → Rules → Rulesets; for classic branch protection, Settings → Branches). - Under Require status checks to pass, note the check’s source, then remove only
Arbiter / authorize. If it is the only required check, turn the rule off instead. Save changes. - Merge the urgent pull request. Its normal review rules still apply.
- Add
Arbiter / authorizeback with your Arbiter App as its source. Confirm the source before leaving the page, then Save changes, and note the time. - When Arbiter is back, re-run A9 for the repository, and open a test pull request to see the check run.
- Record every pull request merged in the window: who, when, and why. Have each reviewed after the fact. The
organization audit log (Settings → Audit log, filter
action:repository_ruleset, oraction:protected_branchfor classic protection) shows each edit. Only organization owners can see it.
Expected: step 5’s posture is pass again, and the test pull request gets an Arbiter / authorize check.
The removal lifts the check for every pull request the ruleset covers, so keep the window to minutes.
Arbiter records each merge made in the window as bypassed, comments on the pull request asking for the reason,
and sends an alert (A16). List them:
docker exec arbiter /usr/local/bin/docker-entrypoint.sh admin '/api/admin/merge-events?class=bypassed'GitHub does not resend a webhook that failed while Arbiter was down. Arbiter’s catch-up sweep finds those merges: it runs at startup and every hour, and looks back to the repository’s last sweep, or 24 hours on the first run.
A17b. Break glass when a policy change cannot get its approvals
Section titled “A17b. Break glass when a policy change cannot get its approvals”Use this only when a change to a policy’s approver_accounts cannot get the 2 approvals it needs from accounts already
on the list (policy-author manual, P16): for example, a list of 2 accounts when one person has left. It also fits
lowering the policy repository’s minimum approval count when too few eligible reviewers exist (P17), and a policy file
that Arbiter cannot read because it is not valid YAML, fails a check other than the two repairable ones, or sits in a policy
history that already has a finding (A6). A bad policy_repository section or invalid YAML in one repository’s file gives every
other governed repository POLICY_REPO_UNPROTECTED, and, once protection, history and the target branch’s check settings pass, that repository’s own pull requests get
POLICY_UNAVAILABLE for a section the loader rejects (neutral in advisory mode), or HANDLER_ERROR (“Internal error reading
policy”) when the YAML cannot be parsed. A file that fails only on approver_accounts denies only that repository’s pull requests
(POLICY_UNAVAILABLE, neutral in advisory mode). A bad policy_repository section, or a missing or malformed list, is
repaired by a reviewed pull request (A3, P16, P17) and needs no break glass; for invalid YAML or any other failure, a pull
request that fixes the file cannot pass policy review. Try the ordinary way first: another listed person opens the change, and the people the check asks for, who did not write or push it,
approve.
Before you ever need it: name the people who may do this (organization owners, or admins of the policy repository),
and keep at least 3 entries on each list, which T5 of A9b reminds you of. The route turns off the review that protects
every policy, and while protection is off every pull request in every governed repository is denied: do it in a quiet
window.
- Note the time. Open the policy repository’s ruleset (Settings → Rules → Rulesets), and set its Enforcement status to Disabled. For classic branch protection, first write down every setting of the rule (A3 lists them), then remove it (Settings → Branches).
- Fix the list or the unreadable file, or lower
policy_repository.min_approvals(policy-author manual, P17): push the correctedpolicy.yamlto the default branch, or merge a pull request that holds it. TheArbiter / policy-reviewcheck fails such a pull request, and GitHub lets you merge it while protection is off. - Turn protection back on at once: set the ruleset to Active again, or recreate the classic rule with the settings you wrote down (A3), then run A9b and look for no
P2gap. - Confirm the new policy commit: copy the full ID of the policy branch’s newest commit, put it in
ARBITER_POLICY_ACCEPT_COMMIT, and replace the container (A6). - Record who, when and why. The organization audit log (Settings → Audit log, filter
action:repository_ruleset, oraction:protected_branchfor classic protection) shows each edit. Only organization owners can see it.
What Arbiter does meanwhile:
- While protection is off, no pull request is allowed, whatever its repository’s rollout mode: each evaluation ends in
POLICY_REPO_UNPROTECTED. Arbiter reads the protection again for each evaluation, so this starts with the next pull request evaluated and ends with the first one after step 3. - The new commit did not come from a reviewed merge, so Arbiter does not trust it. It sends its
direct_pushalert for the commit (A16, once, if alerts are on), andP4-unreviewedof A9b lists it. Until you confirm the commit (step 4), Arbiter uses no policy: each evaluation ends inPOLICY_REPO_UNPROTECTEDin every mode, and the check says “the policy repo’s history is not confirmed” (A6).
Expected: after step 4, /health/status reports policy_provenance healthy again, A9b shows no P2 or P4 gap,
and a test pull request is evaluated on the new policy. Keep the window to minutes: every governed repository is
denied while it lasts.
A18. Send diagnostics
Section titled “A18. Send diagnostics”-
Write the bundle:
Terminal window docker exec arbiter node /opt/arbiter/app/dist/tools/diagnostics.js > arbiter-diagnostics.json -
Read it before sending it to us.
Expected: the file holds:
- the app, Node and schema versions;
- which settings are set, by name;
/health;- row counts;
- the last 50 decisions’ ids, times, results, reason codes and modes;
- merge-event counts by class, and how many alerts are unsent.
It holds no secrets, no organization or repository names, no pull request titles and no file names.
A19. Export decisions for an audit
Section titled “A19. Export decisions for an audit”Export the decision history, or part of it, as JSON or CSV, to hand to an auditor.
-
Run the export from the host.
formatis required,jsonorcsv(see “Which format” below), and the filters are optional:Terminal window docker exec arbiter /usr/local/bin/docker-entrypoint.sh admin '/api/admin/decisions/export?format=csv&from=2026-10-01' > decisions.csvecho $? -
Check the exit code:
0means the file is complete.1means it is not: the error is on standard error, and the file is cut short, or empty if Arbiter refused the request. -
Check the file’s last line:
- a complete CSV file ends with the whole line
# end of export: <n> rows; - a complete JSON file ends with
"export_end":{"count":<n>,"complete":true}}.
A file without its whole last line is incomplete. The CSV end line is ordinary text, so a CSV file cut off right after a stored comment that itself contains such a line could look complete. The JSON end line cannot be faked by stored text, so use JSON when the file is evidence.
- a complete CSV file ends with the whole line
Expected: step 1’s echo $? prints 0, and the file ends with its end line. An export stops after 5 minutes; the file is
then incomplete and the command exits 1, so narrow the filters and run it again.
Filters are all optional, and they combine:
organdrepo;decision:allow,denyorescalate;from(inclusive) andto(exclusive), asYYYY-MM-DDorYYYY-MM-DDTHH:MM:SSZ, in UTC. The time is when the record was written, just after the evaluation;author: the pull request author’s login, in any case. Records written before the evaluation ran have no author, so this filter leaves them out;override:provisional_allow: advisory mode let through what blocking mode would deny;bypassed: the decision a merge around Arbiter was judged on. It covers only merges confirmed as bypassed. Merges reported asunverified, and bypassed merges with no decision, are listed by the merge-events command in A16, not in the export. A merge’s class can change later, so two exports on different days can differ;
id=<decision id>: one decision.
Which format:
- JSON is the record of evidence. Each record is the stored row, with values exactly as stored, and its end line proves the file is complete.
- CSV is for reading in a spreadsheet:
- lines starting
#are comments (for examplepandas.read_csv(path, comment='#')); - an empty unquoted field is empty in the record, and
""is an empty string; - a
'is added before any cell starting with=,+,-,@, a tab or a carriage return, so a spreadsheet does not run it as a formula.
- lines starting
What the file is:
- It is not tamper-evident, and it says so itself.
- It is your data: author logins, file paths and comment text. Without
organdrepo, it holds every decision on this server. Arbiter keeps no copy of the export, but the file stays wherever you write it, so keep it as you keep the records themselves.
A20. Delete everything
Section titled “A20. Delete everything”- Stop Arbiter:
docker rm -f arbiter. - Delete the data folder (
arbiter-data/:arbiter.dband its-waland-shmfiles) and every backup folder, including copies taken off the host. - Delete the secrets folder (
arbiter-secrets/, which holds the App’s private key and the tokens) and Arbiter’s image (docker image rmwith the image you pulled in A1). - Uninstall the App (organization Settings → GitHub Apps → Installed GitHub Apps → Configure → Uninstall), then delete the App itself, which your organization owns (organization Settings → Developer settings → GitHub Apps → Edit → Advanced → Delete GitHub App).
- Tell us which of these you did. We keep no copy.
Expected: nothing of Arbiter’s remains on the host, and the App no longer appears under your organization’s installed GitHub Apps. Pull request comments and check runs stay in GitHub until you delete them there.
Arbiter has no automatic deletion yet: decision records are kept until you delete them.
Each procedure above is followed once on a test organization before each release.
Built from Arbiter 0.1.3 at commit 05d1dcb.