Skip to content
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

chore: update permissions #743

Merged
merged 3 commits into from
Feb 20, 2024
Merged

chore: update permissions #743

merged 3 commits into from
Feb 20, 2024

Conversation

sympatheticmoose
Copy link
Contributor

@sympatheticmoose sympatheticmoose commented Feb 12, 2024

What this PR does / why we need it:

Introduces top level read-only permissions in the CI workflow

Moves write permissions to within the single job (kind of a vanity change but stops certain security tooling from complaining)

Which issue(s) this PR fixes:

part of #742

Special notes for your reviewer:

Tested with a custom plugin and CI/Release still appeared to execute as expected.
CI workflow may require more changes as per the issue

@sympatheticmoose sympatheticmoose requested a review from a team as a code owner February 12, 2024 15:06
@sympatheticmoose sympatheticmoose requested review from sunker and removed request for a team February 12, 2024 15:06
Copy link

github-actions bot commented Feb 12, 2024

Hello! 👋 This repository uses Auto for releasing packages using PR labels.

✨ This PR can be merged but will not trigger a new release. To trigger a new release add the release label before merging.
NOTE: When merging a PR with the release label please avoid merging another PR. For further information see here.

@sympatheticmoose sympatheticmoose added create-plugin related to the create-plugin tool patch Increment the patch version when merged chore Other changes that don't modify src or test files labels Feb 12, 2024
Copy link
Collaborator

@leventebalogh leventebalogh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, maybe I am doing something wrong, but this didn't work for me (failing workflow). Are you sure read-only is a valid permission value? As far as I can see here to define access for all the available scopes we can either use read-all or write-all.

@leventebalogh
Copy link
Collaborator

(Maybe it would be useful to automatically open a PR in the https://github.com/grafana/plugin-workflow-tester/ repo if any of the workflow template files change to see if they pass. However as we don't edit these too often maybe it doesn't worth the effort.)

@sunker
Copy link
Contributor

sunker commented Feb 13, 2024

(Maybe it would be useful to automatically open a PR in the https://github.com/grafana/plugin-workflow-tester/ repo if any of the workflow template files change to see if they pass. However as we don't edit these too often maybe it doesn't worth the effort.)

Nice, did not know we had this repo.

@sympatheticmoose
Copy link
Contributor Author

Hmm, maybe I am doing something wrong, but this didn't work for me (failing workflow). Are you sure read-only is a valid permission value? As far as I can see here to define access for all the available scopes we can either use read-all or write-all.

🤦

@@ -8,11 +8,12 @@ on:
tags:
- 'v*' # Run workflow on version tags, e.g. v1.0.0.

permissions:
contents: write
permissions: read-all
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As we only have a single job in this workflow, what's the reason for this change at this point?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(kind of a vanity change but stops certain security tooling from complaining)

Yeah its weird I know

@sympatheticmoose sympatheticmoose merged commit 790db95 into main Feb 20, 2024
13 checks passed
@sympatheticmoose sympatheticmoose deleted the update-gh-workflows branch February 20, 2024 14:40
@grafana-plugins-platform-bot
Copy link

🚀 PR was released in @grafana/create-plugin@4.2.0, @grafana/plugin-e2e@0.18.0 🚀

@grafana-plugins-platform-bot grafana-plugins-platform-bot bot added the released This issue/pull request has been released. label Feb 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore Other changes that don't modify src or test files create-plugin related to the create-plugin tool patch Increment the patch version when merged released This issue/pull request has been released.
Projects
Development

Successfully merging this pull request may close these issues.

3 participants