-
Notifications
You must be signed in to change notification settings - Fork 474
feat: Use OSV-Scalibr directly #2313
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
…l-osv-scalibr-scan
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #2313 +/- ##
==========================================
+ Coverage 67.94% 68.02% +0.08%
==========================================
Files 172 172
Lines 12849 12810 -39
==========================================
- Hits 8730 8714 -16
+ Misses 3447 3430 -17
+ Partials 672 666 -6 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
cuixq
left a comment
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.
Is there a particular reason that we want to specifically track the error of specified files? I feel the code to handle this makes the whole scan logic a bit harder to understand.
|
/gemini review |
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.
Code Review
This pull request is a significant and valuable refactoring that centralizes scanning logic by using OSV-Scalibr's Scan function directly. This simplifies the codebase and makes it more maintainable. The approach to handle different scan targets like directories, lockfiles, SBOMs, and git commits is much cleaner now. I've identified a couple of issues related to path handling in multi-root scan scenarios and error checking, for which I've provided detailed feedback and suggestions. Once these are addressed, this will be a solid improvement.
|
/gemini review |
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.
Code Review
This pull request is a significant and valuable refactoring that centralizes scanning logic by using OSV-Scalibr directly. The move away from custom lockfile extraction logic is a great simplification, and the improved error handling for user-specified file paths is a welcome enhancement for user experience. I've identified one high-severity issue related to the handling of the --recursive flag, which appears to be broken by these changes, and have provided a suggestion to address it. Overall, this is a solid improvement.
No more single lockfile extraction logic, just use the osv-scalibr scan function.
To keep the behaviour similar to what we currently have (mostly to make testing for the correct behaviour easier, we can change it later).
Some notes: