-
Notifications
You must be signed in to change notification settings - Fork 567
🌱 Add utils for retrieving data about project dependencies #4711
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
Signed-off-by: Adam Korczynski <adam@adalogics.com>
316f846
to
700e6fd
Compare
55fb747
to
7c01af5
Compare
Signed-off-by: Adam Korczynski <adam@adalogics.com>
7c01af5
to
caa6ec3
Compare
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #4711 +/- ##
==========================================
+ Coverage 66.80% 68.29% +1.48%
==========================================
Files 230 250 +20
Lines 16602 19013 +2411
==========================================
+ Hits 11091 12984 +1893
- Misses 4808 5160 +352
- Partials 703 869 +166 🚀 New features to boost your workflow:
|
Adding support for this can also help with #1174 |
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 |
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 feature
(Is it a bug fix, feature, docs update, something else?)
What is the current behavior?
Currently, Scorecard cannot reason over dependencies in lock files.
What is the new behavior (if this is a feature change)?**
This adds utilities for reasoning over dependencies in lock files. Specifically, it adds support for the following files:
package-lock.json
package.json
pom.xml
go.mod
requirements.txt
The goal is over time to add support for more file types. osv-scalibr parses a lot more formats, however, it does not parse the dependencies of all formats that we need. I would like to work on adding this to osv-scalibr as it seems like a win for osv-scalibr and a win for Scorecard to have that there. It have started identifying missing pieces in google/osv-scalibr#907.
In addition, this PR adds a utility function for comparing the version of a dependency against the definition of another. This is important for implementing #2458 and gives a good picture of how I will solve this probe. Here is an overview:
Which issue(s) this PR fixes
This is part of ongoing work on #2458
Other PRs in this ongoing work are:
Special notes for your reviewer
Does this PR introduce a user-facing change?
NONE (yet).
Currently, the code is not exposed in any user-facing functionality and as such is dead code. The goal is to get these dependency parsing routines to cover a wide range of ecosystems (we can get a lot from using osv-scalibr: https://github.com/google/osv-scalibr/tree/main/extractor/filesystem/language) and then expose this in a probe for #2458.