-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow approval of pull request target workflows #28
Conversation
One or more environments require approval before deploying workflow runs. Maintainers, please inspect changes carefully for improper handling of secrets or other sensitive information. To approve pending deployments, submit an approved review, or a commented review with |
1 similar comment
One or more environments require approval before deploying workflow runs. Maintainers, please inspect changes carefully for improper handling of secrets or other sensitive information. To approve pending deployments, submit an approved review, or a commented review with |
The previous pending workflow query was based on the reviewed commit SHA but this would not return any pull_request_target events. This change updates the filter to find all pending workflows based on the branch, then reduces the list further by approved commits or event type. The events must already be in a pending state before the approval is received, this is unchanged. Change-type: patch Signed-off-by: Kyle Harding <[email protected]>
Exclude workflows that were created within one minute of the review being submitted. This is to prevent time-of-check to time-of-use (TOCTOU) attacks. Change-type: minor Signed-off-by: Kyle Harding <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/deploy
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, nice work! I think a 1 min wait time is better UX than 5 min.
The previous pending workflow query was based on the reviewed
commit SHA but this would not return any pull_request_target events since the commit would be out-of-tree.
This change updates the filter to find all pending workflows based
on the branch, then reduces the list further by approved commits
or event type.
Also exclude workflows that were created within one minute of the review being submitted.
This is to prevent time-of-check to time-of-use (TOCTOU) attacks.