Skip to content
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

zizmor audit for scorecard workflow #2275

Open
funnelfiasco opened this issue Nov 7, 2024 · 3 comments · May be fixed by #2326
Open

zizmor audit for scorecard workflow #2275

funnelfiasco opened this issue Nov 7, 2024 · 3 comments · May be fixed by #2326
Labels
bug Something isn't working

Comments

@funnelfiasco
Copy link
Contributor

🌈 completed scorecard.yml
warning[excessive-permissions]: overly broad workflow or job-level permissions
  --> .github/workflows/scorecard.yml:18:1
   |
18 | permissions: read-all
   | --------------------- uses read-all permissions
   |
   = note: audit confidence → High

1 findings (0 ignored): 0 unknown, 0 informational, 0 low, 1 medium, 0 high
@funnelfiasco funnelfiasco added the bug Something isn't working label Nov 7, 2024
@funnelfiasco
Copy link
Contributor Author

It's not clear if read-all is truly necessary here or not. I opened ossf/scorecard-action#1461 to ask about it.

@funnelfiasco
Copy link
Contributor Author

Seems that read-all isn't necessary, but a matter of convenience. We may want to do some testing to see how much we can restrict that.

@robert-cronin
Copy link
Contributor

robert-cronin commented Nov 28, 2024

I've done some investigation at least on my own fork, and it seems reducing the workflow permission scope down to contents only doesn't degrade or affect the workflow at all. I'll paste two workflow runs below for comparison:

  1. run with read-all enabled as it is currently: https://github.com/robert-cronin/guac/actions/runs/12076551125
  2. run with permissions scoped down to contents: read only: https://github.com/robert-cronin/guac/actions/runs/12076543286

So, I think this means we can solve this zizmor warning by restricting the scope, I'll add a PR!

Edit: I just noticed that id-token: write is also required for Scorecard's weekly scan of public repos.

@robert-cronin robert-cronin linked a pull request Nov 29, 2024 that will close this issue
9 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants