filter

package
v2.7.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 9, 2026 License: Apache-2.0 Imports: 14 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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

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

func (a *Annotator) FilteredPackages() []*extractor.Package

FilteredPackages returns the list of packages filtered out that should be preserved.

func (*Annotator) Name

func (a *Annotator) Name() string

Name returns the unique name of the annotator.

func (*Annotator) PreFilteredPackageCount

func (a *Annotator) PreFilteredPackageCount() int

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.

func (*Annotator) Version

func (a *Annotator) Version() int

Version returns the version of the annotator.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL