Learning center

Who should be on a ruleset's bypass list?

Put a small named team or a specific GitHub App on the bypass list, never a broad role. Give people "For pull requests only" so every exception leaves a pull request behind, and keep "Always" for automation that pushes directly. Reserve exempt mode for short migrations, because an exempt actor's pushes are not recorded as bypasses at all.

What a bypass actor can do#

A ruleset's bypass list names who the rules do not stop. GitHub accepts repository admins, organization owners and enterprise owners; the maintain or write role and custom roles based on write; teams other than secret teams; GitHub Apps; and Dependabot. Granting bypass permissions

Each actor gets a mode. The REST API names three, always, pull_request and exempt, and its parameter description says "pull_request means that an actor can only bypass rules on pull requests," it "is not applicable for the DeployKey actor type" and "is only applicable to branch rulesets," and "When bypass_mode is exempt, rules will not be run for that actor and a bypass audit entry will not be created." Create a repository ruleset

In the UI, the default is Always allow. Choosing For pull requests only means, in the documentation's words, that "The selected actor is now required to open a pull request to make changes to a repository, creating a clear trail of their changes in the pull request and audit log. The actor can then choose to bypass any branch protections and merge that pull request." GitHub's changelog introduced exempt mode in September 2025 and contrasted it with a standard bypass, which it called "a 'break glass' action that requires an explicit actor bypass and generates prominent audit signals," while "an exemption silently skips enforcement." GitHub changelog, 10 September 2025

The three modes leave different evidence behind:

ModeCan push directlyNeeds a pull requestRecorded as a bypass
AlwaysYesNoYes
For pull requests onlyNoYesYes
ExemptYesNoNo, rules are not run

For push rulesets, the bypass list also covers forks: "the only users who can bypass this ruleset for any repository in this repository's entire fork network are the users who can bypass this ruleset in the root repository." Available rules for rulesets

A bypass list that grew#

Suppose a fictional repository, acme/payments-api, protects main with a ruleset that requires one approval and the test check. Over a year its bypass list grew to this:

{
  "name": "main: review and tests",
  "target": "branch",
  "enforcement": "active",
  "conditions": { "ref_name": { "include": ["~DEFAULT_BRANCH"], "exclude": [] } },
  "bypass_actors": [
    { "actor_id": 1234, "actor_type": "RepositoryRole", "bypass_mode": "always" },
    { "actor_id": 1100231, "actor_type": "Integration", "bypass_mode": "always" },
    { "actor_id": 1100877, "actor_type": "Integration", "bypass_mode": "exempt" }
  ],
  "rules": [
    {
      "type": "pull_request",
      "parameters": {
        "required_approving_review_count": 1,
        "dismiss_stale_reviews_on_push": true,
        "require_code_owner_review": false,
        "require_last_push_approval": false,
        "required_review_thread_resolution": false
      }
    },
    {
      "type": "required_status_checks",
      "parameters": {
        "strict_required_status_checks_policy": false,
        "required_status_checks": [{ "context": "test" }]
      }
    }
  ]
}

The IDs are made up. The first entry is a repository role, added during an outage so that the person on call could merge. The second is the release app, which pushes version bumps to main. The third is an app from a repository migration that finished months ago.

Each entry fails differently. The role entry covers everyone who holds that role, including people who never handle incidents, and lets them push to main without a pull request. Each such push shows up as a bypass, but only for someone who looks. The release app's entry is reasonable, since the app must push directly. The migration app is the quiet problem. Its pushes run no rules and create no bypass audit entries, so if the app is still installed and something uses it, rule insights has no bypass to show for the unreviewed change that reaches main.

None of this is visible to CI or to reviewers. A bypass acts on the merge or the push, not on the code, so the tests pass or fail as before.

A narrower list#

Rewrite the list so each entry matches one need:

"bypass_actors": [
  { "actor_id": 4410982, "actor_type": "Team", "bypass_mode": "pull_request" },
  { "actor_id": 1100231, "actor_type": "Integration", "bypass_mode": "always" }
]

Here a small incident team replaces the role, in pull request mode, so an emergency merge still starts as a pull request with a diff, a description and a name on it. The release app keeps direct push. The migration app is gone. If a future migration needs an exemption, record when it ends wherever your team tracks ruleset changes, and remove it on that date. The emergency merge guide covers what to record when the incident team uses its bypass.

Keeping the exceptions visible#

Rule insights shows actions that passed, failed or were bypassed, filtered by ruleset, branch, actor and time period. The rule insights dashboard, available on GitHub Team and GitHub Enterprise Cloud, adds a "Top bypassers" list. Viewing insights for rulesets The same data is available from the rule suites API with rule_suite_result=bypass, for up to a month at a time through its time_period parameter. List repository rule suites

Changes to the list itself are recorded. The organization audit log's repository_ruleset.update event includes ruleset_bypass_actors_added, ruleset_bypass_actors_deleted and ruleset_bypass_actors_updated fields. Audit log events for your organization Only organization owners can read that log, and it covers 180 days, so export it if your review cycle is longer. Reviewing the audit log

Exports leave out one thing. GitHub's documentation for ruleset history, written for GitHub Enterprise Cloud, says "The bypass list of a ruleset is excluded from the exported JSON file." Using ruleset history If you keep rulesets in version control as JSON, keep the bypass list in a separate reviewed file.

What the bypass list does not catch#

A narrow list limits who can skip the rules. It says nothing about whether a bypassed change was right, and it cannot stop a bypass actor from using their bypass on something that was not an emergency. Bypass counts show how often the exception is used, not whether each use was justified. That judgment needs the record and the follow-up review. Also check the layering: an actor exempt from one ruleset is still bound by every other ruleset and branch protection rule on the branch, as the guide to rulesets and branch protection together explains.

The decision#

Name teams and apps, not roles. Default people to pull request mode. Give "Always" only to automation that cannot open a pull request. Treat exempt mode as temporary. Review bypass counts and list changes on a fixed schedule, monthly if you read the rule suites API, because a list that is never read grows the way the one above did.

One month of free code review.

New organizations get one calendar month of hosted code review for private and public GitHub repositories. No card or cloud connection required. Eligibility and fair-use terms.

Start free with GitHub

Related reading