-
Notifications
You must be signed in to change notification settings - Fork 343
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
Add support for determineversions API (#612). #621
Conversation
Tested on https://github.com/opencv/opencv We need to set up an e2e test for this as well (maybe add some submodules + vendored libs to https://github.com/ossf-tests/scorecard-check-osv-e2e). ``` Scanning dir /tmp/opencv Scanning /tmp/opencv/ at commit e9e6b1e22c1a966a81aca1217b16a51fe7311b3b Scanning directory for vendored libs: /tmp/opencv/3rdparty Scanning potential vendored dir: /tmp/opencv/3rdparty/carotene ... Scanning potential vendored dir: /tmp/opencv/3rdparty/libjpeg Identified /tmp/opencv/3rdparty/libjpeg as https://github.com/libjpeg-turbo/libjpeg-turbo at 9fc018fd1aa9598f21c9bc4d8d53c0cef007bdcf. Scanning potential vendored dir: /tmp/opencv/3rdparty/libjpeg-turbo Identified /tmp/opencv/3rdparty/libjpeg-turbo as https://github.com/libjpeg-turbo/libjpeg-turbo at c5f269eb9665435271c05fbcaf8721fa58e9eafa. Scanning potential vendored dir: /tmp/opencv/3rdparty/libpng ... Scanning potential vendored dir: /tmp/opencv/3rdparty/libwebp Identified /tmp/opencv/3rdparty/libwebp as https://chromium.googlesource.com/webm/libwebp at fd7bb21c0cb56e8a82e9bfa376164b842f433f3b. Scanning potential vendored dir: /tmp/opencv/3rdparty/openexr ... Scanning potential vendored dir: /tmp/opencv/3rdparty/zlib Scanning directory for vendored libs: /tmp/opencv/modules/core/3rdparty Scanning potential vendored dir: /tmp/opencv/modules/core/3rdparty/SoftFloat Scanning directory for vendored libs: /tmp/opencv/modules/features2d/3rdparty Scanning potential vendored dir: /tmp/opencv/modules/features2d/3rdparty/mscr Scanned /tmp/opencv/platforms/maven/opencv/pom.xml file and found 0 packages ... Scanned /tmp/opencv/platforms/maven/opencv-it/pom.xml file and found 12 packages ... +-------------------------------------+------+-----------+---------------------+---------------------+----------------------------------------------------------------------------------- | OSV URL | CVSS | ECOSYSTEM | PACKAGE | VERSION | SOURCE +-------------------------------------+------+-----------+---------------------+---------------------+----------------------------------------------------------------------------------- | https://osv.dev/OSV-2022-394 | | GIT | e9e6b1e22c1a966a81aca1217b16a51fe7311b3b | ../../../../../../tmp/opencv | https://osv.dev/OSV-2023-444 | | GIT | e9e6b1e22c1a966a81aca1217b16a51fe7311b3b | ../../../../../../tmp/opencv | https://osv.dev/CVE-2021-29390 | 7.1 | GIT | 9fc018fd1aa9598f21c9bc4d8d53c0cef007bdcf | ../../../../../../tmp/opencv/3rdparty/libjpeg | https://osv.dev/CVE-2021-46822 | 5.5 | GIT | 9fc018fd1aa9598f21c9bc4d8d53c0cef007bdcf | ../../../../../../tmp/opencv/3rdparty/libjpeg | https://osv.dev/CVE-2023-4863 | 8.8 | GIT | fd7bb21c0cb56e8a82e9bfa376164b842f433f3b | ../../../../../../tmp/opencv/3rdparty/libwebp ... ```
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.
LGTM, also it runs well locally.
nit: Should we add some comments for new functions?
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.
Some minor changes
Codecov Report
@@ Coverage Diff @@
## main #621 +/- ##
==========================================
- Coverage 80.33% 78.82% -1.52%
==========================================
Files 78 78
Lines 5406 5511 +105
==========================================
+ Hits 4343 4344 +1
- Misses 887 990 +103
- Partials 176 177 +1
|
Do we want this behind a flag rather than by default? It does significantly increase scanning time |
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.
LGTM! Just the flag question
Thanks for the fixes!
Hmm, we can always add this in if people ask for it. We can also optimize things using goroutines a you mention. It does make things slower, but only when they have these specific set of directories that likely indicate they're using vendored libs and would want this on by default. |
Fixes #612.
Tested on https://github.com/opencv/opencv
We need to set up an e2e test for this as well (maybe add some submodules + vendored libs to https://github.com/ossf-tests/scorecard-check-osv-e2e).