| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
|
From our last internal discussion about this, I believe that actions: read is (only) needed if you are analyzing a private repository, and security-events: write is (only) needed if you are not analyzing a pull request. And I think we need at least contents: read (or pull-requests: read for PRs). The overlapping scopes for PRs make this a bit confusing. So perhaps let's go with the recommendation of actions: read, contents: read, security-events: write? If it turns out that's not entirely minimal, we can refine it again later. |
Sorry, something went wrong.
|
Sure, and I can add some comments on when different scopes may not be needed. |
Sorry, something went wrong.
|
Here are the API calls we are making (just doing a code search for .request:
Unless I've missed something, we only need security-events: write and actions: read. And the latter is only for private repos. |
Sorry, something went wrong.
|
Plus you need enough permission to check out the repo itself in the workflow (but not in the Action), which I believe is either contents: read or pull_requests: read. |
Sorry, something went wrong.
|
Ah..yes. Again, only for private repos, it seems. So, contents: read guards the GET /repos/:owner/:repo/contents/:path endpoint. I don't see anything about pull requests, though. This would only be for things like editing the PR itself, or adding comments, etc. |
Sorry, something went wrong.
And adds a permissions block to the README.
There was a problem hiding this comment.
LGTM once you resolve the changelog conflict. Thanks!
Sorry, something went wrong.
@aeisenberg I am trying to figure out the required permissions for any GitHub Action. What is the process to get all the necessary permission? Thanks |
Sorry, something went wrong.
|
There's no principled way of doing this that I can think of. An action can make any arbitrary request to the github api. And it can make requests in many ways (since they are just fundamentally REST requests): curl, gh, octokit, etc. You could try setting very restrictive permissions, and slowly loosen them until you get your workflow passing. Alternatively, you can try to eyeball the code, which could be tricky if the action is doing non-standard things. |
Sorry, something went wrong.
Thank you! |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
And adds a permissions block to the README.
Fixes #464.
Merge / deployment checklist