dragonflyoss / Dragonfly2

Dragonfly is an open source P2P-based file distribution and image acceleration system. It is hosted by the Cloud Native Computing Foundation (CNCF) as an Incubating Level Project.
https://d7y.io
Apache License 2.0
2.29k stars 292 forks source link

Improvement of OpenSSF Scorecard Score #3441

Open harshitasao opened 3 months ago

harshitasao commented 3 months ago

Hi, I'm Harshita. I’m working with CNCF and the Google Open Source Security Team for the GSoC 2024 term. We are collaborating to enhance security practices across various CNCF projects. The goal is to improve security for all CNCF projects by both using OpenSSF Scorecards and implementing its security improvements.

After the opening of the scorecard action addition PR, I'm here to increase the final score by going over each check. I've listed all of the checks where work needs to be done, in order of its criticality. I plan to submit each PR for each fix. Please let me know what you think and for which ones a PR is welcome that I will submit it ASAP.

Current Score: 6.2

Scorecard report: https://scorecard.dev/viewer/?uri=github.com/dragonflyoss/dragonfly2

Here's a few checks we can work on to improve the project's security posture [ in order of its criticality ]:

/cc @joycebrum @diogoteles08 @pnacht @nate-double-u

harshitasao commented 3 months ago

cc @yxxhero

angellk commented 2 months ago

Thank you for opening this @harshitasao - have any PR's been opened in reference to your suggestions? Cc: @gaius-qi

gaius-qi commented 2 months ago

@harshitasao Hey! I have finished the Singed-Releases, Token-Permissions and Pinned-Dependencies. cc @angellk

I have two questions:

  1. Dragonfly has CII-Best Practices, refer to https://bestpractices.coreinfrastructure.org/projects/7103. How can I get scores? image

  2. I have finished the Singed-Releases, Token-Permissions and Pinned-Dependencies. But the OpenSSF Scorecard report is not updated. Still the report of 2024-09-09, refer to https://scorecard.dev/viewer/?uri=github.com/dragonflyoss/dragonfly2. image image

pnacht commented 2 months ago

Hey @gaius-qi, I just noticed the badge has a small typo: the Scorecard API is case-sensitive, and the badge is being pulled for dragonflyoss/dragonfly2*, not for dragonflyoss/Dragonfly2. If you modify that, you'll get the "correct" score of 7.8.

As for the "Best Practices badge", it is currently being picked up as "in progress" by Scorecard. This seems to be because there are two "projects" registered in the Best Practices site for Dragonfly2:

Scorecard seems to be picking up the first "project". You are listed as the "owner" for both projects, so you should be able to log into the platform, open project 6851 and delete it (there'll be a big "Delete" button on the top of the page when you open the project). That should let Scorecard "find" project 7103 which is passing.


* The dragonflyoss/dragonfly2 score is probably calculated by Scorecard's weekly cronjob, where the repo was probably registered in the lower-case style.

gaius-qi commented 2 months ago

Hey @gaius-qi, I just noticed the badge has a small typo: the Scorecard API is case-sensitive, and the badge is being pulled for dragonflyoss/dragonfly2*, not for dragonflyoss/Dragonfly2. If you modify that, you'll get the "correct" score of 7.8.

As for the "Best Practices badge", it is currently being picked up as "in progress" by Scorecard. This seems to be because there are two "projects" registered in the Best Practices site for Dragonfly2:

Scorecard seems to be picking up the first "project". You are listed as the "owner" for both projects, so you should be able to log into the platform, open project 6851 and delete it (there'll be a big "Delete" button on the top of the page when you open the project). That should let Scorecard "find" project 7103 which is passing.

  • The dragonflyoss/dragonfly2 score is probably calculated by Scorecard's weekly cronjob, where the repo was probably registered in the lower-case style.

@pnacht Thanks! I have rename dragonflyoss/dragonfly2 to dragonflyoss/Dragonfly2 and delete the Best Practices in progress, refer to https://www.bestpractices.dev/en/projects/6851.