Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Alerts ¶ added in v0.108.0
type Alerts struct {
// EnableEOLDistroWarnings enables warnings about packages from end-of-life distros
EnableEOLDistroWarnings bool `yaml:"enable-eol-distro-warnings" json:"enable-eol-distro-warnings" mapstructure:"enable-eol-distro-warnings"`
}
Alerts configures how alerts are generated and displayed.
func (*Alerts) DescribeFields ¶ added in v0.108.0
func (a *Alerts) DescribeFields(descriptions clio.FieldDescriptionSet)
type DBSearchBounds ¶ added in v0.87.0
type DBSearchBounds struct {
RecordLimit int `yaml:"limit" json:"limit" mapstructure:"limit"`
}
func DefaultDBSearchBounds ¶ added in v0.87.0
func DefaultDBSearchBounds() DBSearchBounds
func (*DBSearchBounds) AddFlags ¶ added in v0.87.0
func (o *DBSearchBounds) AddFlags(flags clio.FlagSet)
func (*DBSearchBounds) PostLoad ¶ added in v0.87.0
func (o *DBSearchBounds) PostLoad() error
type DBSearchFormat ¶ added in v0.87.0
type DBSearchFormat struct {
Output string `yaml:"output" json:"output" mapstructure:"output"`
Allowable []string `yaml:"-" json:"-" mapstructure:"-"`
}
func DefaultDBSearchFormat ¶ added in v0.87.0
func DefaultDBSearchFormat() DBSearchFormat
func (*DBSearchFormat) AddFlags ¶ added in v0.87.0
func (c *DBSearchFormat) AddFlags(flags clio.FlagSet)
func (*DBSearchFormat) PostLoad ¶ added in v0.87.0
func (c *DBSearchFormat) PostLoad() error
type DBSearchOSs ¶ added in v0.87.0
type DBSearchOSs struct {
OSs []string `yaml:"distro" json:"distro" mapstructure:"distro"`
Specs v6.OSSpecifiers `yaml:"-" json:"-" mapstructure:"-"`
}
func (*DBSearchOSs) AddFlags ¶ added in v0.87.0
func (o *DBSearchOSs) AddFlags(flags clio.FlagSet)
func (*DBSearchOSs) PostLoad ¶ added in v0.87.0
func (o *DBSearchOSs) PostLoad() error
type DBSearchPackages ¶ added in v0.87.0
type DBSearchPackages struct {
AllowBroadCPEMatching bool `yaml:"allow-broad-cpe-matching" json:"allow-broad-cpe-matching" mapstructure:"allow-broad-cpe-matching"`
Packages []string `yaml:"packages" json:"packages" mapstructure:"packages"`
Ecosystem string `yaml:"ecosystem" json:"ecosystem" mapstructure:"ecosystem"`
PkgSpecs v6.PackageSpecifiers `yaml:"-" json:"-" mapstructure:"-"`
CPESpecs v6.PackageSpecifiers `yaml:"-" json:"-" mapstructure:"-"`
}
func (*DBSearchPackages) AddFlags ¶ added in v0.87.0
func (o *DBSearchPackages) AddFlags(flags clio.FlagSet)
func (*DBSearchPackages) PostLoad ¶ added in v0.87.0
func (o *DBSearchPackages) PostLoad() error
type DBSearchVulnerabilities ¶ added in v0.87.0
type DBSearchVulnerabilities struct {
VulnerabilityIDs []string `yaml:"vulnerability-ids" json:"vulnerability-ids" mapstructure:"vulnerability-ids"`
UseVulnIDFlag bool `yaml:"-" json:"-" mapstructure:"-"`
PublishedAfter string `yaml:"published-after" json:"published-after" mapstructure:"published-after"`
ModifiedAfter string `yaml:"modified-after" json:"modified-after" mapstructure:"modified-after"`
Providers []string `yaml:"providers" json:"providers" mapstructure:"providers"`
FixedState []string `yaml:"fixed-state" json:"fixed-state" mapstructure:"fixed-state"`
Specs v6.VulnerabilitySpecifiers `yaml:"-" json:"-" mapstructure:"-"`
}
func (*DBSearchVulnerabilities) AddFlags ¶ added in v0.87.0
func (c *DBSearchVulnerabilities) AddFlags(flags clio.FlagSet)
func (*DBSearchVulnerabilities) PostLoad ¶ added in v0.87.0
func (c *DBSearchVulnerabilities) PostLoad() error
type Database ¶
type Database struct {
ID clio.Identification `yaml:"-" json:"-" mapstructure:"-"`
Dir string `yaml:"cache-dir" json:"cache-dir" mapstructure:"cache-dir"`
UpdateURL string `yaml:"update-url" json:"update-url" mapstructure:"update-url"`
CACert string `yaml:"ca-cert" json:"ca-cert" mapstructure:"ca-cert"`
AutoUpdate bool `yaml:"auto-update" json:"auto-update" mapstructure:"auto-update"`
ValidateByHashOnStart bool `yaml:"validate-by-hash-on-start" json:"validate-by-hash-on-start" mapstructure:"validate-by-hash-on-start"`
ValidateAge bool `yaml:"validate-age" json:"validate-age" mapstructure:"validate-age"`
MaxAllowedBuiltAge time.Duration `yaml:"max-allowed-built-age" json:"max-allowed-built-age" mapstructure:"max-allowed-built-age"`
RequireUpdateCheck bool `yaml:"require-update-check" json:"require-update-check" mapstructure:"require-update-check"`
UpdateAvailableTimeout time.Duration `yaml:"update-available-timeout" json:"update-available-timeout" mapstructure:"update-available-timeout"`
UpdateDownloadTimeout time.Duration `yaml:"update-download-timeout" json:"update-download-timeout" mapstructure:"update-download-timeout"`
MaxUpdateCheckFrequency time.Duration `yaml:"max-update-check-frequency" json:"max-update-check-frequency" mapstructure:"max-update-check-frequency"`
}
func DefaultDatabase ¶
func DefaultDatabase(id clio.Identification) Database
func (*Database) DescribeFields ¶ added in v0.78.0
func (cfg *Database) DescribeFields(descriptions clio.FieldDescriptionSet)
type DatabaseCommand ¶ added in v0.88.0
type DatabaseCommand struct {
DB Database `yaml:"db" json:"db" mapstructure:"db"`
Experimental Experimental `yaml:"exp" json:"exp" mapstructure:"exp"`
Developer developer `yaml:"dev" json:"dev" mapstructure:"dev"`
}
func DefaultDatabaseCommand ¶ added in v0.88.0
func DefaultDatabaseCommand(id clio.Identification) *DatabaseCommand
func (DatabaseCommand) ToClientConfig ¶ added in v0.88.0
func (cfg DatabaseCommand) ToClientConfig() distribution.Config
func (DatabaseCommand) ToCuratorConfig ¶ added in v0.88.0
func (cfg DatabaseCommand) ToCuratorConfig() installation.Config
type Experimental ¶ added in v0.86.0
type Experimental struct {
}
Experimental options are opt-in features that are... ...not stable ...not yet fully supported ...not necessarily tested ...not ready for production use these may go away at any moment, do not depend on them
type FixChannel ¶ added in v0.97.0
type FixChannel struct {
// Apply indicates how the channel should be applied to the distro
Apply string `yaml:"apply" json:"apply" mapstructure:"apply"`
// Versions specifies a constraint string indicating which versions of the distro this channel applies to (e.g. ">= 8.0" for RHEL 8 and above)
Versions string `yaml:"versions" json:"versions" mapstructure:"versions"`
}
func (*FixChannel) PostLoad ¶ added in v0.97.0
func (o *FixChannel) PostLoad() error
type FixChannelEnabled ¶ added in v0.97.0
type FixChannelEnabled string
type FixChannels ¶ added in v0.97.0
type FixChannels struct {
// EUS is the Extended Update Support channel for RHEL
RedHatEUS FixChannel `yaml:"redhat-eus" json:"redhat-eus" mapstructure:"redhat-eus"`
// UbuntuESM is the Extended Security Maintenance (Ubuntu Pro) channel for Ubuntu
UbuntuESM FixChannel `yaml:"ubuntu-esm" json:"ubuntu-esm" mapstructure:"ubuntu-esm"`
}
func DefaultFixChannels ¶ added in v0.97.0
func DefaultFixChannels() FixChannels
func (*FixChannels) DescribeFields ¶ added in v0.97.0
func (o *FixChannels) DescribeFields(descriptions clio.FieldDescriptionSet)
type Grype ¶
type Grype struct {
Outputs []string `yaml:"output" json:"output" mapstructure:"output"` // -o, <presenter>=<file> the Presenter hint string to use for report formatting and the output file
File string `yaml:"file" json:"file" mapstructure:"file"` // --file, the file to write report output to
Pretty bool `yaml:"pretty" json:"pretty" mapstructure:"pretty"`
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
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
IgnoreStates string `yaml:"ignore-states" json:"ignore-wontfix" mapstructure:"ignore-wontfix"` // ignore detections for vulnerabilities matching these comma-separated fix states
Platform string `yaml:"platform" json:"platform" mapstructure:"platform"` // --platform, override the target platform for a container image
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"`
ExternalSources externalSources `yaml:"external-sources" json:"externalSources" mapstructure:"external-sources"`
Match matchConfig `yaml:"match" json:"match" mapstructure:"match"`
FailOn string `yaml:"fail-on-severity" json:"fail-on-severity" mapstructure:"fail-on-severity"`
Registry registry `yaml:"registry" json:"registry" mapstructure:"registry"`
ShowSuppressed bool `yaml:"show-suppressed" json:"show-suppressed" mapstructure:"show-suppressed"`
ByCVE bool `yaml:"by-cve" json:"by-cve" mapstructure:"by-cve"` // --by-cve, indicates if the original match vulnerability IDs should be preserved or the CVE should be used instead
SortBy SortBy `yaml:",inline" json:",inline" mapstructure:",squash"`
Name string `yaml:"name" json:"name" mapstructure:"name"`
DefaultImagePullSource string `yaml:"default-image-pull-source" json:"default-image-pull-source" mapstructure:"default-image-pull-source"`
From []string `yaml:"from" json:"from" mapstructure:"from"`
VexDocuments []string `yaml:"vex-documents" json:"vex-documents" mapstructure:"vex-documents"`
VexAdd []string `yaml:"vex-add" json:"vex-add" mapstructure:"vex-add"` // GRYPE_VEX_ADD
MatchUpstreamKernelHeaders bool `yaml:"match-upstream-kernel-headers" json:"match-upstream-kernel-headers" mapstructure:"match-upstream-kernel-headers"` // Show matches on kernel-headers packages where the match is on kernel upstream instead of marking them as ignored, default=false
FixChannel FixChannels `yaml:"fix-channel" json:"fix-channel" mapstructure:"fix-channel"` // the fix channels to apply to the distro when matching
Timestamp bool `yaml:"timestamp" json:"timestamp" mapstructure:"timestamp"`
Alerts Alerts `yaml:"alerts" json:"alerts" mapstructure:"alerts"`
DatabaseCommand `yaml:",inline" json:",inline" mapstructure:",squash"`
}
func DefaultGrype ¶
func DefaultGrype(id clio.Identification) *Grype
func (*Grype) DescribeFields ¶ added in v0.78.0
func (o *Grype) DescribeFields(descriptions clio.FieldDescriptionSet)
func (Grype) FailOnSeverity ¶ added in v0.74.3
func (o Grype) FailOnSeverity() *vulnerability.Severity
type RegistryCredentials ¶
type RegistryCredentials struct {
Authority string `yaml:"authority" json:"authority" mapstructure:"authority"`
// IMPORTANT: do not show the username, password, or token in any output (sensitive information)
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"`
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.