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

Scorecard repo fails at Token-Permissions with score 0 #942

Closed
1 of 7 tasks
laurentsimon opened this issue Aug 31, 2021 · 6 comments
Closed
1 of 7 tasks

Scorecard repo fails at Token-Permissions with score 0 #942

laurentsimon opened this issue Aug 31, 2021 · 6 comments
Assignees
Labels
kind/bug Something isn't working

Comments

@laurentsimon
Copy link
Contributor

laurentsimon commented Aug 31, 2021

We need to fix this. A cursory read of our workflows:

  • Codeql -> contents:read, statuses: writeand possibly security-events: write
  • Goreleaser -> contents:read
  • Integration -> contents:read, pull-requests:write for this.
  • Main -> contents:read, status:write for license part.
  • Ok-to-test -> ?
  • Stale -> contents:read and issues:write and pull-requests:write
  • Verify -> contents:read and statuses:write

We can define permission: to set all permissions to none at the start of the workflows, and then set what we want in each runs. It's fine to set contents:read at the start of workflows, if this helps.

See https://github.blog/changelog/2021-04-20-github-actions-control-permissions-for-github_token/ for more info

@laurentsimon laurentsimon added the kind/bug Something isn't working label Aug 31, 2021
@laurentsimon
Copy link
Contributor Author

@naveensrinivasan , can you handle it?

@laurentsimon
Copy link
Contributor Author

As we fix this, let's keep a record to explain the permissions we need. Everyone struggles with GitHub permissions AFAIK

@naveensrinivasan
Copy link
Member

I will take this.

@naveensrinivasan
Copy link
Member

As we fix this, let's keep a record to explain the permissions we need. Everyone struggles with GitHub permissions AFAIK

It would be great to have a tool that will produce the actual permissions needed for these actions.

@naveensrinivasan naveensrinivasan self-assigned this Sep 3, 2021
naveensrinivasan added a commit that referenced this issue Sep 3, 2021
* Updated the actions permissions for codeql from write to specific
  settings. #942
naveensrinivasan added a commit that referenced this issue Sep 3, 2021
* Updated the actions permissions for codeql from write to specific
  settings. #942
azeemshaikh38 pushed a commit that referenced this issue Sep 7, 2021
* Updated the actions permissions for codeql from write to specific
  settings. #942
@azeemshaikh38
Copy link
Contributor

Can we close this issue now? @laurentsimon @naveensrinivasan

@laurentsimon
Copy link
Contributor Author

yes. Scorecard still gives a score of 0 but it's a bug. Will create an issue for tracking #1400

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants