Default Branch Deletion Protection Should Be Enabled
policy name: missing_default_branch_protection_deletion
The history of the default branch is not protected against deletion for this repository.
Rewriting project history can make it difficult to trace back when bugs or security issues were introduced, making them more difficult to remediate.
- Make sure you have admin permissions
- Go to the repo’s settings page
- Enter “Branches” tab
- Under “Branch protection rules”
- Click “Edit” on the default branch rule
- Uncheck “Allow deletions”
- Click “Save changes”