ci: Fix authorization logic in pull_request_target workflows#223
Conversation
|
There was a problem hiding this comment.
Hey there - I've reviewed your changes - here's some feedback:
- The hard-coded approvers list in the workflow contains duplicate entries—consider deduplicating or extracting it into a single variable/file to improve maintainability.
- Ensure that passing the pull request SHA via the
refinput is supported by this pinnedactions/checkoutversion, or consider using the dedicatedcommitinput for clarity.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- The hard-coded approvers list in the workflow contains duplicate entries—consider deduplicating or extracting it into a single variable/file to improve maintainability.
- Ensure that passing the pull request SHA via the `ref` input is supported by this pinned `actions/checkout` version, or consider using the dedicated `commit` input for clarity.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
|
/cherry-pick release-1.6 |
|
@rm3l: once the present PR merges, I will cherry-pick it on top of DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
@rm3l: #223 failed to apply on top of branch "release-1.6": DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
@rm3l: new pull request created: #224 DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |


Description
Otherwise, they might be tricked into executing arbitrary code.
Which issue(s) does this PR fix or relate to
More details in https://boostsecurity.io/blog/weaponizing-dependabot-pwn-request-at-its-finest
PR acceptance criteria
How to test changes / Special notes to the reviewer
Summary by Sourcery
Fix authorization logic in pull_request_target workflows to prevent executing untrusted code from forks by basing environment assignment on pull request author and checking out the commit SHA instead of branch ref.
CI: