Check ID: repository_default_branch_requires_multiple_approvals
Provider: GitHub
Service: repository
Severity: MEDIUM
Categories: ci-cd, software-supply-chain
Resource type: NotDefined

What this check verifies

GitHub repository default branch enforces required reviews with a minimum of 2 approving reviews before a pull request can be merged. Assesses whether an approval threshold of at least 2 is configured for code changes targeting the default branch.

Risk

Without multi-review approval on the default branch, a single actor can merge changes, degrading integrity and accountability. This enables:
  • supply-chain tampering or backdoors
  • introduction of exploitable bugs
  • bypass of change control via compromised accounts

Recommendation

Enforce the four-eyes principle by requiring at least 2 approvals for merges to the default branch. Strengthen with separation of duties using code owner reviews, dismiss stale approvals, apply protections to admins, and pair with required status checks for defense in depth.

Remediation

gh api -X PUT repos/<OWNER>/<REPO>/branches/<DEFAULT_BRANCH>/protection -F required_status_checks=null -F enforce_admins=false -F restrictions=null -F required_pull_request_reviews.required_approving_review_count=2

References

Where this check fires

This check runs on every scheduled scan against your GitHub account. Findings appear at Cloud Security → Findings filterable by Check ID = repository_default_branch_requires_multiple_approvals. To re-evaluate after a fix, hit Run now on the account’s schedule under Cloud Security → Schedules — the next scan re-checks this control and marks the finding fixed or keeps it persistent.
← Back to GitHub checks