Documentation
¶
Overview ¶
Package cargoauditable extracts dependencies from cargo auditable inside rust binaries.
Index ¶
- type Config
- type Extractor
- func (e Extractor) Ecosystem(_ *extractor.Inventory) string
- func (e Extractor) Extract(ctx context.Context, input *filesystem.ScanInput) ([]*extractor.Inventory, error)
- func (e Extractor) FileRequired(api filesystem.FileAPI) bool
- func (e Extractor) Name() string
- func (e Extractor) Requirements() *plugin.Capabilities
- func (e Extractor) ToPURL(i *extractor.Inventory) *purl.PackageURL
- func (e Extractor) Version() int
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { // Stats is a stats collector for reporting metrics. Stats stats.Collector // MaxFileSizeBytes is the maximum size of a file that can be extracted. // If this limit is greater than zero and a file is encountered that is larger // than this limit, the file is ignored by returning false for `FileRequired`. MaxFileSizeBytes int64 // ExtractBuildDependencies is whether to extract build dependencies or only runtime ones. ExtractBuildDependencies bool }
Config is the configuration for the Extractor.
func DefaultConfig ¶
func DefaultConfig() Config
DefaultConfig returns a default configuration for the extractor.
type Extractor ¶
type Extractor struct {
// contains filtered or unexported fields
}
Extractor for extracting dependencies from cargo auditable inside rust binaries.
func New ¶
New returns a Cargo Auditable extractor.
For most use cases, initialize with: ``` e := New(DefaultConfig()) ```
func (Extractor) Ecosystem ¶
Ecosystem returns the OSV ecosystem ('crates.io') of the software extracted by this extractor.
func (Extractor) Extract ¶
func (e Extractor) Extract(ctx context.Context, input *filesystem.ScanInput) ([]*extractor.Inventory, error)
Extract extracts packages from cargo auditable inside rust binaries.
func (Extractor) FileRequired ¶
func (e Extractor) FileRequired(api filesystem.FileAPI) bool
FileRequired returns true if the specified file is marked executable.
func (Extractor) Requirements ¶
func (e Extractor) Requirements() *plugin.Capabilities
Requirements for enabling the extractor.