feat(policy): reusable runner-policy gate that works on the Team plan - #3
Merged
Merged
Conversation
The organization ruleset "required workflows" rule cannot enforce anything here. It is a GitHub Enterprise feature and this org is on Team. The REST API accepted the ruleset and reported it active, but no check ever appeared on a pull request and /rulesets/rule-suites returns 403 "Upgrade to GitHub Enterprise". That ruleset was created, observed inert, and deleted. Replace it with a reusable workflow plus a per-repo stub. Reusable workflows run with the caller's context, so actions/checkout fetches the calling repository and the audit applies there. This works on Team because this repository's Actions access is set to `organization`, which permits org-wide calls into a private repository. Drop enforce-runner-policy.yml: as a standalone workflow here it only audited this repository, duplicating audit.yml. The trade-off is honest: this needs one small file per repository and `runner-policy` added to each protected branch's required checks. Without that second step it reports but does not block. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replaces the inert Enterprise-only ruleset with a reusable workflow + per-repo stub.
🤖 Generated with Claude Code