GitLab project Severitylow builtIn

Description

Projects should use main as the default branch (modern GitLab convention since 2021). Standardising on main simplifies CI templates, branch-protection rules, and inter-project automation. Use the GL_Project_DefaultBranch_Should_Not_Be_Master rule for the inverse formulation.

Recommendation

1. Go to project Settings > Repository > Default branch. 
2. Set Default branch to main. 
3. Save changes. 
4. Update local clones via: git remote set-head origin -a.

Policy Rule

{
  "target": "GLProject",
  "if": {
    "allOf": [
      {
        "resource": "GLProject",
        "property": "DefaultBranch",
        "operator": "equals",
        "value": "main"
      }
    ]
  },
  "then": {
    "effect": "Audit"
  }
}