-
Notifications
You must be signed in to change notification settings - Fork 499
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
BUG: Token-Permissions check not reducing score for job-level contents: write
permission
#2991
Comments
It kind of contradicts #2338. |
FWIW I think |
It doesn't matter where it comes from. It can come from Google and be "arguably dangerous". Those decisions shouldn't be based on the origin. They should be based on actual reviews/audits/scans that have to be conducted every time stuff gets updated. Edit: looks like scorecard can use something like ossf/scorecard-action#1107 to evaluate actions (whether it's adequate or not is another matter). Anyway I really hope that this check doesn't boil down to "stuff from GitHub/Google/... is implicitly trusted and everything else is "third-party". |
I created this issue because I thought it was a simple bug, but now I realize that it was intentional and it's part of a broader discussion. @evverx I agree with all your points. I'll meet with some scorecard maintainers and discuss some ideas I have on how to handle this. |
FWIW I ran |
I created the issue #3022 discussing another idea around the problem commented here. |
Describe the bug
In the scenario of a workflow with read-only top level permissions but
contents: write
as a job-level permissions, no score is being reduced on the Token-Permission check.Reproduction steps
Run the following scorecard evaluation and note that it gets a 10/10 on Token-Permissions.
The code analyzed have this highly vulnerable workflow call:
This issue occurs in both version 4.10.2 and 4.10.5
Expected behavior
The Token-Permission check should detect the permissive
contents: write
permission and the score should have a large reduction.Additional context
I'll assign myself on this issue
The text was updated successfully, but these errors were encountered: