Safeguard
Security Guides•

How do you ship an urgent hotfix without bypassing controls?

An emergency path for health app releases that is fast, logged and reviewed after the fact: who approves, what is skipped, and what is never skipped.

Safeguard Security Team
3 min read

Define the emergency path before you need it: a named approver, a short list of checks that never get skipped, a record of anything that was, and a review within a few days. Speed comes from preparation, not from turning branch protection off. A logged exception is a control. A silent bypass is a gap.

Why emergencies cause the worst habits

During an outage someone with admin rights pushes straight to the main branch, or disables a required check. It works, and it becomes the habit. Months later, the audit trail shows production changes with no review and nobody can explain why.

GitHub's documentation points out that branch rules do not apply to administrators by default, and that an option exists to apply them to everyone, including roles with bypass permission. Bypass lists are available only for organization-owned repositories. Decide on purpose who is on that list.

Design the emergency path

  1. Name two people who can approve an emergency change, and a backup.
  2. Keep required checks that take minutes: build, a focused test, the dependency scan.
  3. Allow a skipped slow check, such as the full regression suite, only with an explicit note in the pull request.
  4. Never skip: a second pair of eyes, a look at the diff for credentials or sensitive data, and a rollback plan.
  5. Use a time limited bypass permission, granted for the incident and removed after.
  6. Open a follow-up ticket automatically for every emergency release.

What to record

FieldExample
Incident referenceTicket ID
ApproverName
Checks skippedWhich, and why
Time of releaseTimestamp
Rollback testedYes or no
Review doneDate

The record can live in the pull request. One structured comment is enough.

After the fix

Within a few days, review the emergency release as if it were a normal one. Did the change need more tests? Did the shortcut skip a check that would have mattered? Update the emergency rules based on what you learn, and record the review.

Count your exceptions

Track how many emergency releases you do per quarter. A rising number means the normal path is too slow or incidents are too frequent. Both are worth fixing. This guidance is about engineering control, not legal advice.

Where Safeguard fits

Safeguard offers policies, gates and guardrails, and compliance and evidence automation. They can keep the checks that cannot be skipped in place during an emergency and capture the record. The approval design remains yours. A free scan is available at gold.safeguard.sh/scan.

Quick check

Should admins be allowed to bypass branch protection?

Prefer no, or a short named list with a time limit and logging. The default in GitHub is that admins are not bound.

What if the reviewer is unavailable?

Have a backup approver named in advance. If none exists, record the exception and review it afterwards.

Sources

Last reviewed: 19 October 2026.

Never miss an update

Weekly insights on software supply chain security, delivered to your inbox.

Self-healing security runs on Safeguard.

Your first fix PR is minutes away.

No sales call required, even your agent can complete the purchase over MCP.