Documentation
¶
Index ¶
- Constants
- func CreateRegistryOptions(registry *Registry) *image.RegistryOptions
- type Analyzer
- type AnalyzerTrivyConfig
- type AnalyzerTrivyConfigEx
- type Auth
- type Config
- type GrypeConfig
- type LocalGrypeConfig
- type LocalGrypeConfigEx
- type Mode
- type Registry
- type RemoteGrypeConfig
- type Scanner
- type ScannerTrivyConfig
- type ScannerTrivyConfigEx
- type SyftConfig
Constants ¶
Variables ¶
This section is empty.
Functions ¶
func CreateRegistryOptions ¶
func CreateRegistryOptions(registry *Registry) *image.RegistryOptions
Types ¶
type Analyzer ¶
type Analyzer struct {
OutputFormat string `yaml:"output_format" mapstructure:"output_format"`
AnalyzerList []string `yaml:"analyzer_list" mapstructure:"analyzer_list"`
Scope string `yaml:"scope" mapstructure:"scope"`
TrivyConfig AnalyzerTrivyConfig `yaml:"trivy_config" mapstructure:"trivy_config"`
}
TODO: maybe we need to extend the unified config.
type AnalyzerTrivyConfig ¶
type AnalyzerTrivyConfigEx ¶
type AnalyzerTrivyConfigEx struct {
Timeout time.Duration
CacheDir string
TempDir string
Registry *Registry
}
func CreateAnalyzerTrivyConfigEx ¶
func CreateAnalyzerTrivyConfigEx(analyzer *Analyzer, registry *Registry) AnalyzerTrivyConfigEx
type Config ¶
type GrypeConfig ¶
type GrypeConfig struct {
LocalGrypeConfig `yaml:"local_grype_config" mapstructure:"local_grype_config"`
RemoteGrypeConfig `yaml:"remote_grype_config" mapstructure:"remote_grype_config"`
Mode Mode `yaml:"mode" mapstructure:"mode"`
}
type LocalGrypeConfig ¶
type LocalGrypeConfig struct {
UpdateDB bool `yaml:"update_db" mapstructure:"update_db"`
DBRootDir string `yaml:"db_root_dir" mapstructure:"db_root_dir"` // Location to write the vulnerability database cache.
ListingURL string `yaml:"listing_url" mapstructure:"listing_url"` // URL of the vulnerability database.
MaxAllowedBuiltAge time.Duration `yaml:"max_allowed_built_age" mapstructure:"max_allowed_built_age"` // Period of time after which the database is considered stale.
ListingFileTimeout time.Duration `yaml:"listing_file_timeout" mapstructure:"listing_file_timeout"` // Timeout of grype's HTTP client used for downloading the listing file.
UpdateTimeout time.Duration `yaml:"update_timeout" mapstructure:"update_timeout"` // Timeout of grype's HTTP client used for downloading the database.
Scope source.Scope `yaml:"scope" mapstructure:"scope"` // indicates "how" or from "which perspectives" the source object should be cataloged from.
}
type LocalGrypeConfigEx ¶
type LocalGrypeConfigEx struct {
LocalGrypeConfig
RegistryOptions *image.RegistryOptions
}
func ConvertToLocalGrypeConfig ¶
func ConvertToLocalGrypeConfig(scanner *Scanner, registry *Registry) LocalGrypeConfigEx
type RemoteGrypeConfig ¶
type RemoteGrypeConfig struct {
GrypeServerAddress string `yaml:"grype_server_address" mapstructure:"grype_server_address"`
GrypeServerSchemes []string `yaml:"grype_server_schemes" mapstructure:"grype_server_schemes"`
GrypeServerTimeout time.Duration `yaml:"grype_server_timeout" mapstructure:"grype_server_timeout"`
}
type Scanner ¶
type Scanner struct {
ScannersList []string `yaml:"scanners_list" mapstructure:"scanners_list"`
GrypeConfig GrypeConfig `yaml:"grype_config" mapstructure:"grype_config"`
TrivyConfig ScannerTrivyConfig `yaml:"trivy_config" mapstructure:"trivy_config"`
}
type ScannerTrivyConfig ¶
type ScannerTrivyConfigEx ¶
type ScannerTrivyConfigEx struct {
Timeout time.Duration
CacheDir string
TempDir string
ServerAddr string
ServerToken string
Registry *Registry
}
func CreateScannerTrivyConfigEx ¶
func CreateScannerTrivyConfigEx(scanner *Scanner, registry *Registry) ScannerTrivyConfigEx
type SyftConfig ¶
type SyftConfig struct {
Scope source.Scope
RegistryOptions *image.RegistryOptions
}
TODO: maybe we need to extend syft confg.
func CreateSyftConfig ¶
func CreateSyftConfig(analyzer *Analyzer, registry *Registry) SyftConfig
Click to show internal directories.
Click to hide internal directories.