refactor: migrate vulnerability and license matching end-to-end to scalibr - #2935
Conversation
1075078 to
83c195f
Compare
…alibr This change completes the migration to use osv-scalibr end-to-end for scanning, filtering, and matching: - Remove vulnerability and license matchers from osv-scanner, delegating them to scalibr enrichers. - Move package filtering to a scalibr annotator plugin (osv-scanner/filter). - Implement scalibr ClientFactories for HTTP client and gRPC connection management. - Update osvscannerjson extractor to map ecosystem names to valid PURL types. - Clean up imodels and test logger handlers. agy
Update VCR recorder rules in testcmd to exclude binary file extensions (.zip, .gz, .db, etc.) from being recorded into cassettes, and update test snapshots accordingly. agy
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #2935 +/- ##
==========================================
+ Coverage 78.82% 79.37% +0.54%
==========================================
Files 122 118 -4
Lines 8360 8059 -301
==========================================
- Hits 6590 6397 -193
+ Misses 1383 1306 -77
+ Partials 387 356 -31 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
…d Body Update sortCassetteInteractions in testcmd/vcr.go to sort interactions belonging to the same test (X-Test-Name) secondary by Method, URL, and Body. agy
…reachArchive Skip the jars_can_be_scanned_with_call_analysis subtest using testutility.Skip in TestCommand_JavareachArchive. agy
f0e40f1 to
ea396ef
Compare
0065c21 to
346946e
Compare
| func (c *ClientFactories) GoogleHTTPClient(_ context.Context, _ ...string) (*http.Client, error) { | ||
| return nil, nil |
There was a problem hiding this comment.
Is this expected to be called by scalibr?
If not, should this panic or return an error (presumably if it doesn't return an error, it will panic anyway when something tries to use the nil client?)
There was a problem hiding this comment.
I guess not. I have this returning an error now. Someone could probably configure osv-scanner to call osv-scalibr in a way that would try to get the GoogleHTTPClient, but it's probably fine to just error in those cases.
- Update github.com/google/osv-scalibr to latest main commit - Set DisableGoogleAuth: true in PluginConfig to prevent unnecessary Google auth attempts and log warnings - Restore error return in ClientFactories.GoogleHTTPClient TAG=agy CONV=5862a67d-fb12-45b9-adc3-1c45d4a4783d
This PR migrates scanning, filtering, and matching in osv-scanner to use osv-scalibr end-to-end:
This is essentially the first part of #2934 split out into it's own PR.
agy