-
-
Notifications
You must be signed in to change notification settings - Fork 8
Prevent failures for PRs from forks #44
Comments
Pinging @aloisklink to inform you of our findings. Also cc: @Gudahtt @rickycodes |
Hi @rekmarks, I've tested v1.0.2 (which includes #37) on MetaMask/eth-trezor-keyring#106 and it works for non-release PRs. See https://github.com/MetaMask/eth-trezor-keyring/runs/5268487563?check_suite_focus=true Do you have any logs for runs where v1.0.2 fails? If it's failing on the action-require-additional-reviewer/.github/workflows/require-additional-reviewer.yml Line 24 in 90a0877
|
^ Cross-posing the answer to that question: #42 (comment) Edit: Oh, though it looks like the example given does use Edit2: Tried changing |
Perhaps we could store the username of the person who triggered the release in the release PR body rather than as an artifact. That would simplify this a great deal, and would no longer require git history. |
#37 didn't work since I forgot that there are two status checks (my bad!), one that describes whether the action succeeded/failed, and a 2nd one that is created by the action (and requires extra permissions). Using The problem is that Potential fixes:
|
#37 attempted to fix this action updating the commit status when in the context of a PR from a fork. #42 reverted this, as the implementation did not work.
We can still fix this action for PRs from forks, by using the
pull_request_target
even trigger, which runs the workflow in the context of the base repository. However, as discussed in #42, it's not safe to check out untrusted PRs, so we have to either:pull_request_target
and the other using some trigger that runs the workflow in the context of the PR's repository.git
history we need without "fully" checking out the PR branch.It'd be best if we could pursue option 2, as that would be the least disruptive. GitHub security article here for reference: https://securitylab.github.com/research/github-actions-preventing-pwn-requests/
The text was updated successfully, but these errors were encountered: