Documentation
¶
Index ¶
- func ConvertImages(k8Images *[]kubeclient.Image, defaults *CollectorImage, ...) (*[]CollectorImage, error)
- func GetOrDefaultBool(m map[string]string, name string, default_ bool) bool
- func GetOrDefaultInt64(m map[string]string, name string, default_ int64) int64
- func GetOrDefaultString(m map[string]string, name, default_ string) string
- func GetOrDefaultStringSlice(m map[string]string, name string, default_ []string) []string
- func JsonIndentMarshal(v any) ([]byte, error)
- func Store(images *[]CollectorImage, storage io.Writer, jsonMarshal JsonMarshal) error
- type AnnotationNames
- type CollectorImage
- type JsonMarshal
- type RunConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConvertImages ¶
func ConvertImages(k8Images *[]kubeclient.Image, defaults *CollectorImage, annotationNames *AnnotationNames, runConfig *RunConfig) (*[]CollectorImage, error)
images from kubernetes, convert, clean and store them in the storage
func GetOrDefaultBool ¶
GetOrDefaultBool returns the value of the given name from the map m or the default value if it doesn't exist.
func GetOrDefaultInt64 ¶
GetOrDefaultInt64 the value of the given name from the map m or the default value if it doesn't exist.
func GetOrDefaultString ¶
GetOrDefaultString returns the value of the given name from the map m or the default value if it doesn't exist.
func GetOrDefaultStringSlice ¶
GetOrDefaultStringSlice the value of the given name from the map m or the default value if it doesn't exist.
func JsonIndentMarshal ¶
func Store ¶
func Store(images *[]CollectorImage, storage io.Writer, jsonMarshal JsonMarshal) error
TODO: Write Tests. Not written yet due to upcomming refactor stores images in the provided storager implementation
Types ¶
type AnnotationNames ¶
type CollectorImage ¶
type CollectorImage struct { Namespace string `json:"namespace"` Image string `json:"image"` ImageId string `json:"image_id"` // Fields from annotations and labels Environment string `json:"environment"` Product string `json:"product"` Description string `json:"description"` AppKubernetesIoName string `json:"app_kubernetes_io_name"` AppKubernetesIoVersion string `json:"app_kubernetes_io_version"` ContainerType string `json:"container_type"` Skip bool `json:"skip"` NamespaceFilter string `json:"namespace_filter"` NamespaceFilterNegated string `json:"namespace_filter_negated"` EngagementTags []string `json:"engagement_tags"` Team string `json:"team"` Slack string `json:"slack"` Email string `json:"email"` IsScanBaseimageLifetime bool `json:"is_scan_baseimage_lifetime"` IsScanDependencyCheck bool `json:"is_scan_dependency_check"` IsScanDependencyTrack bool `json:"is_scan_dependency_track"` IsScanDistroless bool `json:"is_scan_distroless"` IsScanLifetime bool `json:"is_scan_lifetime"` IsScanMalware bool `json:"is_scan_malware"` IsScanNewVersion bool `json:"is_scan_new_version"` IsScanRunAsRoot bool `json:"is_scan_runasroot"` IsPotentiallyRunningAsRoot bool `json:"is_scan_potentially_running_as_root"` IsScanRunAsPrivileged bool `json:"is_scan_run_as_privileged"` IsPotentiallyRunningAsPrivileged bool `json:"is_scan_potentially_running_as_privileged"` ScanLifetimeMaxDays int64 `json:"scan_lifetime_max_days"` }
type JsonMarshal ¶
Click to show internal directories.
Click to hide internal directories.