config

package
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 19, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ScannerAWSRegion = "SCANNER_AWS_REGION"

	JobResultTimeout              = "JOB_RESULT_TIMEOUT"
	JobResultsPollingInterval     = "JOB_RESULT_POLLING_INTERVAL"
	DeleteJobPolicy               = "DELETE_JOB_POLICY"
	ScannerContainerImage         = "SCANNER_CONTAINER_IMAGE"
	ScannerKeyPairName            = "SCANNER_KEY_PAIR_NAME"
	GitleaksBinaryPath            = "GITLEAKS_BINARY_PATH"
	ClamBinaryPath                = "CLAM_BINARY_PATH"
	FreshclamBinaryPath           = "FRESHCLAM_BINARY_PATH"
	AlternativeFreshclamMirrorURL = "ALTERNATIVE_FRESHCLAM_MIRROR_URL"
	LynisInstallPath              = "LYNIS_INSTALL_PATH"
	AttachedVolumeDeviceName      = "ATTACHED_VOLUME_DEVICE_NAME"

	ScannerBackendAddress   = "SCANNER_VMCLARITY_BACKEND_ADDRESS"
	ScanConfigWatchInterval = "SCAN_CONFIG_WATCH_INTERVAL"
	ExploitDBAddress        = "EXPLOIT_DB_ADDRESS"
	TrivyServerAddress      = "TRIVY_SERVER_ADDRESS"
	GrypeServerAddress      = "GRYPE_SERVER_ADDRESS"
	ChkrootkitBinaryPath    = "CHKROOTKIT_BINARY_PATH"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type DeleteJobPolicyType

type DeleteJobPolicyType string
const (
	DeleteJobPolicyAlways    DeleteJobPolicyType = "Always"
	DeleteJobPolicyNever     DeleteJobPolicyType = "Never"
	DeleteJobPolicyOnSuccess DeleteJobPolicyType = "OnSuccess"
)

func (DeleteJobPolicyType) IsValid

func (dj DeleteJobPolicyType) IsValid() bool

type OrchestratorConfig

type OrchestratorConfig struct {
	AWSConfig             *aws.Config
	ScannerBackendAddress string
	ScannerConfig
}

func LoadConfig

func LoadConfig(backendHost string, backendPort int, baseURL string) (*OrchestratorConfig, error)

type ScannerConfig

type ScannerConfig struct {
	// We need to know where the VMClarity scanner is running so that we
	// can boot the scanner jobs in the same region, there isn't a
	// mechanism to discover this right now so its passed in as a config
	// value.
	Region string

	// 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.
	ScannerBackendAddress string

	ExploitsDBAddress string

	TrivyServerAddress string

	GrypeServerAddress string

	JobResultTimeout          time.Duration
	JobResultsPollingInterval time.Duration
	ScanConfigWatchInterval   time.Duration
	DeleteJobPolicy           DeleteJobPolicyType

	// 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

	// The key pair name that should be attached to the scanner VM instance.
	// Mainly used for debugging.
	ScannerKeyPairName string

	// The gitleaks binary path in the scanner image container.
	GitleaksBinaryPath string

	// The clam binary path in the scanner image container.
	ClamBinaryPath string

	// The freshclam binary path in the scanner image container
	FreshclamBinaryPath string

	// The freshclam mirror url to use if it's enabled
	AlternativeFreshclamMirrorURL string

	// The location where Lynis is installed in the scanner image
	LynisInstallPath string

	// The chkrootkit binary path in the scanner image container.
	ChkrootkitBinaryPath string

	// the name of the block device to attach to the scanner job
	DeviceName string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL