-
Notifications
You must be signed in to change notification settings - Fork 1.2k
ci: gha: Remove ok-to-test label on every push #11397
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
Conversation
This removes the ok-to-test label on every push, except if the PR author has write access to the repo (ie. permission to modify labels). This protects against attackers who would initially open a genuine PR, then push malicious code after the initial review. Signed-off-by: Aurélien Bombo <abombo@microsoft.com>
adda5ec
to
2ee3470
Compare
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.
This is a great enhancement. Thanks @sprt!
Looks good to me. Hmmm… Why do I have a right to close the PR but no longer see the "Review" button? Sorry, can't approve (technically speaking)… |
You have rights to review code - can you try and then we can see if you have a green, or grey tick? |
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, great addition
Added the ok-to-test label by mistake earlier. Will force-merge this as a YAML change with 2 approvals. |
I've just spotted that there was an actionlint failure on this PR:
I guess we should make that required once this is fixed? |
It also doesn't seem to work based on: https://github.com/kata-containers/kata-containers/actions/runs/15586834103/job/43895131910?pr=11019 ? |
This removes the ok-to-test label on every push, except if the PR author has write access to the repo (ie. permission to modify labels).
This protects against attackers who would initially open a genuine PR, then push malicious code after the initial review.
Note that this uses
pull_request_target
so it won't show up in this PR's checks.