Updates GitHub actions to latest, removes non-conforming whitespace & narrows pemissions#329
Updates GitHub actions to latest, removes non-conforming whitespace & narrows pemissions#329
Conversation
1a7ddf4 to
d75598b
Compare
|
While you're at it, you should specify only the needed permissions to run those jobs. and for the publish job override it: that should be enough I think. https://docs.github.com/en/actions/reference/workflows-and-actions/workflow-syntax#permissions |
This looks plausible, but what would this actually do for us? |
|
This is just a security measure in case there is a vulnerability somewhere in the actions to not allow more permissions that what the action was supposed to do. This is really to adhere strictly to the principle of least privilege. Not sure what is the default set of permissions here for the GITHUB_TOKEN, that may depends of the configuration on the repo or organization. Some more info: https://graphite.com/guides/github-actions-permissions |
c79ae15 to
4597b7f
Compare
|
I couldn't find documentation elsewhere, so I asked Phind 70-B what permissions each action requires, and added them to the commit. I really want to avoid a cycle of pushing to GitHub, having the workflow fail, and needing to debug which exact permission is needed. |
That sounds fine, I think. I would also update the commit message to reflect the changes, and the PR description. |
You're right, the documentation is a bit sparse. Here's what I found:
From what I could find out from the documentation and from my own testing, it seems that the only permission that may be required is the Although, my attempts with even that set to none completed successfully. So it looks like no permissions are required (which I'll admit is a bit weird, but the run logs record the different permissions I've tried, so it seems to be valid). Since the The run logs do report a
It has been my experience that AI assisted changes should be checked more carefully than regular changes. Edit: I forgot to mention, thank you for the AI disclosure, that was quite helpful when reviewing. |
4597b7f to
4c38edd
Compare
Why: To ensure this workflow doesn't break later on
Why: To appease the latest version of python-lint-plus
Why: The principle of Least Privilege guards against a vulnerability in the actions.
2672583 to
8525f22
Compare
What?
Updates GitHub actions to latest, removes non-conforming whitespace & narrows pemissions
Why?
How to test
lintandtestandpublishjobs complete successfullyDocumentation of functionality
No changes to functionality.
Limitations
Doesn't run lint and test on local commit