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

[Umbrella] Enhancement of Karmada maturity based on Clomonitor check sets #5048

Closed
24 tasks done
zhzhuang-zju opened this issue Jun 13, 2024 · 17 comments
Closed
24 tasks done
Labels
help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/feature Categorizes issue or PR as related to a new feature.
Milestone

Comments

@zhzhuang-zju
Copy link
Contributor

zhzhuang-zju commented Jun 13, 2024

What would you like to be added:
CLOMonitor is a tool that periodically checks open source projects repositories to verify they meet certain project health best practices, and will provide a score card for each project based on the check results. Here is the score card for karmada: https://clomonitor.io/projects/cncf/karmada. As you can see, there's still some work to be done.
Here list the check set that karmada did not pass.

Reference:

Why is this needed:
Improving scores is not the ultimate goal, I hope to use this issue to make Karmada healthier and more mature

@zhzhuang-zju zhzhuang-zju added the kind/feature Categorizes issue or PR as related to a new feature. label Jun 13, 2024
@zhzhuang-zju
Copy link
Contributor Author

/help

@karmada-bot
Copy link
Collaborator

@zhzhuang-zju:
This request has been marked as needing help from a contributor.

Please ensure the request meets the requirements listed here.

If this request no longer meets these requirements, the label can be removed
by commenting with the /remove-help command.

In response to this:

/help

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@karmada-bot karmada-bot added the help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. label Jun 13, 2024
@zhzhuang-zju
Copy link
Contributor Author

cc @B1F030

@B1F030
Copy link
Contributor

B1F030 commented Jun 13, 2024

I'm glad to help! Can I take the license scanning first?

@zhzhuang-zju
Copy link
Contributor Author

I'm glad to help! Can I take the license scanning first?

done~

@RainbowMango
Copy link
Member

Maybe we can have the badge of CLomonitor. See example at https://github.com/kubeflow/kubeflow/blob/master/README.md.
CLOMonitor

@aditya7302
Copy link
Contributor

@RainbowMango I have added the CLOMonitor badge in my PR.

@SkySingh04
Copy link
Contributor

Hey does this issue require any more help?If so, I would like to work on it

@zhzhuang-zju
Copy link
Contributor Author

Hey does this issue require any more help?If so, I would like to work on it

Sure, go ahead. Please pick what interests you and do it~

@aditya7302
Copy link
Contributor

@RainbowMango @zhzhuang-zju I have added top-level permission for ci-image-scanning workflow. Please review it.

@SkySingh04
Copy link
Contributor

@RainbowMango @zhzhuang-zju I have added top-level permission for ci.yml and cli.yml workflow. Please review it.

@zhzhuang-zju
Copy link
Contributor Author

@aditya7302 @Akash-Singh04 Thanks for your efforts on task Token permissions. Defining the minimal permission set for workflow is actually difficult, do you have any experiences to share? Besides, how can we effectively go about verifying the results(all I can think of at the moment is local verification)? Other than that, have you encountered any other difficulties? Looking forward to your feedback!

@zhzhuang-zju
Copy link
Contributor Author

@aditya7302 @Akash-Singh04 Thanks for your efforts on task Token permissions. Defining the minimal permission set for workflow is actually difficult, do you have any experiences to share? Besides, how can we effectively go about verifying the results(all I can think of at the moment is local verification)? Other than that, have you encountered any other difficulties? Looking forward to your feedback!

I found the recommended steps and an online tool to complete the task Token permissions!
refer to https://github.com/ossf/scorecard/blob/main/docs/checks.md#token-permissions:

The highest score is awarded when the permissions definitions in each workflow's yaml file are set as read-only at the top level and the required write permissions are declared at the run-level.

Following this criterion, the recommended steps are:

  • Set top-level permissions as read-all or contents: read as described in GitHub's documentation.
  • Set any required write permissions at the job-level. Only set the permissions required for that job; do not set permissions: write-all at the job level.

So, we had a problem with the previous implementation and needed to be revised.

To help determine the permissions needed for our workflows, we can use StepSecurity's online tool by ticking the "Restrict permissions for GITHUB_TOKEN".
NOTE: Cleanup workflow's previously defined permissions before using it, and the result may be more precise.

@aditya7302
Copy link
Contributor

@zhzhuang-zju As I am new to learning workflows, I primarily use local verification to test them. This method helps me ensure that the workflows function correctly within a controlled environment. However, I think that defining the minimal permission set for large workflows can be quite challenging.

@zhzhuang-zju
Copy link
Contributor Author

@zhzhuang-zju As I am new to learning workflows, I primarily use local verification to test them. This method helps me ensure that the workflows function correctly within a controlled environment. However, I think that defining the minimal permission set for large workflows can be quite challenging.

I can't agree more~ Local verification is actually the safest way. Now with the tool Scan, this process is even easier. However, in some cases, the tool's database does not have permissions information of a certain action, we can only verify them locally or refer to other user-defined permissions.
BTW, thank @aditya7302 and @Akash-Singh04 for your contributions.

@RainbowMango
Copy link
Member

All tasks are done! Thank you all for your hard work! @B1F030 @zhzhuang-zju @aditya7302 @SkySingh04

For now, we reached a 99 score, and the last check(Signed releases) will pass after 5 releases, there is nothing we need to do on our part.

/close

@karmada-bot
Copy link
Collaborator

@RainbowMango: Closing this issue.

In response to this:

All tasks are done! Thank you all for your hard work! @B1F030 @zhzhuang-zju @aditya7302 @SkySingh04

For now, we reached a 99 score, and the last check(Signed releases) will pass after 5 releases, there is nothing we need to do on our part.

/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/feature Categorizes issue or PR as related to a new feature.
Projects
Status: Planned In Release 1.11
Development

No branches or pull requests

6 participants