Skip to content

fix: use the invoked trusted workflow revision - #993

Merged
danbarr merged 1 commit into
mainfrom
fix/trusted-scan-workflow-revision
Sep 18, 2026
Merged

danbarr merged 1 commit into
mainfrom
fix/trusted-scan-workflow-revision

Conversation

@danbarr

@danbarr danbarr commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

Summary

  • check out the trusted scanner implementation from github.workflow_sha
  • avoid binding approvals to a stale pull request merge base
  • document the workflow revision trust anchor

Context

The final trusted scan for #925 ran after #992 merged, but github.event.pull_request.base.sha still pointed to 29ccd7d, the pull request branchs older merge base. The trusted scan therefore recorded approval hashes for the old workflow implementation. When the merge commit reached main, the build correctly rejected every approval with trusted scan implementation changed after approval and fell back to fresh LLM scans. Two fresh verdicts then blocked publication in run 35362527423.

github.workflow_sha identifies the exact trusted commit from which GitHub loaded the pull_request_target workflow. Checking out that revision keeps the executed workflow and its scanner implementation aligned even when the pull request branch is behind main.

Validation

  • actionlint on all four skill workflow files, excluding existing ShellCheck diagnostics
  • zizmor with no unsuppressed findings
  • git diff --check

Because pull_request_target uses the default-branch workflow definition, this checkout behavior must be confirmed on a skill-changing pull request after merge.

Signed-off-by: Dan Barr <6922515+danbarr@users.noreply.github.com>
@danbarr
danbarr enabled auto-merge (squash) September 18, 2026 19:05
@danbarr
danbarr merged commit 35fed02 into main Sep 18, 2026
7 checks passed
@danbarr
danbarr deleted the fix/trusted-scan-workflow-revision branch September 18, 2026 19:10
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