-
Notifications
You must be signed in to change notification settings - Fork 2.5k
ci: read-only token-permissions for all workflows #7278
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
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
@pnacht thanks for this! We should confirm that the repo is not already set to use "read" permission by default, which would make this redundant. /cc @kimwnasptd |
Hey @thesuperzapper, sorry for the late reply. Looking at your Action logs, we can see the workflows are running with write-all permissions: https://github.com/kubeflow/kubeflow/actions/runs/6500263891/job/17655300160#step:1:19 While setting default read-only tokens is certainly what I'd recommend, I'd suggest also adding these explicit permissions to the workflows for added transparency to your users. |
Hey @thesuperzapper & @kimwnasptd, let me know if this is something you'd be interested in. I'll happily handle the conflicts if so. |
@pnacht we could possibly do the other way around (change the repo to "read only" by default, and "inclusive" specify permissions that are needed beyond read in each job). @james-jwu @zijianjoy can make the change, but we need to make the PR give appropriate permissions to each job first l. @pnacht if you want to check which jobs need more than "read only", we can update the PR to give "write" access, and then update the repo settings. |
Signed-off-by: Pedro Kaj Kjellerup Nacht <[email protected]>
70cf0cc
to
4df4733
Compare
Hey @thesuperzapper, I've just pushed a new commit that adds the minimal permissions needed for all workflows. The only ones that need any Everything else should work fine with read-only tokens. I've still left all workflows declaring That being said, let me know if you'd rather I drop the top-level read-only permissions and leave that to the repo settings. |
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.
The Kubeflow Dashboard code has been migrated to the new repo, please re-open PR at: https://github.com/kubeflow/dashboard
/close
@andreyvelich: Closed this PR. In 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/test-infra repository. |
Fixes kubeflow/notebooks#80.
This PR ensures all workflows run with read-only permissions.
From what I could tell, the
triage_issues.yml
workflow uses the secret PAT instead of the default workflow token, and as such doesn't require additional permissions.