Ensure the branch has Branch Protection

Branch Protection rules define whether collaborators can delete or force push to the branch and set requirements for any pushes to the branch, such as passing status checks or a linear commit history.

Risk Level: medium
Platform: Github
Spectral Rule ID: GH-HRDS002



  1. Go to the repository settings.
  2. Go to 'branches'
  3. Choose the target branch you want to protect.
  4. Check 'Protect this branch', then require reviews. You can also include repository administrators.

Read more: