Other Articles

GitHub Repositories – Enforce Pull Request Reviews

Secure Configuration Checks > Github

This check ensures that Pull Request (PR) review enforcement is enabled for GitHub repositories. Enforcing mandatory code reviews helps maintain code integrity, prevents unauthorized changes, and reduces the risk of vulnerabilities being introduced into production systems.

Check Details

  • Resource: GitHub Repository
  • Check: Ensure Pull Request review is enforced
  • Risk: Unauthorized or unreviewed code changes leading to security vulnerabilities or unstable releases

Remediation via GitHub UI

  1. Log in to your GitHub account and navigate to the target repository. GitHub Repository Overview
  2. Click on the Settings tab of the repository. GitHub Repository Settings
  3. In the left navigation panel, click Branches. GitHub Branch Settings
  4. Under Branch protection rules, click Add classic branch protection rule or edit an existing rule. GitHub Branch Protection Rules
  5. Specify the branch name pattern (e.g., main).
  6. Enable the option: Require a pull request before merging.
  7. Select Require approvals and define the number of required reviewers (recommended: at least 1 or 2). GitHub Branch Protection Rules for Approval
  8. Click Create or Save changes to apply the branch protection rule.

Updated on 27 March, 2026