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.
1. Go to Repository or Organization Settings -> Rules -> Rulesets. 2. Open each ruleset. 3. Set 'Enforcement status' to 'Active'.
{
"target": "GHRuleset",
"if": {
"allOf": [
{
"resource": "GHRuleset",
"property": "Enforcement",
"operator": "equals",
"value": "active"
}
]
},
"then": {
"effect": "Audit"
}
}
Copyright © DevOps Shield. All Rights Reserved. Privacy Policy | Cookie Policy | Terms and Conditions | v1.0.2