-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
[OSSFScorecard] Create scorecard badge service #7687
Conversation
|
Hello @rohankh532 ! 👋🏻 It would have been helpful to add some context about the Scorecard service, what these badges are trying to achieve, how they would be used, etc. I've not looked at your implementation in details, but I did notice your Is the API actually working? Is it documented anywhere? |
Believe #5941 was a request along the same lines. For what it's worth, I do think many of OSSF-based metrics would make for good badges, but also agree that we need to make sure the APIs we'd be depending on are in good order as P-Y noted |
Hey @PyvesB. Thanks for the comments. Scorecards is a tool that assesses a repository with several security checks and provides a score for different categories. It is triggered via a GitHub workflow, which would run every time the project is updated. We are currently incorporating signatures on scorecard results so that their authenticity can be proved. This way, if someone claims their project has a certain score, it can actually be verified. We are using badges to allow project owners to display their scorecard score so that other users can get a sense for how vulnerable the project is. The API currently just returns 1 for every repository as we are still working on a method for computing an aggregate score. So for now it is just a placeholder, but the format will still remain the same. |
Thanks for sharing the extra details! If the API is still work in progress, I suggest we put this PR on hold for the time being, and circle back to it once things are in a more final state. How does that sound? |
Sounds good. I'll change this PR to a draft for now. |
The API is now functional, here are 3 example endpoints for which the scorecard results are given in response:
|
Great news! Could you please rebase and make sure the CI jobs are passing? |
Yup its fixed now, thanks! |
We are looking to test/feedback both - API and badge. They are both new features rolling out to the public. The way this works is - when you "enable" Scorecard on a repository, you get an API which provides latest Scorecard result and the ability to add a Scorecard badge to your repo. So we'll be collecting feedback on user journey, badge design etc. |
I guess that's why this is returning an http 500 response
As an early piece of feedback, I'll share that's semi-problematic for us, though not necessarily blocking. We typically try to map the http errors we receive when trying to fetch data from the upstream provider to something more contextual to our badge users. However, because this is returning a 500 response we have no way of distinguishing between whether there's a legitimate upstream service issue or the user hasn't enabled their repository or if they just had a typo in the badge route parameter or something else. https://shields-staging-pr-7687.herokuapp.com/ossf-scorecard/github.com/badges/shields |
Ah, that's a good point. I think returning @rohankh532 could you update the API to ensure that we don't return a |
Fixed this to differentiate between |
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 the dialog and collaboration! This looks to be in good order so going to merge 🚀
Thanks a lot for all your help here @calebcartwright! |
That's great--thank you so much for your help! |
Badge service to display scores from the OpenSSF Security Scorecard.