Repository navigation
Read file modes from the git tree in the permission check - #74
Merged
thespad merged 1 commit intoNov 15, 2026
Merged
Conversation
3 tasks
Contributor
Author
|
Hi! Just a friendly nudge in case this one slipped through. The permission check still fails on fork PRs that touch |
thespad
approved these changes
Nov 15, 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.
Since actions/checkout v7, the permission check fails on fork PRs that touch
run,finishorcheckfiles: checkout refuses a fork's head in apull_request_targetworkflow, so the job stops before it reads any file (#72).The check only needs file modes. The git trees API returns them for the head commit, and that works for fork commits too because the base repository has them under
refs/pull/N/head. This drops the checkout step, so the job no longer fetches fork code at all. The callers stay as they are. The annotations keep their title and message, and the path loses its leading./.I tested it with a PR between two branches of my fork: this run fails on a
runand afinishstored as 100644 and lets through the 100755run, a symlinkedcheckand a file namedrunner. This run passes once the modes are fixed. For fork heads I ran the step's script against docker-swag#617, whose check currently fails on the checkout refusal, and against a5272e08 from docker-baseimage-selkies#190. Both reportAll perms look good.