Skip to content

Support selectively enabling/disabling individual plugins #1768

Closed
@another-rex

Description

@another-rex

Overview

Currently OSV-Scanner provides 2 presets of extractors, one for source lockfile scanning and one for artifact scanning. We want to add support for flags/config options that enable users to selectively choose which plugins and extractors to enable beyond the preset enabled extractors.

Details

This can be implemented as a list of extractors we can choose to enable, and we have pre-made presets names which allows you to enable a large number of plugins all at once.
By default, if no flag is passed in, we use the current presets we have. Once the user chooses plugins to enable, the presets no longer apply and only what the user selects are enabled.

If the user wants to keep the existing plugins, and just add on another plugin themselves, they can do that by choosing the original preset name + the new extractor.

CLI wise this can be implemented similar to how --call-analysis is implemented, instead with --plugins and --no-plugins (naming could use some work)

Tasks:

  • Create Plugin Lists: We need to create a list of all available plugins (combine the existing All list in OSV-Scalibr with OSV-Scanner specific plugins), and also lists of presets
  • Implement CLI interface change (similar to the --call-analysis and --no-call-analysis flags)
  • Implement Enabling and disabling the plugins
  • Update DoScan() API to accept list of enabled plugins.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions