Skip to main content
FieldValue
CategoryCICD-SEC-1
SeverityHIGH
Auto-fix✓ (via --fix-settings or web Fix button)
SourceRepository configuration

What the check does

Reads the default branch’s protection rule and reports when allow_deletions.enabled is true.

Why it matters

The default branch should never be deletable. Losing it:
  • Destroys the canonical history pointer.
  • Breaks every CI workflow, deploy pipeline, and dependent that resolves main.
  • Removes a recovery anchor — restoring from a fork or local clone introduces ambiguity about which version was canonical.

How to fix

Settings → Branches → edit the rule for the default branch → uncheck Allow deletions.