Skip to content

Only block release-branch PRs on Security Audit failures#21

Merged
chrisdp merged 2 commits into
masterfrom
task/security-audit-release-gate
May 20, 2026
Merged

Only block release-branch PRs on Security Audit failures#21
chrisdp merged 2 commits into
masterfrom
task/security-audit-release-gate

Conversation

@chrisdp
Copy link
Copy Markdown
Contributor

@chrisdp chrisdp commented May 20, 2026

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 on audit, always reports a status. Exits 0 for non-release PRs (advisory only). Propagates the audit result for release/* PRs and pushes to master.

Pair this with a branch ruleset on master that requires release-gate (not audit). Result:

  • Feature PR with a failing audit: audit shows ❌, release-gate shows ✅, merge not blocked.
  • release/* PR with a failing audit: both show ❌, merge blocked.

Test plan

  • Open a feature PR with a clean audit — both checks pass.
  • Open a feature PR while master has a known audit failure — audit fails, release-gate passes, PR is mergeable.
  • Open a PR from a release/* branch while master has a known audit failure — both fail, PR is blocked once the ruleset requires release-gate.

chrisdp added 2 commits May 20, 2026 15:24
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.
@chrisdp chrisdp enabled auto-merge May 20, 2026 19:41
@chrisdp chrisdp merged commit f9da816 into master May 20, 2026
7 checks passed
@chrisdp chrisdp deleted the task/security-audit-release-gate branch May 20, 2026 19:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants