Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrApplicationConfigNotFound = fmt.Errorf("application config not found")
Functions ¶
This section is empty.
Types ¶
type Application ¶
type Application struct { ConfigPath string `yaml:",omitempty" json:"configPath"` // the location where the application config was read from (either from -c or discovered while loading) Output string `yaml:"output" json:"output" mapstructure:"output"` // -o, the Presenter hint string to use for report formatting File string `yaml:"file" json:"file" mapstructure:"file"` // --file, the file to write report output to Distro string `yaml:"distro" json:"distro" mapstructure:"distro"` // --distro, specify a distro to explicitly use GenerateMissingCPEs bool `yaml:"add-cpes-if-none" json:"add-cpes-if-none" mapstructure:"add-cpes-if-none"` // --add-cpes-if-none, automatically generate CPEs if they are not present in import (e.g. from a 3rd party SPDX document) OutputTemplateFile string `yaml:"output-template-file" json:"output-template-file" mapstructure:"output-template-file"` // -t, the template file to use for formatting the final report Quiet bool `yaml:"quiet" json:"quiet" mapstructure:"quiet"` // -q, indicates to not show any status output to stderr (ETUI or logging UI) 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 OnlyFixed bool `yaml:"only-fixed" json:"only-fixed" mapstructure:"only-fixed"` // only fail if detected vulns have a fix OnlyNotFixed bool `yaml:"only-notfixed" json:"only-notfixed" mapstructure:"only-notfixed"` // only fail if detected vulns don't have a fix Platform string `yaml:"platform" json:"platform" mapstructure:"platform"` // --platform, override the target platform for a container image CliOptions CliOnlyOptions `yaml:"-" json:"-"` Search search `yaml:"search" json:"search" mapstructure:"search"` Ignore []match.IgnoreRule `yaml:"ignore" json:"ignore" mapstructure:"ignore"` Exclusions []string `yaml:"exclude" json:"exclude" mapstructure:"exclude"` DB database `yaml:"db" json:"db" mapstructure:"db"` ExternalSources externalSources `yaml:"external-sources" json:"externalSources" mapstructure:"external-sources"` Match matchConfig `yaml:"match" json:"match" mapstructure:"match"` Dev development `yaml:"dev" json:"dev" mapstructure:"dev"` FailOn string `yaml:"fail-on-severity" json:"fail-on-severity" mapstructure:"fail-on-severity"` FailOnSeverity *vulnerability.Severity `yaml:"-" json:"-"` Registry registry `yaml:"registry" json:"registry" mapstructure:"registry"` Log logging `yaml:"log" json:"log" mapstructure:"log"` Attestation Attestation `yaml:"attestation" json:"attestation" mapstructure:"attestation"` }
func LoadApplicationConfig ¶ added in v0.23.0
func LoadApplicationConfig(v *viper.Viper, cliOpts CliOnlyOptions) (*Application, error)
func (Application) String ¶ added in v0.23.0
func (cfg Application) String() string
type Attestation ¶ added in v0.36.0
type CliOnlyOptions ¶
type RegistryCredentials ¶ added in v0.10.0
type RegistryCredentials struct { Authority string `yaml:"authority" json:"authority" mapstructure:"authority"` // IMPORTANT: do not show the username in any YAML/JSON output (sensitive information) Username string `yaml:"-" json:"-" mapstructure:"username"` // IMPORTANT: do not show the password in any YAML/JSON output (sensitive information) Password string `yaml:"-" json:"-" mapstructure:"password"` // IMPORTANT: do not show the token in any YAML/JSON output (sensitive information) Token string `yaml:"-" json:"-" mapstructure:"token"` }
Click to show internal directories.
Click to hide internal directories.