Documentation ¶
Overview ¶
Package osv provides a Wrapper for osv plugins.
Index ¶
- func WrapInput(input *filesystem.ScanInput) lockfile.DepFile
- type Metadata
- type Wrapper
- func (e Wrapper) Extract(ctx context.Context, input *filesystem.ScanInput) ([]*extractor.Inventory, error)
- func (e Wrapper) FileRequired(path string, fileinfo fs.FileInfo) bool
- func (e Wrapper) Name() string
- func (e Wrapper) ToCPEs(i *extractor.Inventory) ([]string, error)
- func (e Wrapper) ToPURL(i *extractor.Inventory) (*purl.PackageURL, error)
- func (e Wrapper) Version() int
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Metadata ¶
Metadata holds parsing information for packages extracted by an OSV extractor wrapper.
type Wrapper ¶
type Wrapper struct { ExtractorName string ExtractorVersion int PURLType string Extractor lockfile.Extractor // Optional. A stats.Collector for reporting internal metrics. Stats stats.Collector // Optional. A config value for the maximum file size this extractor will // treat as required in `FileRequired`. MaxFileSizeBytes int64 }
Wrapper contains all the data to wrap a osv extractor to a scalibr extractor.
func (Wrapper) Extract ¶
func (e Wrapper) Extract(ctx context.Context, input *filesystem.ScanInput) ([]*extractor.Inventory, error)
Extract wraps the osv Extract method.
func (Wrapper) FileRequired ¶
FileRequired returns true if the specified file matches the extractor pattern.
func (Wrapper) ToCPEs ¶
ToCPEs is not applicable as this extractor does not infer CPEs from the Inventory.
Click to show internal directories.
Click to hide internal directories.