Skip to main content

CI/CD provider

ISSUE-505HighAccess and Authorization

Branch protection configuration not compliant

Control:CTRL-501Branch must be protected

📋 What is this?

The branch protection configuration does not meet the security requirements defined in your Policy controls. The branch settings allow unauthorized access levels, force push capabilities, or bypass code owner approval requirements.

⚠️ Impact

Misconfigured branch protection settings can lead to unauthorized code changes, security vulnerabilities, and policy violations. This includes risks such as loss of commit history through force push, unauthorized code merges, and direct pushes to protected branches without proper validation.

🔧 How to fix

Update the branch protection settings to match your Policy controls requirements by enforcing proper access controls, disabling force push, and requiring code owner approvals for all changes.

✗ BeforeBranch is protected but settings don't meet requirements.
# GitLab settings - ❌ Protection exists but is too permissive
# Branch: main
# Allowed to push: Developers + Maintainers (too permissive)
# Allow force push: Yes (dangerous)
# Code owner approval required: No (missing review)
# Required by the policy:
# minPushAccessLevel: 40 (Maintainer only)
# allowForcePush: false
# codeOwnerApprovalRequired: true
✓ AfterBranch protection meets all configured requirements.
# GitLab settings: ✅ Protection meets requirements
# Branch: main
# Allowed to merge: Developers + Maintainers
# Allowed to push: Maintainers only
# Allow force push: No
# Code owner approval required: Yes

💡 Tips

  • Plumber checks each setting independently - the output shows exactly which settings violate the policy.
  • Access levels: 0 = No one, 30 = Developer, 40 = Maintainer.
  • Force push should almost always be disabled on production branches.

⚙️ Configure this control

On the Plumber Platform: open the Policies page and set control CTRL-501 on the policy that governs the project.

With the CLI alone: set it in your configuration file. Every field and default is in the controls configuration reference, CTRL-501.