Documentation ¶
Index ¶
- func Provide(userInput string, config ProviderConfig) ([]Package, Context, *sbom.SBOM, error)
- type Context
- type Digest
- type GolangBinMetadata
- type GolangModMetadata
- type ID
- type JavaMetadata
- type MetadataType
- type Package
- type ProviderConfig
- type RpmMetadata
- type SyftProviderConfig
- type SynthesisConfig
- type UpstreamPackage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type GolangBinMetadata ¶ added in v0.43.0
type GolangModMetadata ¶ added in v0.56.0
type GolangModMetadata struct {
H1Digest string `json:"h1Digest,omitempty"`
}
type ID ¶
type ID string
ID represents a unique value for each package added to a package collection.
type JavaMetadata ¶
type MetadataType ¶ added in v0.33.0
type MetadataType string
MetadataType represents the data shape stored within pkg.Package.Metadata.
const ( UnknownMetadataType MetadataType = "UnknownMetadata" JavaMetadataType MetadataType = "JavaMetadata" RpmMetadataType MetadataType = "RpmMetadata" GolangBinMetadataType MetadataType = "GolangBinMetadata" GolangModMetadataType MetadataType = "GolangModMetadata" )
type Package ¶
type Package struct { ID ID Name string // the package name Version string // the version of the package Locations source.LocationSet // the locations that lead to the discovery of this package (note: this is not necessarily the locations that make up this package) Language pkg.Language // the language ecosystem this package belongs to (e.g. JavaScript, Python, etc) Licenses []string Type pkg.Type // the package type (e.g. Npm, Yarn, Python, Rpm, Deb, etc) CPEs []cpe.CPE // all possible Common Platform Enumerators PURL string // the Package URL (see https://github.com/package-url/purl-spec) Upstreams []UpstreamPackage MetadataType MetadataType Metadata interface{} // This is NOT 1-for-1 the syft metadata! Only the select data needed for vulnerability matching }
Package represents an application or library that has been bundled into a distributable format.
func FromCollection ¶ added in v0.62.0
func FromCollection(catalog *pkg.Collection, config SynthesisConfig) []Package
func FromPackages ¶ added in v0.54.0
func FromPackages(syftpkgs []pkg.Package, config SynthesisConfig) []Package
func UpstreamPackages ¶ added in v0.33.0
type ProviderConfig ¶ added in v0.30.0
type ProviderConfig struct { SyftProviderConfig SynthesisConfig }
type RpmMetadata ¶ added in v0.50.0
type SyftProviderConfig ¶ added in v0.54.0
type SynthesisConfig ¶ added in v0.54.0
type SynthesisConfig struct {
GenerateMissingCPEs bool
}
type UpstreamPackage ¶ added in v0.33.0
Source Files ¶
Click to show internal directories.
Click to hide internal directories.