Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(repository): add new check repository_enforces_admin_branch_protection #6205

Open
wants to merge 3 commits into
base: PRWLR-5532-ensure-all-checks-have-passed-before-merging-new-code
Choose a base branch
from

Conversation

HugoPBrito
Copy link
Member

Context

Branch protection rules are designed to prevent unauthorized or unverified changes to critical branches like the main branch. By default, administrators are exempt from these rules, which can undermine their effectiveness. Since administrator accounts often have elevated privileges and are potential targets for attacks, ensuring that branch protection rules apply to administrators helps safeguard the integrity of the repository.

Description

This check ensures that branch protection rules are enforced for administrators. It validates that even users with elevated privileges must adhere to the same safeguards as other contributors, such as requiring reviews, passing checks, and restrictions on direct pushes. This policy reduces the risk of accidental or malicious changes bypassing established protections.

Checklist

License

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@HugoPBrito HugoPBrito requested review from a team as code owners December 16, 2024 12:11
…-new-code' into PRWLR-5536-ensure-branch-protection-rules-are-enforced-for-administrators
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant