google / osv-scanner

Vulnerability scanner written in Go which uses the data provided by https://osv.dev
https://google.github.io/osv-scanner/
Apache License 2.0
6.02k stars 337 forks source link

Refactor deps.dev clients #1009

Open cuixq opened 1 month ago

cuixq commented 1 month ago

Currently there are multiple places that we make a deps.dev client:

Instead of having multiple places of deps.dev clients, we probably should consolidate them into one place (for example pkg/depsdev) and make all the places to depend on that package.

Also, currently in pkg/depsdev/license.go, responses from deps.dev are already processed to specific data structures, maybe we should keep the responses as what they were and process them in the caller depending on what we need.