-
Notifications
You must be signed in to change notification settings - Fork 530
Open
Description
Related: #2327
Right now in:
osv-scanner/pkg/osvscanner/scan.go
Lines 93 to 103 in f155607
| plugins := scalibrplugin.Resolve(actions.PluginsEnabled, actions.PluginsDisabled) | |
| // TODO: Use Enricher.RequiredPlugins to check this generically | |
| if !actions.TransitiveScanning.Disabled && isRequirementsExtractorEnabled(plugins) { | |
| p, err := transitivedependencyrequirements.New(&cpb.PluginConfig{ | |
| UserAgent: actions.RequestUserAgent, | |
| }) | |
| if err != nil { | |
| log.Errorf("Failed to make transitivedependencyrequirements enricher: %v", err) | |
| } else { | |
| plugins = append(plugins, p) |
it forcibly enables the transitive plugins.
I think we need to rework this logic a bit, right now I think a viable solution is:
- Put all the transitive enrichers into a preset
- If transitive scanning is not disabled, add that preset to the list of enabled plugins (or default to having it in the list of enabled, and disable the preset of transitive scanning is disabled.)
- All plugin in resolve should check its requirements, and remove itself if from the list of enabled plugins if it does not have the prereqs. (This is the TODO comment basically)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels