GitHub repository Severitymedium builtIn

Description

A ruleset with enforcement set to 'disabled' provides no protection at all - it exists only as configuration history. Disabled rulesets typically indicate that a previously enforced policy was deactivated and should be reviewed: either re-enable it ('active'), set it to dry-run ('evaluate') for observation, or remove it entirely.

Recommendation

1. Go to Repository or Organization Settings -> Rules -> Rulesets. 
2. Identify any rulesets in 'Disabled' state. 
3. Decide whether to re-enable ('Active'), observe ('Evaluate'), or delete each disabled ruleset.

Policy Rule

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