-
Notifications
You must be signed in to change notification settings - Fork 378
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
Allow offline vulnerability database and transitive resolution to be enabled/disabled separately. #1339
Comments
I think we still should follow the assumption not to make network requests with Maybe make this flag to take a string:
|
+1! But I'd rename |
Hm, the desired behaviour seems impossible with urfave/cli: # using cli.StringFlag
# original behaviour is broken:
> osv-scanner scan --experimental-offline
flag needs an argument: -experimental-offline
> osv-scanner scan --experimental-offline --experimental-download-offline-databases
experimental-offline = "--experimental-download-offline-databases"
experimental-download-offline-databases = false
# now the string is always required:
> osv-scanner scan --experimental-offline all
experimental-offline = "all"
> osv-scanner scan --experimental-offline=vulnerability
experimental-offline = "vulnerability"
> osv-scanner scan --experimental-offline=
experimental-offline = "" Personally, I'd prefer to keep the How about adding new flags e.g. |
SGTM, this seems pretty reasonable. Now that I think about it, I think we also discovered we couldn't have an empty string work as "all" by default for |
SGTM as well - I am leaning to have |
Yeah, I think we can't directly pass an empty string value to a |
Interesting, but since we didn't go with this for |
Currently, enabling offline mode (
--experimental-offline
) in scanning makes the scanner use a local vulnerability database and disables transitive dependency resolution for Maven pom.xml files.But there are use cases for having one and not the other, i.e.
With #1286 adding the
--experimental-resolution-data-source
flag, we could allow setting this tonone
ordisable
to disable transitive resolution, and make the--experimental-offline
flag affect only the vulnerability database. (But that would mean 'offline mode' may still attempt to make network requests...)The text was updated successfully, but these errors were encountered: