-
Notifications
You must be signed in to change notification settings - Fork 496
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
BUG: Dependency-Pinning Scoring #3254
Comments
/cc @gabibguti |
+1 I think this could be converted to some proportional logic (e.g. x / y dependencies are pinned), or keep the equal split approach we have now, but only consider repos with dependencies present. |
Similarly I don't think we need an |
I will work on this next. As commented:
First, I will work on getting the dependencies count for each ecossystem. Second, use this counting to know if the project depends or not on that ecosystem and only count ecossystems it depends on. As a next step we could do a proportional score for each ecossystem as described in #2582. |
Hmm, I lean slightly towards the proportional approach. Consider a NPM repo with one Go tool they install in their CI: Let's say there are 1000 dependencies, and none are pinned. And the Go dependency is pinned. Should that score a 0 (1/1001), or a 5 (average of 0 and 10)? Happy to hear other thoughts |
Ah, good point, I believe 0 represents better the scenario. So I agree on averaging all dependencies. |
Describe the bug
The Dependency-Pinning Scoring is taking into account all ecosystems, even if there is no evidence for them in a repository.
For instance, if a repo only contains a single shell script with a single line "pip install -r requirements.txt", the pinned-dependency score for that repo will by 8/10.
To get to a score of 0/10, means that all ecosystems that are known by scorecard exist in the repo, at the same time, and all checks for unpinned dependencies for those ecosystems report for unpinned dependencies. That seems like an edge case, at best.
Reproduction steps
Steps to reproduce the behavior:
Expected behavior
It is expected that the scoring is normalized only for the ecosystems that are actually found in the repository. so that a repository is only measured on the technology stacks that the repo actually implements.
Examples:
Additional context
The root cause seems to be that raw dependency checks do not differentiate between not finding unpinned dependencies for an ecosystem (score 10), and not finding any evidence of using dependencies of the ecosystem the check is for.
The text was updated successfully, but these errors were encountered: