Ensure no branch has 'force push' enabled

The 'force push' option allows users with 'push' permissions to force their changes directly to the branch without a pull request and thus should be disabled.

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

REMEDIATION

SaaS:

In the repository setting on Github site:

  1. Go to Setting.
  2. Click on branches in the Setting menu.
  3. Find 'Rules applied to everyone including administrators' section.
  4. Uncheck the Allow force pushes checkbox.

Read more: