GitLab repository Severitylow builtIn

Description

Sanity check: every persisted GLProtectedBranch should have a non-empty Name. An empty Name indicates a corrupted inventory record from /api/v4/projects/:id/protected_branches; flag for re-scan.

Recommendation

1. If a protected branch is reported with an empty name, re-run the GitLab inventory scan (CLI: dos resource scan --enterprise GitLab) and verify the source project's protected_branches via GET /api/v4/projects/:id/protected_branches.

Policy Rule

{
  "target": "GLProtectedBranch",
  "if": {
    "allOf": [
      {
        "resource": "GLProtectedBranch",
        "property": "Name",
        "operator": "notEquals",
        "value": ""
      }
    ]
  },
  "then": {
    "effect": "Audit"
  }
}