-
Notifications
You must be signed in to change notification settings - Fork 77
docs: clarify GITHUB_TOKEN
permissions needed for private repos
#1574
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
Conversation
…ossf#1248) Signed-off-by: Pankaj Taneja <[email protected]>
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! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Out of curiosity, did you test if actions: read
was necessary? I see it's marked optional?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this docs improvement, @pankajtaneja5!
GITHUB_TOKEN
permissions needed for private repos
What
Why
Resource not accessible by integration
during 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