GitHub repository Severitylow builtIn

Description

Every GitHub environment exposes a REST API URL that infrastructure-as-code and CI/CD systems use to read or update environment configuration. A missing URL field indicates an environment that cannot be programmatically updated, which breaks GitOps and IaC reconciliation.

Recommendation

1. Confirm that each environment is reachable via the REST endpoint /repos/{owner}/{repo}/environments/{environment_name}. 
2. Re-create environments missing a REST URL.

Policy Rule

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