GitLab project Severityhigh builtIn

Description

Projects holding source code, secrets, or business data should set visibility = private. Public visibility exposes the source tree, issues, merge requests, and snippets to anonymous internet users. Use the GL_Project_Visibility_Should_Not_Be_Public rule for the less-strict variant that also accepts internal.

Recommendation

1. Go to project Settings > General > Visibility, project features, permissions. 
2. Set Project visibility to Private. 
3. Save changes.

Policy Rule

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