Documentation ¶
Index ¶
- Constants
- func NewFamiliesConfigFrom(config *ScannerConfig, sfc *models.ScanFamiliesConfig) *families.Config
- type AssetScanPoller
- type AssetScanQueue
- type AssetScanReconcileEvent
- type AssetScanReconciler
- type Config
- func (c Config) WithBackendClient(b *backendclient.BackendClient) Config
- func (c Config) WithPollPeriod(t time.Duration) Config
- func (c Config) WithProviderClient(p provider.Provider) Config
- func (c Config) WithReconcileTimeout(t time.Duration) Config
- func (c Config) WithScannerConfig(s ScannerConfig) Config
- type DeleteJobPolicyType
- type FamiliesConfigOption
- type ScannerConfig
- type Watcher
Constants ¶
View Source
const ( DefaultPollInterval = 15 * time.Second DefaultReconcileTimeout = 5 * time.Minute DefaultAbortTimeout = 10 * time.Minute )
View Source
const ( DefaultTrivyScanTimeout = 5 * time.Minute DefaultGrypeServerTimeout = 2 * time.Minute )
Variables ¶
This section is empty.
Functions ¶
func NewFamiliesConfigFrom ¶
func NewFamiliesConfigFrom(config *ScannerConfig, sfc *models.ScanFamiliesConfig) *families.Config
Types ¶
type AssetScanPoller ¶
type AssetScanPoller = common.Poller[AssetScanReconcileEvent]
type AssetScanQueue ¶
type AssetScanQueue = common.Queue[AssetScanReconcileEvent]
type AssetScanReconcileEvent ¶
type AssetScanReconcileEvent struct { AssetScanID models.AssetScanID ScanID models.ScanID AssetID models.AssetID }
func (AssetScanReconcileEvent) Hash ¶
func (e AssetScanReconcileEvent) Hash() string
func (AssetScanReconcileEvent) String ¶
func (e AssetScanReconcileEvent) String() string
func (AssetScanReconcileEvent) ToFields ¶
func (e AssetScanReconcileEvent) ToFields() log.Fields
type AssetScanReconciler ¶
type AssetScanReconciler = common.Reconciler[AssetScanReconcileEvent]
type Config ¶
type Config struct { Backend *backendclient.BackendClient Provider provider.Provider PollPeriod time.Duration `mapstructure:"poll_period"` ReconcileTimeout time.Duration `mapstructure:"reconcile_timeout"` DeleteJobPolicy DeleteJobPolicyType `mapstructure:"delete_policy"` AbortTimeout time.Duration `mapstructure:"abort_timeout"` ScannerConfig ScannerConfig `mapstructure:"scanner"` }
func (Config) WithBackendClient ¶
func (c Config) WithBackendClient(b *backendclient.BackendClient) Config
func (Config) WithScannerConfig ¶
func (c Config) WithScannerConfig(s ScannerConfig) Config
type DeleteJobPolicyType ¶
type DeleteJobPolicyType string
const ( DeleteJobPolicyAlways DeleteJobPolicyType = "Always" DeleteJobPolicyNever DeleteJobPolicyType = "Never" DeleteJobPolicyOnSuccess DeleteJobPolicyType = "OnSuccess" )
func (*DeleteJobPolicyType) UnmarshalText ¶
func (p *DeleteJobPolicyType) UnmarshalText(text []byte) error
type FamiliesConfigOption ¶
type ScannerConfig ¶
type ScannerConfig struct { // Address that the Scanner should use to talk to the VMClarity backend // We use a configuration variable for this instead of discovering it // automatically in case VMClarity backend has multiple IPs (internal // traffic and external traffic for example) so we need the specific // address to use. APIServerAddress string `json:"apiserver-address,omitempty" mapstructure:"apiserver_address"` ExploitsDBAddress string `mapstructure:"exploitsdb_address"` TrivyServerAddress string `mapstructure:"trivy_server_address"` TrivyScanTimeout time.Duration `mapstructure:"trivy_scan_timeout"` GrypeServerAddress string `mapstructure:"grype_server_address"` GrypeServerTimeout time.Duration `mapstructure:"grype_server_timeout"` YaraRuleServerAddress string `mapstructure:"yara_rule_server_address"` // The container image to use once we've booted the scanner virtual // machine, that contains the VMClarity CLI plus all the required // tools. ScannerImage string `mapstructure:"container_image"` // The freshclam mirror url to use if it's enabled AlternativeFreshclamMirrorURL string `mapstructure:"freshclam_mirror"` }
type Watcher ¶
type Watcher struct {
// contains filtered or unexported fields
}
func (*Watcher) GetAssetScans ¶
func (w *Watcher) GetAssetScans(ctx context.Context) ([]AssetScanReconcileEvent, error)
nolint:cyclop
Click to show internal directories.
Click to hide internal directories.