Documentation
¶
Overview ¶
Package binary provides a concrete cataloger implementations for surfacing possible packages based on signatures found within binary files.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewClassifierCataloger ¶ added in v0.105.0
func NewClassifierCataloger(cfg ClassifierCatalogerConfig) pkg.Cataloger
func NewELFPackageCataloger ¶ added in v1.1.0
Types ¶
type Classifier ¶ added in v0.100.0
type Classifier struct { Class string `json:"class"` // FileGlob is a selector to narrow down file inspection using the **/glob* syntax FileGlob string `json:"fileGlob"` // EvidenceMatcher is what will be used to match against the file in the source // location. If the matcher returns a package, the file will be considered a candidate. EvidenceMatcher EvidenceMatcher `json:"-"` // Package is the name to use for the package Package string `json:"package"` // PURL is the Package URL to use when generating a package PURL packageurl.PackageURL `json:"purl"` // CPEs are the specific CPEs we want to include for this binary with updated version information CPEs []cpe.CPE `json:"cpes"` }
Classifier is a generic package classifier that can be used to match a package definition to a file that meets the given content criteria of the EvidenceMatcher.
func DefaultClassifiers ¶ added in v0.100.0
func DefaultClassifiers() []Classifier
func (Classifier) MarshalJSON ¶ added in v0.101.0
func (cfg Classifier) MarshalJSON() ([]byte, error)
type ClassifierCatalogerConfig ¶ added in v0.105.0
type ClassifierCatalogerConfig struct {
Classifiers []Classifier `yaml:"classifiers" json:"classifiers" mapstructure:"classifiers"`
}
func DefaultClassifierCatalogerConfig ¶ added in v0.105.0
func DefaultClassifierCatalogerConfig() ClassifierCatalogerConfig
func (ClassifierCatalogerConfig) MarshalJSON ¶ added in v0.105.0
func (cfg ClassifierCatalogerConfig) MarshalJSON() ([]byte, error)
type EvidenceMatcher ¶ added in v0.100.0
type EvidenceMatcher func(classifier Classifier, context matcherContext) ([]pkg.Package, error)
EvidenceMatcher is a function called to catalog Packages that match some sort of evidence
func FileContentsVersionMatcher ¶ added in v0.100.0
func FileContentsVersionMatcher(pattern string) EvidenceMatcher
Source Files
¶
Click to show internal directories.
Click to hide internal directories.