-
Notifications
You must be signed in to change notification settings - Fork 603
🌱 New check: Releases have no direct dependencies with known vulnerabilities #4876
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
base: main
Are you sure you want to change the base?
Conversation
…ilities Signed-off-by: Adam Korczynski <adam@adalogics.com>
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #4876 +/- ##
==========================================
+ Coverage 66.80% 67.73% +0.92%
==========================================
Files 230 255 +25
Lines 16602 16231 -371
==========================================
- Hits 11091 10994 -97
+ Misses 4808 4354 -454
- Partials 703 883 +180 🚀 New features to boost your workflow:
|
Any reason why you dont use osv-scanner for steps 4-5? Which is essentially a wrapper over osv-scalibr and osv.dev already? I'm also not sure of the limitation to direct dependencies here. I think there are obviously similarities to the Vulnerabilities check, but instead of "are there any vulns now", the question is "Does this project have some process to avoid vulns when releases are made". Is that enough of a difference to warrant a separate check? |
|
This pull request has been marked stale because it has been open for 10 days with no activity |
|
This pull request has been marked stale because it has been open for 10 days with no activity |
I will look into the feasibility of that.
IMO this should fit into the Vulnerabilities check. I think the main hurdle for that is to decide how the scoring should be changed. |
|
This pull request has been marked stale because it has been open for 10 days with no activity |
|
This pull request has been marked stale because it has been open for 10 days with no activity |
What kind of change does this PR introduce?
New check
PR title follows the guidelines defined in our pull request documentation
Tests for the changes have been added (for bug fixes/features)
Special notes for your reviewer
This PR adds a new check which analyzes a projects release history and looks for vulnerabilities in the direct dependencies of a project that were known at the time of release. A project can score 10 if none of its max 10 most recent releases had known vulnerabilities at the time of each release. This check will encourage projects to remove all known vulnerabilities from its direct dependencies which will lead to more secure products for downstream users. In addition, some security frameworks require that releases don't contain known vulnerabilities.
Under the hood, the check works like this:
Later, we can add a mechanism that checks if projects have SBOMs that describe whether a project is actually affected by known vulnerabilities as a way to give projects more control.
To test this with debugging:
RELEASES_DEPS_DEBUG=1 SCALIBR_DEBUG=1 go run main.go --repo=https://github.com/owner/repo --checks=ReleasesDirectDepsVulnFreeDoes this PR introduce a user-facing change?
Yes