v1alpha1

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package v1alpha1 stores definitions and methods to handle security definitions, results +kubebuilder:object:generate=true +k8s:deepcopy-gen=package +groupName=security.pkg.katanomi.dev

Index

Constants

This section is empty.

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "security.pkg.katanomi.dev", Version: "v1alpha1"}

	// SchemeBuilder is used to add go types to the GroupVersionKind scheme
	SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion}

	// AddToScheme adds the types in this group-version to the given scheme.
	AddToScheme = SchemeBuilder.AddToScheme
)

AvailableVulnSeverities returns the available severities

Functions

This section is empty.

Types

type CVSS

type CVSS struct {
	// Source the source of cvss score for the highest vulnerability
	Source string `json:"source"`

	// Severity the severity of the highest vulnerability
	Severity string `json:"severity"`

	// Score the score of the highest vulnerability
	Score string `json:"score"`
}

CVSS Describe the vulnerability with the highest severity

func (*CVSS) DeepCopy

func (in *CVSS) DeepCopy() *CVSS

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CVSS.

func (*CVSS) DeepCopyInto

func (in *CVSS) DeepCopyInto(out *CVSS)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type NamedVulnScanResult

type NamedVulnScanResult struct {
	// Name of a specific lint result
	Name string `json:"name,omitempty"`

	VulnScanResult `json:",inline"`
}

NamedVulnScanResult adds name over integrated VulnScanResult

func (*NamedVulnScanResult) DeepCopy

func (in *NamedVulnScanResult) DeepCopy() *NamedVulnScanResult

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NamedVulnScanResult.

func (*NamedVulnScanResult) DeepCopyInto

func (in *NamedVulnScanResult) DeepCopyInto(out *NamedVulnScanResult)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (NamedVulnScanResult) IsSameResult

func (n NamedVulnScanResult) IsSameResult(y NamedVulnScanResult) bool

IsSameResult implements method for generic comparable usage and checking if lists have the same results

type NamedVulnScanResults

type NamedVulnScanResults []NamedVulnScanResult

NamedVulnScanResults list of NamedVulnScanResult

func (NamedVulnScanResults) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NamedVulnScanResults.

func (NamedVulnScanResults) DeepCopyInto

func (in NamedVulnScanResults) DeepCopyInto(out *NamedVulnScanResults)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type VulnScanResult

type VulnScanResult struct {
	// Result for the linting process
	//  - Succeeded: successful code linting with passing quality gates
	//  - Failed: failed code linting
	//  - Canceled: canceled code linting due to canceled task
	Result string `json:"result"`

	Targets []VulnScanTarget `json:"targets,omitempty"`
}

VulnScanResult stores code linting results

func (*VulnScanResult) DeepCopy

func (in *VulnScanResult) DeepCopy() *VulnScanResult

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VulnScanResult.

func (*VulnScanResult) DeepCopyInto

func (in *VulnScanResult) DeepCopyInto(out *VulnScanResult)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (VulnScanResult) IsEmpty

func (v VulnScanResult) IsEmpty() bool

IsEmpty returns true if the struct is empty

func (VulnScanResult) ToVulnScanResultShadow

func (v VulnScanResult) ToVulnScanResultShadow() VulnScanResultShadow

ToVulnScanResultShadow convert VulnScanResult to VulnScanResultShadow

type VulnScanResultShadow

type VulnScanResultShadow struct {
	// Result for the linting process
	//  - Succeeded: successful code linting with passing quality gates
	//  - Failed: failed code linting
	//  - Canceled: canceled code linting due to canceled task
	Result string `json:"result"`

	Targets []VulnScanTargetShadow `json:"targets,omitempty"`
}

VulnScanResultShadow stores code linting results

func (*VulnScanResultShadow) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VulnScanResultShadow.

func (*VulnScanResultShadow) DeepCopyInto

func (in *VulnScanResultShadow) DeepCopyInto(out *VulnScanResultShadow)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*VulnScanResultShadow) ToVulnScanResult

func (v *VulnScanResultShadow) ToVulnScanResult() VulnScanResult

