Documentation
¶
Overview ¶
Package filter provides an annotator that filters out unscannable, non-container-relevant, or ignored packages from the scan results before matching begins.
Index ¶
- Constants
- type Annotator
- func (a *Annotator) Annotate(_ context.Context, _ *annotator.ScanInput, results *inventory.Inventory) error
- func (a *Annotator) FilteredPackages() []*extractor.Package
- func (a *Annotator) Name() string
- func (a *Annotator) PreFilteredPackageCount() int
- func (a *Annotator) Requirements() *plugin.Capabilities
- func (a *Annotator) Version() int
Constants ¶
View Source
const ( // Name is the unique name of this annotator. Name = "osv-scanner/filter" // Version is the version of this annotator. Version = 0 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Annotator ¶
type Annotator struct {
// contains filtered or unexported fields
}
Annotator implements annotator.Annotator to filter packages.
func NewAnnotator ¶
func NewAnnotator(configManager *config.Manager, isContainerScan bool, showAllPackages bool) *Annotator
NewAnnotator returns a new Annotator.
func (*Annotator) Annotate ¶
func (a *Annotator) Annotate(_ context.Context, _ *annotator.ScanInput, results *inventory.Inventory) error
Annotate filters the package list inside the inventory.
func (*Annotator) FilteredPackages ¶
FilteredPackages returns the list of packages filtered out that should be preserved.
func (*Annotator) PreFilteredPackageCount ¶
PreFilteredPackageCount returns the number of packages found before filtering.
func (*Annotator) Requirements ¶
func (a *Annotator) Requirements() *plugin.Capabilities
Requirements returns the requirements of this annotator.
Click to show internal directories.
Click to hide internal directories.