Documentation ¶
Index ¶
- type Attest
- type Cache
- type Catalog
- func (cfg *Catalog) AddFlags(flags clio.FlagSet)
- func (cfg *Catalog) DescribeFields(descriptions fangs.FieldDescriptionSet)
- func (cfg *Catalog) PostLoad() error
- func (cfg Catalog) ToComplianceConfig() cataloging.ComplianceConfig
- func (cfg Catalog) ToFilesConfig() filecataloging.Config
- func (cfg Catalog) ToPackagesConfig() pkgcataloging.Config
- func (cfg Catalog) ToRelationshipsConfig() cataloging.RelationshipsConfig
- func (cfg Catalog) ToSBOMConfig(id clio.Identification) *syft.CreateSBOMConfig
- func (cfg Catalog) ToSearchConfig() cataloging.SearchConfig
- func (cfg Catalog) ToUnknownsConfig() cataloging.UnknownsConfig
- type Config
- type Format
- type FormatCyclonedxJSON
- type FormatCyclonedxXML
- type FormatSPDXJSON
- type FormatSyftJSON
- type FormatTemplate
- type Output
- type OutputFiledeprecated
- type RegistryCredentials
- type UpdateCheck
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Attest ¶
type Attest struct { // IMPORTANT: do not show the attestation key/password in any YAML/JSON output (sensitive information) Key secret `yaml:"key" json:"key" mapstructure:"key"` Password secret `yaml:"password" json:"password" mapstructure:"password"` }
func (*Attest) DescribeFields ¶ added in v1.5.0
func (o *Attest) DescribeFields(descriptions clio.FieldDescriptionSet)
type Cache ¶ added in v1.7.0
type Cache struct { Dir string `yaml:"dir" mapstructure:"dir"` TTL string `yaml:"ttl" mapstructure:"ttl"` }
Cache provides configuration for the Syft caching behavior
func DefaultCache ¶ added in v1.7.0
func DefaultCache() Cache
func (*Cache) DescribeFields ¶ added in v1.7.0
func (c *Cache) DescribeFields(descriptions clio.FieldDescriptionSet)
type Catalog ¶
type Catalog struct { // high-level cataloger configuration Catalogers []string `yaml:"-" json:"catalogers" mapstructure:"catalogers"` // deprecated and not shown in yaml output DefaultCatalogers []string `yaml:"default-catalogers" json:"default-catalogers" mapstructure:"default-catalogers"` SelectCatalogers []string `yaml:"select-catalogers" json:"select-catalogers" mapstructure:"select-catalogers"` Package packageConfig `yaml:"package" json:"package" mapstructure:"package"` File fileConfig `yaml:"file" json:"file" mapstructure:"file"` Scope string `yaml:"scope" json:"scope" mapstructure:"scope"` Parallelism int `yaml:"parallelism" json:"parallelism" mapstructure:"parallelism"` // the number of catalog workers to run in parallel Relationships relationshipsConfig `yaml:"relationships" json:"relationships" mapstructure:"relationships"` Compliance complianceConfig `yaml:"compliance" json:"compliance" mapstructure:"compliance"` Enrich []string `yaml:"enrich" json:"enrich" mapstructure:"enrich"` // ecosystem-specific cataloger configuration Golang golangConfig `yaml:"golang" json:"golang" mapstructure:"golang"` Java javaConfig `yaml:"java" json:"java" mapstructure:"java"` JavaScript javaScriptConfig `yaml:"javascript" json:"javascript" mapstructure:"javascript"` LinuxKernel linuxKernelConfig `yaml:"linux-kernel" json:"linux-kernel" mapstructure:"linux-kernel"` Python pythonConfig `yaml:"python" json:"python" mapstructure:"python"` // configuration for the source (the subject being analyzed) Registry registryConfig `yaml:"registry" json:"registry" mapstructure:"registry"` From []string `yaml:"from" json:"from" mapstructure:"from"` Platform string `yaml:"platform" json:"platform" mapstructure:"platform"` Source sourceConfig `yaml:"source" json:"source" mapstructure:"source"` Exclusions []string `yaml:"exclude" json:"exclude" mapstructure:"exclude"` // configuration for inclusion of unknown information within elements Unknowns unknownsConfig `yaml:"unknowns" mapstructure:"unknowns"` }
func DefaultCatalog ¶
func DefaultCatalog() Catalog
func (*Catalog) DescribeFields ¶
func (cfg *Catalog) DescribeFields(descriptions fangs.FieldDescriptionSet)
func (Catalog) ToComplianceConfig ¶ added in v1.13.0
func (cfg Catalog) ToComplianceConfig() cataloging.ComplianceConfig
func (Catalog) ToFilesConfig ¶
func (cfg Catalog) ToFilesConfig() filecataloging.Config
func (Catalog) ToPackagesConfig ¶
func (cfg Catalog) ToPackagesConfig() pkgcataloging.Config
func (Catalog) ToRelationshipsConfig ¶
func (cfg Catalog) ToRelationshipsConfig() cataloging.RelationshipsConfig
func (Catalog) ToSBOMConfig ¶
func (cfg Catalog) ToSBOMConfig(id clio.Identification) *syft.CreateSBOMConfig
func (Catalog) ToSearchConfig ¶
func (cfg Catalog) ToSearchConfig() cataloging.SearchConfig
func (Catalog) ToUnknownsConfig ¶ added in v1.14.0
func (cfg Catalog) ToUnknownsConfig() cataloging.UnknownsConfig
type Config ¶
type Config struct {
ConfigFile string `yaml:"config" json:"config" mapstructure:"config"`
}
Config holds a reference to the specific config file(s) that were used to load application configuration
func (*Config) DescribeFields ¶
func (cfg *Config) DescribeFields(descriptions fangs.FieldDescriptionSet)
type Format ¶
type Format struct { Pretty *bool `yaml:"pretty" json:"pretty" mapstructure:"pretty"` Template FormatTemplate `yaml:"template" json:"template" mapstructure:"template" description:"all template format options"` SyftJSON FormatSyftJSON `yaml:"json" json:"json" mapstructure:"json" description:"all syft-json format options"` SPDXJSON FormatSPDXJSON `yaml:"spdx-json" json:"spdx-json" mapstructure:"spdx-json" description:"all spdx-json format options"` CyclonedxJSON FormatCyclonedxJSON `yaml:"cyclonedx-json" json:"cyclonedx-json" mapstructure:"cyclonedx-json" description:"all cyclonedx-json format options"` CyclonedxXML FormatCyclonedxXML `yaml:"cyclonedx-xml" json:"cyclonedx-xml" mapstructure:"cyclonedx-xml" description:"all cyclonedx-xml format options"` }
Format contains all user configuration for output formatting.
func DefaultFormat ¶
func DefaultFormat() Format
func (*Format) DescribeFields ¶ added in v1.5.0
func (o *Format) DescribeFields(descriptions clio.FieldDescriptionSet)
type FormatCyclonedxJSON ¶
type FormatCyclonedxJSON struct {
Pretty *bool `yaml:"pretty" json:"pretty" mapstructure:"pretty"`
}
func DefaultFormatCyclonedxJSON ¶
func DefaultFormatCyclonedxJSON() FormatCyclonedxJSON
type FormatCyclonedxXML ¶
type FormatCyclonedxXML struct {
Pretty *bool `yaml:"pretty" json:"pretty" mapstructure:"pretty"`
}
func DefaultFormatCyclonedxXML ¶
func DefaultFormatCyclonedxXML() FormatCyclonedxXML
type FormatSPDXJSON ¶
type FormatSPDXJSON struct {
Pretty *bool `yaml:"pretty" json:"pretty" mapstructure:"pretty"`
}
func DefaultFormatSPDXJSON ¶
func DefaultFormatSPDXJSON() FormatSPDXJSON
type FormatSyftJSON ¶
type FormatSyftJSON struct { Legacy bool `yaml:"legacy" json:"legacy" mapstructure:"legacy"` Pretty *bool `yaml:"pretty" json:"pretty" mapstructure:"pretty"` }
func DefaultFormatJSON ¶
func DefaultFormatJSON() FormatSyftJSON
type FormatTemplate ¶
type FormatTemplate struct { Enabled bool `yaml:"-" json:"-" mapstructure:"-"` Path string `yaml:"path" json:"path" mapstructure:"path"` // -t template file to use for output Legacy bool `yaml:"legacy" json:"legacy" mapstructure:"legacy"` }
func DefaultFormatTemplate ¶
func DefaultFormatTemplate() FormatTemplate
func (*FormatTemplate) AddFlags ¶
func (o *FormatTemplate) AddFlags(flags clio.FlagSet)
type Output ¶
type Output struct { AllowableOptions []string `yaml:"-" json:"-" mapstructure:"-"` AllowMultipleOutputs bool `yaml:"-" json:"-" mapstructure:"-"` AllowToFile bool `yaml:"-" json:"-" mapstructure:"-"` Outputs []string `yaml:"output" json:"output" mapstructure:"output"` // -o, the format to use for output OutputFile `yaml:",inline" json:"" mapstructure:",squash"` Format `yaml:"format" json:"format" mapstructure:"format"` }
Output has the standard output options syft accepts: multiple -o, --file, --template
func DefaultOutput ¶
func DefaultOutput() Output
func (*Output) DescribeFields ¶ added in v1.5.0
func (o *Output) DescribeFields(descriptions clio.FieldDescriptionSet)
func (Output) OutputNameSet ¶
type OutputFile
deprecated
type OutputFile struct { Enabled bool `yaml:"-" json:"-" mapstructure:"-"` LegacyFile string `yaml:"-" json:"-" mapstructure:"legacyFile"` }
Deprecated: OutputFile supports the --file to write the SBOM output to
func (*OutputFile) AddFlags ¶
func (o *OutputFile) AddFlags(flags clio.FlagSet)
func (*OutputFile) PostLoad ¶
func (o *OutputFile) PostLoad() error
func (*OutputFile) SBOMWriter ¶
func (o *OutputFile) SBOMWriter(f sbom.FormatEncoder) (sbom.Writer, error)
type RegistryCredentials ¶
type RegistryCredentials struct { Authority string `yaml:"authority" json:"authority" mapstructure:"authority"` // IMPORTANT: do not show any credential information, use secret type to automatically redact the values Username secret `yaml:"username" json:"username" mapstructure:"username"` Password secret `yaml:"password" json:"password" mapstructure:"password"` Token secret `yaml:"token" json:"token" mapstructure:"token"` TLSCert string `yaml:"tls-cert,omitempty" json:"tls-cert,omitempty" mapstructure:"tls-cert"` TLSKey string `yaml:"tls-key,omitempty" json:"tls-key,omitempty" mapstructure:"tls-key"` }
type UpdateCheck ¶
type UpdateCheck struct {
CheckForAppUpdate bool `yaml:"check-for-app-update" json:"check-for-app-update" mapstructure:"check-for-app-update"` // whether to check for an application update on start up or not
}
func DefaultUpdateCheck ¶
func DefaultUpdateCheck() UpdateCheck
func (*UpdateCheck) DescribeFields ¶
func (cfg *UpdateCheck) DescribeFields(descriptions fangs.FieldDescriptionSet)
Source Files ¶
- attest.go
- cache.go
- catalog.go
- compliance.go
- config.go
- file.go
- format.go
- format_cyclonedx_json.go
- format_cyclonedx_xml.go
- format_spdx_json.go
- format_syft_json.go
- format_template.go
- golang.go
- java.go
- javascript.go
- linux_kernel.go
- output.go
- output_file.go
- pkg.go
- python.go
- registry.go
- relationships.go
- secret.go
- source.go
- unknowns.go
- update_check.go
- writer.go
Click to show internal directories.
Click to hide internal directories.