-
Notifications
You must be signed in to change notification settings - Fork 372
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
feat: Add artifact extractors #1531
feat: Add artifact extractors #1531
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
// Patch python package names to be normalized | ||
if pkg.Ecosystem().Ecosystem == osvschema.EcosystemPyPI { | ||
// per https://peps.python.org/pep-0503/#normalized-names | ||
return strings.ToLower(cachedregexp.MustCompile(`[-_.]+`).ReplaceAllLiteralString(pkg.Inventory.Name, "-")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we add a TODO to remove this after the API query change is deployed to production?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep good catch, I'll probably remove this entirely since I don't plan on merging this PR in until next week.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm it looks like there's more work to be done here:
- Offline scanning also needs to this normalization
- The code for identifying fix available/not available also needs this change.
Added a TODO.
a459e05
to
75a1dba
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1531 +/- ##
==========================================
+ Coverage 68.98% 69.18% +0.20%
==========================================
Files 200 200
Lines 18961 18988 +27
==========================================
+ Hits 13080 13137 +57
+ Misses 5162 5141 -21
+ Partials 719 710 -9 ☔ View full report in Codecov by Sentry. |
Adds the python wheel.egg and java jar archive extractors.
renames artifacts source from lockfile to artifact, so output will actually be "artifact:".
Reenable some of the image scanning tests accidentally removed from a previous PR. The unrelated snapshot changes will be from that.
This PR is not ready to be merged in yet, waiting on a osv-scalibr change to be merged in first. (google/osv-scalibr#407)