trivyk8s

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2024 License: Apache-2.0 Imports: 18 Imported by: 7

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BomToArtifacts added in v0.6.0

func BomToArtifacts(b *bom.Result) ([]*artifacts.Artifact, error)

Types

type ArtifactsK8S

type ArtifactsK8S interface {
	// ListArtifacts returns kubernetes scanable artifacts
	ListArtifacts(context.Context) ([]*artifacts.Artifact, error)
	// GetArtifact return kubernete scanable artifact
	GetArtifact(context.Context, string, string) (*artifacts.Artifact, error)
	// ListArtifactAndNodeInfo return kubernete scanable artifact and node info
	ListArtifactAndNodeInfo(context.Context, ...NodeCollectorOption) ([]*artifacts.Artifact, error)
	// ListClusterBomInfo returns kubernetes Bom (node,core components) information.
	ListClusterBomInfo(context.Context) ([]*artifacts.Artifact, error)
}

ArtifactsK8S interface represents operations to query the artifacts

type K8sOption added in v0.5.7

type K8sOption func(*client)

func WithExcludeOwned added in v0.5.7

func WithExcludeOwned(excludeOwned bool) K8sOption

type NodeCollectorOption added in v0.6.0

type NodeCollectorOption func(*client)

func WithIgnoreLabels added in v0.6.0

func WithIgnoreLabels(ignoreLabels map[string]string) NodeCollectorOption

func WithNodeConfig added in v0.6.1

func WithNodeConfig(nodeConfig bool) NodeCollectorOption

func WithScanJobImageRef added in v0.6.0

func WithScanJobImageRef(imageRef string) NodeCollectorOption

func WithScanJobNamespace added in v0.6.0

func WithScanJobNamespace(namespace string) NodeCollectorOption

func WithTolerations added in v0.6.0

func WithTolerations(toleration []corev1.Toleration) NodeCollectorOption

type TrivyK8S

type TrivyK8S interface {
	Namespace(string) TrivyK8S
	AllNamespaces() TrivyK8S
	Resources(string) TrivyK8S
	ArtifactsK8S
}

TrivyK8S interface represents the operations supported by the library

func New

func New(cluster k8s.Cluster, logger *zap.SugaredLogger, opts ...K8sOption) TrivyK8S

New creates a trivyK8S client

Jump to

Keyboard shortcuts

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