GitHub repository Severitymedium builtIn

Description

Display names make codespaces easy to identify in dashboards and audit logs. Codespaces with empty display names are typically auto-generated and harder to associate with their owner's intent.

Recommendation

1. Go to https://github.com/codespaces. 
2. For each codespace, set a meaningful display name (e.g., '<feature-branch>-dev', '<issue-id>-fix').

Policy Rule

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