GitHub repository Severitymedium builtIn

Description

Every deployment environment (e.g., 'production', 'staging', 'qa') should have a non-empty, descriptive name. Environments without names are not addressable from workflows and break the deployment-targeting model.

Recommendation

1. Go to Repository Settings -> Environments. 
2. Open each environment. 
3. Ensure the environment name is set and descriptive (e.g., 'production', 'staging').

Policy Rule

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