scorecard: BUG: githubv4.Query: Resource not accessible by integration in Branch-Protection
An interesting error came up in the run for the GitHub action https://github.com/ossf/scorecard/security/code-scanning/2869?query=ref%3Arefs%2Fheads%2Fmain
error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration
Note: this was for a push event, not a PR. Let’s see if this continues in next push. It did not happen before in previous pushes.
I’ve never seen it before. @azeemsgoogle ideas?
About this issue
- Original URL
- State: open
- Created 3 years ago
- Comments: 24 (19 by maintainers)
The fine-grained PAT should help aleviate this. But we’ll need to update our instructions at: https://github.com/ossf/scorecard-action#authentication-with-fine-grained-pat-optional
It will probably also need read permissions to a few more fields for private repos (I’m guessing
actions
,issues
,pull_requests
,contents
, but just a guess not exhaustive.I believe this has been resolved in the slack, but the classic PATs need the
public_repo
scope to read branch protection, which the message is saying.Note: Hopefully all of this will be a problem of the past soon due to Repository Rules (see: #3326)