GitHub repository Severityhigh builtIn

Description

Repository or Organization Rulesets are the modern (replacement) protection primitive for branches, tags, and pushes. The 'enforcement' field controls whether a ruleset is enforced ('active'), running in dry-run mode ('evaluate'), or completely turned off ('disabled'). For production-grade compliance, rulesets should always be 'active' so that bypass attempts are blocked rather than just observed.

Recommendation

1. Go to Repository or Organization Settings -> Rules -> Rulesets. 
2. Open each ruleset. 
3. Set 'Enforcement status' to 'Active'.

Policy Rule

{
  "target": "GHRuleset",
  "if": {
    "allOf": [
      {
        "resource": "GHRuleset",
        "property": "Enforcement",
        "operator": "equals",
        "value": "active"
      }
    ]
  },
  "then": {
    "effect": "Audit"
  }
}