| category | Repository |
|---|---|
| severity | Critical |
| online version | https://github.com/microsoft/PSRule.Rules.GitHub/blob/main/docs/en/rules/GitHub.Repo.Protected.md |
Enable branch protection on the repository default branch.
Branch protection rules ensure that collaborators on your repository cannot make irrevocable changes to branches. When a branch protection is enabled for a branch, commits are added through a pull request workflow. Additional options can also be configured to enforce additional requirements, such as passing status checks and required reviews.
Consider enabling branch protection on the repository default branch.