Only block release-branch PRs on Security Audit failures#21
Merged
Conversation
Adds a release-gate job that depends on audit and always reports a status. It exits 0 for non-release PRs (advisory only) and propagates the audit result for release/* PRs and pushes to master. The branch ruleset on master should require release-gate so feature PRs surface audit failures without being blocked, while release PRs are gated on a clean audit.
TwitchBronBron
approved these changes
May 20, 2026
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.
Summary
The Security Audit workflow runs on every PR, but GitHub branch rulesets gate the target branch, not the head. That means making the audit a required check on master would block every PR — including feature work unrelated to the failing advisory.
This change splits the workflow into two jobs so the audit can be both visible everywhere and blocking only where we want it:
audit— runs the real audit on every PR/push (unchanged).release-gate— depends onaudit, always reports a status. Exits 0 for non-release PRs (advisory only). Propagates the audit result forrelease/*PRs and pushes to master.Pair this with a branch ruleset on master that requires
release-gate(notaudit). Result:auditshows ❌,release-gateshows ✅, merge not blocked.release/*PR with a failing audit: both show ❌, merge blocked.Test plan
auditfails,release-gatepasses, PR is mergeable.release/*branch while master has a known audit failure — both fail, PR is blocked once the ruleset requiresrelease-gate.