ToVulnScanResult convert VulnScanResultShadow to VulnScanResult

type VulnScanTarget

type VulnScanTarget struct {
	// Uri identify of the target
	Uri string `json:"uri"`
	// Type the type of the target
	Type VulnScanTargetType `json:"type"`
	Cvss CVSS               `json:"cvss"`

	VulnStatistic `json:",inline" path:",squash"`
}

VulnScanTarget Describe the target for vulnerability scan

func (*VulnScanTarget) DeepCopy

func (in *VulnScanTarget) DeepCopy() *VulnScanTarget

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VulnScanTarget.

func (*VulnScanTarget) DeepCopyInto

func (in *VulnScanTarget) DeepCopyInto(out *VulnScanTarget)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*VulnScanTarget) ToVulnScanTargetShadow

func (v *VulnScanTarget) ToVulnScanTargetShadow() VulnScanTargetShadow

ToVulnScanTargetShadow convert VulnScanTarget to VulnScanTargetShadow

type VulnScanTargetShadow

type VulnScanTargetShadow struct {
	// Uri identify of the target
	Uri string `json:"uri"`
	// Type the type of the target
	Type VulnScanTargetType `json:"type"`
	Cvss CVSS               `json:"cvss"`

	// Compress multiple metrics into a single field.
	// because the tekton result has a limit on length
	Statistic string `json:"statistic"`
}

VulnScanTargetShadow Describe the target for vulnerability scan

func (*VulnScanTargetShadow) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VulnScanTargetShadow.

func (*VulnScanTargetShadow) DeepCopyInto

func (in *VulnScanTargetShadow) DeepCopyInto(out *VulnScanTargetShadow)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*VulnScanTargetShadow) ToVulnScanTarget

func (v *VulnScanTargetShadow) ToVulnScanTarget() VulnScanTarget

ToVulnScanTarget convert VulnScanTargetShadow to VulnScanTarget

type VulnScanTargetType

type VulnScanTargetType string

VulnScanTargetType defines the type of the target to scan

const (
	// VulnScanTargetTypeImage defines the target type as image
	VulnScanTargetTypeImage VulnScanTargetType = "ContainerImage"

	// VulnScanTargetTypeFileSystem defines the target type as fs
	VulnScanTargetTypeFileSystem VulnScanTargetType = "FileSystem"

	// VulnScanTargetTypeRepository defines the target type as repository
	VulnScanTargetTypeRepository VulnScanTargetType = "GitRepository"
)

type VulnSeverity

type VulnSeverity string

VulnSeverity defines the severity of the vulnerability

const (
	// VulnSeverityCritical defines the critical severity
	VulnSeverityCritical VulnSeverity = "Critical"

	// VulnSeverityHigh defines the high severity
	VulnSeverityHigh VulnSeverity = "High"

	// VulnSeverityMedium defines the medium severity
	VulnSeverityMedium VulnSeverity = "Medium"

	// VulnSeverityLow defines the low severity
	VulnSeverityLow VulnSeverity = "Low"

	// VulnSeverityUnknown defines the unknown severity
	VulnSeverityUnknown VulnSeverity = "Unknown"
)

type VulnStatistic

type VulnStatistic struct {
	// CriticalCount Count of critical severity vulnerabilities
	CriticalCount int `json:"criticalCount"`

	// HighCount Count of high severity vulnerabilities
	HighCount int `json:"highCount"`

	// MediumCount Count of medium severity vulnerabilities
	MediumCount int `json:"mediumCount"`

	// LowCount Count of low severity vulnerabilities
	LowCount int `json:"lowCount"`

	// UnknownCount Count of unknown severity vulnerabilities
	UnknownCount int `json:"unknownCount"`
}

VulnStatistic Describes the vulnerability statistic

func (*VulnStatistic) DeepCopy

func (in *VulnStatistic) DeepCopy() *VulnStatistic

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VulnStatistic.

func (*VulnStatistic) DeepCopyInto

func (in *VulnStatistic) DeepCopyInto(out *VulnStatistic)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

Jump to

Keyboard shortcuts

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