-
Notifications
You must be signed in to change notification settings - Fork 510
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
📖 Update Token-Permissions requirement in checks.yaml #1130
Conversation
@olivekl any comment? |
GitHub, and does not support other source hosting repositories (i.e., Forges). | ||
|
||
Setting token permissions to read-only follows the principle of least privilege. | ||
Setting token permissions to the minimum needed follows the principle of least privilege. | ||
This is important because attackers may use a compromised token with write | ||
access to push malicious code into the project. | ||
|
||
The highest score is awarded when the permissions definitions in each workflow's |
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.
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.
IIUC, this is not in the scope of this PR? If so, let's discuss this in a different PR or issue.
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 updating this. The new description LGTM.
@@ -579,19 +579,20 @@ checks: | |||
description: | | |||
Risk: `High` (vulnerable to malicious code additions) | |||
|
|||
This check determines whether the project's automated workflows tokens are set | |||
to read-only by default. It is currently limited to repositories hosted on | |||
This check determines whether permissions for the project's automated workflows tokens are set |
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.
Nit: change to whether token permissions for the project's automated workflows are set ...
for better readability.
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!
Closing this PR: the code calculation based on the top-level vs run-level permission will be merged in soon thru #1356 |
What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
Docs update - to change the requirement for the token permissions check.
What is the current behavior? (You can also link to an open issue here)
Relax token permission check or not #1129
What is the new behavior (if this is a feature change)?
New logic is in the PR
Does this PR introduce a breaking change? (What changes might users need to make in their application due to this PR?)
It will cause the score to increase for some repos.
Other information:
The logic for this change is the following:
The proposed change is a draft, and I expect it to evolve based on discussions...