Documentation
¶
Overview ¶
Package osv provides a Wrapper for osv plugins.
Index ¶
- func WrapInput(input *filesystem.ScanInput) lockfile.DepFile
- type DepGroupMetadata
- type DepGroups
- type Metadata
- type Wrapper
- func (e Wrapper) Ecosystem(i *extractor.Inventory) string
- func (e Wrapper) Extract(ctx context.Context, input *filesystem.ScanInput) ([]*extractor.Inventory, error)
- func (e Wrapper) FileRequired(api filesystem.FileAPI) bool
- func (e Wrapper) Name() string
- func (e Wrapper) Requirements() *plugin.Capabilities
- func (e Wrapper) ToPURL(i *extractor.Inventory) *purl.PackageURL
- func (e Wrapper) Version() int
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DepGroupMetadata ¶ added in v0.1.3
type DepGroupMetadata struct {
DepGroupVals []string
}
DepGroupMetadata is a metadata struct that only supports DepGroups
func (DepGroupMetadata) DepGroups ¶ added in v0.1.3
func (dgm DepGroupMetadata) DepGroups() []string
DepGroups return the dependency groups property in the metadata
type DepGroups ¶ added in v0.1.3
type DepGroups interface {
DepGroups() []string
}
DepGroups provides access to the list of dependency groups an inventory item belongs to. Dependency groups are used by many language package managers as a way to organize dependencies (e.g. development dependencies will be in the "dev" group)
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) Ecosystem ¶ added in v0.1.3
Ecosystem returns the OSV Ecosystem of the software extracted by this 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 ¶
func (e Wrapper) FileRequired(api filesystem.FileAPI) bool
FileRequired returns true if the specified file matches the extractor pattern.
func (Wrapper) Requirements ¶ added in v0.1.3
func (e Wrapper) Requirements() *plugin.Capabilities
Requirements of the extractor.