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

New check suggestion: Fork; is the repository a fork? #3223

Open
andrelmbackman opened this issue Jun 27, 2023 · 6 comments
Open

New check suggestion: Fork; is the repository a fork? #3223

andrelmbackman opened this issue Jun 27, 2023 · 6 comments
Labels
good first issue Good for newcomers kind/enhancement New feature or request kind/new-check New check for scorecard Stale

Comments

@andrelmbackman
Copy link
Contributor

andrelmbackman commented Jun 27, 2023

Is your feature request related to a problem? Please describe.
It would be nice to have the scorecard evaluate whether or not the repository is a fork, if it has a parent etc.
The security risk is that the project can be forked to a very similar name of the original and malicious code can be added(also called typosquatting).

Describe the solution you'd like
I would simply add a check called Fork which scores high if the repository is not a fork and low if it is. Go-github has a Fork boolean in one of its structs as well as Parent and Source pointers, these would be utilized.

Describe alternatives you've considered
Adding this functionality to the Client. That way it could be implemented in a probe, instead of making a completely new check.

@andrelmbackman andrelmbackman added the kind/enhancement New feature or request label Jun 27, 2023
@andrelmbackman andrelmbackman changed the title Fork check, is the repository a fork? New check suggestion: Fork; is the repository a fork? Jun 28, 2023
@laurentsimon
Copy link
Contributor

laurentsimon commented Jun 30, 2023

Thanks for the issue.

Given the description of Scorecard in https://github.com/ossf/scorecard#what-is-scorecard, I'm curious if "fork" is a best practice with a remediation for maintainers, or if the goal if mostly to detect malicious repository - which is out of scope of Scorecard.

One possibility could be to report the information as part of repository metadata https://github.com/ossf/scorecard/blob/main/pkg/scorecard_result.go#L55 instead. The metadata is a list, and should probably replaced by a map {isFork: true, etc}.

Or, if we want to have backward compatibility, maybe add it in repo https://github.com/ossf/scorecard/blob/main/pkg/scorecard_result.go#L41?

@spencerschrock
Copy link
Contributor

I think we would be reliant on GitHub for detection, and there's ways to make forks without keeping that metadata, so I'm not sure how useful it would be.

@spencerschrock spencerschrock added the kind/new-check New check for scorecard label Aug 18, 2023
@github-actions
Copy link

This issue is stale because it has been open for 60 days with no activity.

Copy link

This issue is stale because it has been open for 60 days with no activity.

Copy link

This issue has been marked stale because it has been open for 60 days with no activity.

@github-actions github-actions bot added the Stale label May 16, 2024
@raghavkaul
Copy link
Contributor

Duplicate of #2352 - both may be addressed by starting with an isFork probe.

@raghavkaul raghavkaul added the good first issue Good for newcomers label May 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers kind/enhancement New feature or request kind/new-check New check for scorecard Stale
Projects
Status: Backlog - New Checks
Development

No branches or pull requests

5 participants