docs: clarify GITHUB_TOKEN permissions needed for private repos#1574
docs: clarify GITHUB_TOKEN permissions needed for private repos#1574justaugustus merged 3 commits intoossf:mainfrom
GITHUB_TOKEN permissions needed for private repos#1574Conversation
…ossf#1248) Signed-off-by: Pankaj Taneja <tanejapankaj5@gmail.com>
869e038 to
d5bdda3
Compare
|
Hi maintainers — this PR clarifies GITHUB_TOKEN read permissions needed for private repos (per #1248 ) and adds a minimal YAML example plus rationale. It’s a docs-only change; DCO is passing. When you have a moment, could a docs/Action maintainer take a look and (if appropriate) add a documentation label? Thanks! |
spencerschrock
left a comment
There was a problem hiding this comment.
Thanks for the contribution, just a question or two
README.md
Outdated
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - uses: ossf/scorecard-action@v2 | ||
| with: | ||
| results_file: results.sarif | ||
| results_format: sarif |
There was a problem hiding this comment.
You can probably omit the steps section. We tend to recommend SHA pinning, so don't want to have conflicting guidance. The important thing for this doc section is just the job level permissions block
There was a problem hiding this comment.
Good call—done. I removed the entire steps block so this section shows only the job-level permissions example.
README.md
Outdated
| # (optional) if your workflow needs to read workflow metadata: | ||
| actions: read |
There was a problem hiding this comment.
Out of curiosity, did you test if actions: read was necessary? I see it's marked optional?
There was a problem hiding this comment.
I tested on a private repo with default read permissions and Scorecard runs fine without actions: read. It’s not required by the action; only add it if a workflow step explicitly reads Actions metadata. I’ve removed actions: read from the example to keep it minimal.
…rmissions only) Signed-off-by: Pankaj Taneja <tanejapankaj5@gmail.com>
GITHUB_TOKEN permissions needed for private repos
What
Why
Resource not accessible by integrationduring GraphQL ListCommits and miss SAST detection. See Suggested GITHUB_TOKEN permissions in docs not sufficent to run on (at least) private repo's #1248.Notes
Fixes #1248