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

Failed to run automated scorecard-action@main test-organization-ls/scorecard-action-private-repo-tests #201

Closed
naveensrinivasan opened this issue Apr 25, 2022 · 9 comments

Comments

@naveensrinivasan
Copy link
Member

https://github.com/test-organization-ls/scorecard-action-private-repo-tests/actions/runs/2217769550

@rohankh532
Copy link
Contributor

rohankh532 commented Apr 25, 2022

#189 (comment)

I think this is what's causing this, #200, and #199 to fail. I'm not sure which permission is missing though--but adding read-all fixes it. Is there a certain permission necessary for workflows to make API requests? @azeemshaikh38

@laurentsimon
Copy link
Contributor

no permission means all permissions default to none. On a public repo it's not a problem because the repo is public. On a private repo you need to be able to read it so you must declare some read permissions.. not sure which ones exactly. read-all is fine

@azeemshaikh38
Copy link
Contributor

This is a great finding @rohankh532 @laurentsimon. We need to update our GitHub partnered workflow to include these changes before rolling out Golang:

  • top-level read-all permissions
  • id-token: write permission
  • GITHUB_TOKEN by default with a comment to use PAT if Branch-Protection is needed.

@laurentsimon
Copy link
Contributor

laurentsimon commented Apr 26, 2022

This is a great finding @rohankh532 @laurentsimon. We need to update our GitHub partnered workflow to include these changes before rolling out Golang:

  • top-level read-all permissions

already the case.

  • id-token: write permission

correct.

  • GITHUB_TOKEN by default with a comment to use PAT if Branch-Protection is needed.

this is in the TODO list once we've verified that everything else works. #203 is waiting for approval to merge this change in our README before making the change to starter workflow.

@laurentsimon
Copy link
Contributor

laurentsimon commented Apr 26, 2022

I have an idea what's going on. The repo is private: we should not send the data to our backend in this case, but we seem to be doing that. During verification the backend tries to verify the workflow to validate it.. but the repo is private so it's not reachable.. and it fails.

The solution is to not send the data for private repo... we should not do that anyway... it's great that the verification does not work.. nice fallback in case we make a mistake on the client code.

@rohankh532
Copy link
Contributor

@rohankh532
Copy link
Contributor

rohankh532 commented Apr 26, 2022

Here's what's happening on the server end.
image

PR ossf/scorecard-webapp#85 should fix this

@laurentsimon
Copy link
Contributor

laurentsimon commented Apr 26, 2022

It is a private repo. Can you confirm that you cannot visit the repo?
The logs show "bad gateway", I thought. The bad gateway is likely to be because it's a private repo.

Ouch, another nil pointer: did we push the code change to k8 cluster (k8 apply -f)? The nil pointer seems like it's the same error as last week before we made the change

@laurentsimon
Copy link
Contributor

got it, so have not merged it yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants