Skip to content

Run PR CVE gate on every PR so it can serve as a required check#9

Merged
wnstfy merged 1 commit into
mainfrom
fix/cve-gate-runs-on-all-prs
May 21, 2026
Merged

Run PR CVE gate on every PR so it can serve as a required check#9
wnstfy merged 1 commit into
mainfrom
fix/cve-gate-runs-on-all-prs

Conversation

@wnstfy

@wnstfy wnstfy commented May 21, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Remove the paths: filter from .github/workflows/pr-cve-gate.yml so the workflow runs on every PR.
  • The existing Detect changed compose files step writes no_compose_changes=true when no compose file changed, and every downstream step (install Trivy, scan, post comment) is already gated by if: steps.changed.outputs.no_compose_changes != 'true'. Non-compose PRs now run the detect step (~5s) and the scan job succeeds trivially.

Why

Branch protection on main now requires the scan status check. With the previous paths: filter, PRs that don't touch compose (workflow bumps, renovate.json migrations, README edits) never triggered the workflow, so the check sat at "Expected — Waiting for status to be reported" and the PR couldn't merge without admin bypass.

After this lands, all non-Docker PRs pass the gate naturally and no bypass is needed — including the open Renovate config-migration PR (#5) and the incoming Node-24 action majors (actions/checkout v6, actions/cache v5, marocchino/sticky-pull-request-comment v3).

Test plan

  • Confirm the workflow run on this very PR completes successfully (it will trigger now without a paths: match — that's the test).
  • Detect step prints "No compose-file changes; nothing to scan." and the job is green.
  • After merge, re-check PR chore(config): migrate Renovate config #5: the scan check should now show ✅ without manual intervention.
  • After merge, re-check the next Renovate-opened workflow major: same — green scan, eligible for merge.

Merge note

This PR itself needs an admin bypass to merge (it's a chicken-and-egg PR — it can't satisfy the rule it's about to fix). After merge, no future PR will need bypass for this reason.

The workflow had a paths filter restricting it to docker-compose.yml
changes only. With branch protection now requiring the 'scan' check on
main, any PR that doesn't touch compose (workflow updates, renovate
config, README edits, GitHub Action version bumps) was blocked at
"Expected — Waiting for status to be reported" and needed admin bypass.

The detect step already writes no_compose_changes=true and every
downstream step is gated by `if: steps.changed.outputs.no_compose_changes
!= 'true'`, so removing the paths filter is safe: non-compose PRs run
the detect step (~5s) and pass, compose PRs scan as before.
@github-actions

Copy link
Copy Markdown
Contributor

CVE delta

No changes. Every image's CVE set is identical to the previous scan.

@wnstfy
wnstfy merged commit e359a5a into main May 21, 2026
3 checks passed
@wnstfy
wnstfy deleted the fix/cve-gate-runs-on-all-prs branch May 21, 2026 09:03
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.

1 participant