Security teams should not rely on a single required reviewer as a complete control. The stronger baseline is to require approval from the most recent pusher, require at least two reviewers for sensitive branches, and restrict who can push to matching branches. Those settings reduce the chance that a reviewer with push rights can modify and approve the same change set.
Why Branch Protections Need More Than a Single Reviewer
A single required reviewer is a weak control when the same person, or a closely coordinated set of people, can still push directly to protected branches or influence the merge path. Strong branch protection is about separating authoring, review, and push authority so one approval cannot effectively self-authorise a risky change.
Requiring approval from the most recent pusher closes a common gap in pull request hijacking scenarios, where a change is altered after review or a reviewer becomes the actor who finalises the update. Requiring at least two reviewers for sensitive branches adds a second independent checkpoint and makes collusion or accidental rubber-stamping less likely.
Restricting who can push to matching branches is the other half of the control, because review-only policy does not help if broad push rights let users bypass the intended review path. In practice, the protection should treat direct push access, review authority, and merge authority as separate permissions that are intentionally narrowed and monitored.
How Pull Request Hijacking Usually Succeeds
Pull request hijacking is rarely about a single exotic exploit. It usually depends on weak separation of duties, permissive branch rules, or workflow shortcuts that allow a reviewer to become part of the execution path. When branch protections allow the same actor to both influence code and approve it, the review process becomes procedural rather than preventive.
This is especially dangerous in repositories where approvals are treated as a formality and where protected branches are used for release-critical code. A compromised reviewer account, a malicious maintainer, or an overly broad team permission can all turn a normal review into a trusted commit path. The control failure is not the existence of review, but the absence of independent review and constrained write access.
Teams should also think about rules that apply consistently across branch names and release branches. If protections are only applied to the default branch, attackers may target release or hotfix branches with weaker settings and then promote the change back into the protected path.
Branch Protection Settings That Matter Most
The most effective configuration is the one that reduces both bypass opportunities and reviewer reuse. That means approval rules, push restrictions, and branch pattern coverage should be aligned rather than configured in isolation. OWASP CICD-SEC-1 is a good reference point for understanding why flow-control failures in CI/CD and repository policy create downstream abuse paths.
Where the branch is sensitive, require more than one reviewer and ensure the review requirement cannot be satisfied by the same person who last changed the code. Combine that with a hard restriction on who may push to the protected pattern, so the review gate is not undermined by direct-write exceptions or inherited permissions.
GitHub-specific hardening should be part of a broader repository policy, not a standalone checkbox. Git Repository Security Guide covers protected branches, safe history handling and policy settings that support stronger repository integrity, while GitHub and GitHub Actions Security Guide ties branch controls to workflow permissions, runner security and repository rulesets.
Risk and Threat Considerations
Pull request hijacking matters because it turns a review control into an attack surface. If an attacker can edit after review, reuse a privileged reviewer account, or exploit a permissive push path, they can smuggle malicious logic into trusted branches without needing to defeat the entire development process.
Failure mechanism: The control fails when branch rules allow the reviewer, last committer, or a broadly privileged contributor to also finalise the merge path, so approval and code influence are no longer independent.
Impact: Malicious code can enter protected branches, trusted releases can be altered, and downstream pipelines may build, sign, or deploy unreviewed changes under normal operational trust.
Standards & Framework Alignment
This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.
CIS Controls v8 and NIST SP 800-53 Rev 5 set the governance and control requirements practitioners need to meet.
| Framework | Control / Reference | Relevance |
|---|---|---|
| CIS Controls v8 | CIS-5 — Account Management | Branch access depends on tightly managed write and approval permissions. |
| Recommendation — Limit branch write rights and review authority to approved roles only. | ||
| NIST SP 800-53 Rev 5 | AC-3 — Access Enforcement | Branch protection is an access enforcement problem with separate write and approve rights. |
| AC-6 — Least Privilege | The control relies on minimising who can push, approve or bypass branch rules. | |
| Recommendation — Apply access enforcement so only authorised principals can push or override protected branches. Reduce branch privileges to the minimum needed for each role. | ||
Practitioner Guidance
What to verify: Check that protected-branch settings cover every branch pattern that can reach production, not only the default branch. Verify that direct pushes are denied for everyone except tightly controlled automation and that approval rules cannot be bypassed by someone who also has write access.
Decision rule: If a branch change can be both authored and approved by the same user path, treat the protection as incomplete. If the branch is high impact, require two independent reviewers and separate push rights from approval rights, even if that slightly slows merge throughput.
What good looks like: A protected branch change should show a clear approval trail, no self-approval path, no silent direct push path, and an auditable reason for any exception. The control is working when the easiest route to merge is also the most constrained route to abuse.
Practitioner takeaway: Branch protection is strongest when it enforces separation of duties, not just review count. If one person can still steer, approve, and land the change, the repository is protected in name but not in practice.
Related resources from NHI Mgmt Group
Deepen Your Knowledge
Free weekly newsletter
Subscribe to the NHI & AI Identity Journal
The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.
Bonus 33% off our NHI Course when you subscribe.
Reviewed and updated by the NHIMG editorial team on October 30, 2026.
NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org