You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
protected-safety-review always fails on pull_request_target: GITHUB_SHA is base, not PR head #2229
In scripts/ci/protected_safety_review.py, _current_run_errors compares workflow_run.head_sha with workflow_sha, which is GITHUB_SHA. On pull_request_target, GITHUB_SHA is the last commit on the base branch, but the run's head_sha is the PR head. So every pull_request_target run fails with "workflow run SHA does not match the triggering event SHA".
Examples: run 43228654349 on #2225 (attempt 2) and the #2228 runs.
Only issue_comment runs pass, because there both values are main. Today that means a PR needs a comment before it can merge.
Fix: on pull_request_target, compare against the run's base SHA (the TRUSTED_BASE_SHA checkout) or against github.event.pull_request.head.sha, whichever one the check means to bind. Add a test for each event type.
Activity
abrichr commentedon Nov 25, 2026
Resolved on
mainin PR #2275 (9c675cbd0, "fix(ci): bind pull_request_target safety runs to the PR head, not GITHUB_SHA").