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

🐛 Support POST workflow verification for inter-repo reusable workflows #295

Merged

Conversation

spencerschrock
Copy link
Contributor

@spencerschrock spencerschrock commented Dec 20, 2022

The Scorecard action can't be used as a reusable workflow from another repo if publish_results is true.

When Scorecard action POSTs the JSON to the webapp, the webapp tries to download and verify the workflow, but the logic currently assumes the workflow always comes from the same repo. The API used to download the workflow file then
fails with a 404 error, leading to a vague 500 error on the original POST from action to webapp:

error processing signature: http response 500, status: 500 Internal Server Error, error: {"code":500,"message":"something went wrong and we are looking into it."}

This PR adds logic to handle scenarios where a reusable workflow file is in a different repo than the repo being analyzed:

Fixes #300

@spencerschrock spencerschrock added the bug Something isn't working label Dec 20, 2022
@netlify
Copy link

netlify bot commented Dec 20, 2022

Deploy Preview for ossf-scorecard canceled.

Name Link
🔨 Latest commit a61aea8
🔍 Latest deploy log https://app.netlify.com/sites/ossf-scorecard/deploys/63ab5c600442f20008ca12bf

Copy link
Member

@naveensrinivasan naveensrinivasan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

Copy link
Contributor

@azeemshaikh38 azeemshaikh38 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Could you add the associated issue for this PR?

@spencerschrock
Copy link
Contributor Author

I don't believe there was any associated issue filed. I can create one, but it will just contain the same text as this PR.

@naveensrinivasan
Copy link
Member

I don't believe there was any associated issue filed. I can create one, but it will just contain the same text as this PR.

What made you fix this? Did someone complain? If so, you could create an issue with that reference. HTH

Signed-off-by: Spencer Schrock <sschrock@google.com>
…t repositories than the repo they analyze.

Signed-off-by: Spencer Schrock <sschrock@google.com>
Signed-off-by: Spencer Schrock <sschrock@google.com>
Signed-off-by: Spencer Schrock <sschrock@google.com>
Signed-off-by: Spencer Schrock <sschrock@google.com>
Signed-off-by: Spencer Schrock <sschrock@google.com>
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 this pull request may close these issues.

Workflow verification doesn't support re-usable workflows
3 participants