CTL-018 · human
Branch Rules With No Bypass
Block force pushes and deletions on important branches for everyone, including admins and bots.
TechnicalEffort LowEffectiveness High
History rewriting is only possible if someone can force-push. Rulesets that block non-fast-forward pushes and branch deletion on default and release branches, with an empty bypass list, remove that option. Requiring signed commits makes author changes detectable.
Signed commits also help investigators tie a change to a person's key rather than a free-text author field. Apply the rules at org level so new repos are covered by default, and review any repo that opts out.
Put it in place
- 01Create org-level rulesets for default and release branches that block force push and deletion.
- 02Leave the bypass list empty, or limit it to a break-glass team with alerts.
- 03Require signed commits and pull requests with at least one approving review.
- 04Alert on any ruleset change.