Glossary
Branch protection and repository rulesets
GitHub rules that guard branches and tags: required reviews, status checks, no force-pushes. Removing them lets one credential rewrite main.
Branch protection rules (the classic mechanism) and repository rulesets (the newer, layered one, also available at organization level) enforce conditions on branches and tags: required pull request reviews, status checks, signed commits, linear history, and blocks on force-pushes and deletions. Rulesets can declare bypass actors, and several rulesets can apply at once.
In the audit log, removal appears as protected_branch.destroy or repository_ruleset.destroy, weakening as protected_branch.update_* or repository_ruleset.update, and an admin bypass as protected_branch.policy_override. See branch protection and ruleset tampering.