GitLab repository Severitymedium builtIn

Description

Protected branch entries should not use the literal wildcard '*' as their name pattern. Protecting every branch defeats the purpose of branch protection (which exists to distinguish important branches from working branches) and makes CI/CD branch-detection hostile.

Recommandation

1. Go to project Settings > Repository > Protected branches. 
2. Remove any entry where the branch pattern is '*'. 
3. Replace with specific patterns (main, release/*, prod*, etc.).

Règle de politique

{
  "target": "GLProtectedBranch",
  "if": {
    "allOf": [
      {
        "resource": "GLProtectedBranch",
        "property": "Name",
        "operator": "notEquals",
        "value": "*"
      }
    ]
  },
  "then": {
    "effect": "Audit"
  }
}
Détails de la règle
  • ID de la règle: DOS6044
  • Code: GL_Branch_Name_Should_Not_Be_Wildcard_Everything
  • Plateforme: GitLab
  • Catégorie: repository
  • Sévérité: Severitymedium
  • Type: builtIn