v1alpha1

package
v0.10.0-rc3 Latest Latest
Warning

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

Go to latest
Published: Jan 1, 2023 License: Apache-2.0 Imports: 9 Imported by: 11

Documentation

Overview

Package v1alpha1 is the v1alpha1 version of the API.

Index

Constants

View Source
const ScannerNameTrivy = "Trivy"
View Source
const (
	TTLReportAnnotation = "trivy-operator.aquasecurity.github.io/report-ttl"
)

Variables

View Source
var (
	// SchemeBuilder initializes a scheme builder
	SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
	// AddToScheme is a global function that registers this API group & version to a scheme
	AddToScheme = SchemeBuilder.AddToScheme
)
View Source
var SchemeGroupVersion = schema.GroupVersion{Group: aquasecurity.GroupName, Version: "v1alpha1"}

SchemeGroupVersion is group version used to register these objects

Functions

func ToComplainceSpec added in v0.9.0

func ToComplainceSpec(cSpec Complaince) spec.ComplianceSpec

ToComplainceSpec map data from crd compliance spec to trivy compliance spec

Types

type Artifact

type Artifact struct {
	// Repository is the name of the repository in the Artifact registry.
	//+optional
	Repository string `json:"repository"`

	// Digest is a unique and immutable identifier of an Artifact.
	//+optional
	Digest string `json:"digest,omitempty"`

	// Tag is a mutable, human-readable string used to identify an Artifact.
	//+optional
	Tag string `json:"tag,omitempty"`

	// MimeType represents a type and format of an Artifact.
	//+optional
	MimeType string `json:"mimeType,omitempty"`
}

Artifact represents a standalone, executable package of software that includes everything needed to run an application.

func (*Artifact) DeepCopy

func (in *Artifact) DeepCopy() *Artifact

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

func (*Artifact) DeepCopyInto

func (in *Artifact) DeepCopyInto(out *Artifact)

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

type Check

type Check struct {
	ID          string   `json:"checkID"`
	Title       string   `json:"title,omitempty"`
	Description string   `json:"description,omitempty"`
	Severity    Severity `json:"severity"`
	Category    string   `json:"category,omitempty"`

	Messages []string `json:"messages,omitempty"`

	// Remediation provides description or links to external resources to remediate failing check.
	// +optional
	Remediation string `json:"remediation,omitempty"`

	Success bool `json:"success"`

	// Scope indicates the section of config that was audited.
	// +optional
	Scope *CheckScope `json:"scope,omitempty"`
}

Check provides the result of conducting a single audit step.

func (*Check) DeepCopy

func (in *Check) DeepCopy() *Check

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

func (*Check) DeepCopyInto

func (in *Check) DeepCopyInto(out *Check)

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

type CheckScope

type CheckScope struct {

	// Type indicates type of this scope, e.g. Container, ConfigMapKey or JSONPath.
	Type string `json:"type"`

	// Value indicates value of this scope that depends on Type, e.g. container name, ConfigMap key or JSONPath expression
	Value string `json:"value"`
}

CheckScope has Type and Value fields to further identify a given Check. For example, we can use `Container` as Type and `nginx` as Value to indicate that a particular check is relevant to the nginx container. Alternatively, Type may be `JSONPath` and the Value would be JSONPath expression, e.g. `.spec.container[0].securityContext.allowPrivilegeEscalation`.

Another use case for CheckScope is to inspect a ConfigMap with many keys and indicate a troublesome key. In this case the Type would be `ConfigMapKey` and the Value will hold the name of a key, e.g. `myawsprivatekey`.

func (*CheckScope) DeepCopy

func (in *CheckScope) DeepCopy() *CheckScope

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

func (*CheckScope) DeepCopyInto

func (in *CheckScope) DeepCopyInto(out *CheckScope)

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

type ClusterComplianceReport

type ClusterComplianceReport struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`
	Spec              ReportSpec   `json:"spec,omitempty"`
	Status            ReportStatus `json:"status,omitempty"`
}

ClusterComplianceReport is a specification for the ClusterComplianceReport resource.

func (*ClusterComplianceReport) DeepCopy

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

func (*ClusterComplianceReport) DeepCopyInto

func (in *ClusterComplianceReport) DeepCopyInto(out *ClusterComplianceReport)

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

func (*ClusterComplianceReport) DeepCopyObject

func (in *ClusterComplianceReport) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type ClusterComplianceReportList

type ClusterComplianceReportList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata"`
	Items           []ClusterComplianceReport `json:"items"`
}

ClusterComplianceReportList is a list of compliance kinds.

func (*ClusterComplianceReportList) DeepCopy

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

func (*ClusterComplianceReportList) DeepCopyInto

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

func (*ClusterComplianceReportList) DeepCopyObject

func (in *ClusterComplianceReportList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type ClusterConfigAuditReport

type ClusterConfigAuditReport struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Report ConfigAuditReportData `json:"report"`
}

ClusterConfigAuditReport is a specification for the ClusterConfigAuditReport resource.

func (*ClusterConfigAuditReport) DeepCopy

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

func (*ClusterConfigAuditReport) DeepCopyInto

func (in *ClusterConfigAuditReport) DeepCopyInto(out *ClusterConfigAuditReport)

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

func (*ClusterConfigAuditReport) DeepCopyObject

func (in *ClusterConfigAuditReport) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type ClusterConfigAuditReportList

type ClusterConfigAuditReportList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata"`

	Items []ClusterConfigAuditReport `json:"items"`
}

ClusterConfigAuditReportList is a list of ClusterConfigAuditReport resources.

func (*ClusterConfigAuditReportList) DeepCopy

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

func (*ClusterConfigAuditReportList) DeepCopyInto

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

func (*ClusterConfigAuditReportList) DeepCopyObject

func (in *ClusterConfigAuditReportList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type ClusterRbacAssessmentReport added in v0.1.3

type ClusterRbacAssessmentReport struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Report RbacAssessmentReportData `json:"report"`
}

ClusterRbacAssessmentReport is a specification for the ClusterRbacAssessmentReport resource.

func (*ClusterRbacAssessmentReport) DeepCopy added in v0.1.3

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

func (*ClusterRbacAssessmentReport) DeepCopyInto added in v0.1.3

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

func (*ClusterRbacAssessmentReport) DeepCopyObject added in v0.1.3

func (in *ClusterRbacAssessmentReport) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type ClusterRbacAssessmentReportList added in v0.1.3

type ClusterRbacAssessmentReportList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata"`

	Items []ClusterRbacAssessmentReport `json:"items"`
}

ClusterRbacAssessmentReportList is a list of ClusterRbacAssessmentReport resources.

func (*ClusterRbacAssessmentReportList) DeepCopy added in v0.1.3

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

func (*ClusterRbacAssessmentReportList) DeepCopyInto added in v0.1.3

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

func (*ClusterRbacAssessmentReportList) DeepCopyObject added in v0.1.3

func (in *ClusterRbacAssessmentReportList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type Complaince added in v0.9.0

type Complaince struct {
	ID               string   `json:"id"`
	Title            string   `json:"title"`
	Description      string   `json:"description"`
	Version          string   `json:"version"`
	RelatedResources []string `json:"relatedResources"`
	// Control represent the cps controls data and mapping checks
	Controls []Control `json:"controls"`
}

func (*Complaince) DeepCopy added in v0.9.0

func (in *Complaince) DeepCopy() *Complaince

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

func (*Complaince) DeepCopyInto added in v0.9.0

func (in *Complaince) DeepCopyInto(out *Complaince)

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

type ComplianceCheck added in v0.9.0

type ComplianceCheck struct {
	ID          string   `json:"checkID"`
	Target      string   `json:"target,omitempty"`
	Title       string   `json:"title,omitempty"`
	Description string   `json:"description,omitempty"`
	Severity    Severity `json:"severity"`
	Category    string   `json:"category,omitempty"`

	Messages []string `json:"messages,omitempty"`

	// Remediation provides description or links to external resources to remediate failing check.
	// +optional
	Remediation string `json:"remediation,omitempty"`

	Success bool `json:"success"`
}

ComplianceCheck provides the result of conducting a single compliance step.

func (*ComplianceCheck) DeepCopy added in v0.9.0

func (in *ComplianceCheck) DeepCopy() *ComplianceCheck

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

func (*ComplianceCheck) DeepCopyInto added in v0.9.0

func (in *ComplianceCheck) DeepCopyInto(out *ComplianceCheck)

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

type ComplianceReport added in v0.9.0

type ComplianceReport struct {
	ID               string                `json:"id,omitempty"`
	Title            string                `json:"title,omitempty"`
	Description      string                `json:"description,omitempty"`
	Version          string                `json:"version,omitempty"`
	RelatedResources []string              `json:"relatedVersion,omitempty"`
	Results          []*ControlCheckResult `json:"results,omitempty"`
}

ComplianceReport represents a kubernetes scan report

func FromDetailReport added in v0.9.0

func FromDetailReport(sr *report.ComplianceReport) *ComplianceReport

FromSummaryReport map data from trivy summary report to crd summary report

func (*ComplianceReport) DeepCopy added in v0.9.0

func (in *ComplianceReport) DeepCopy() *ComplianceReport

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

func (*ComplianceReport) DeepCopyInto added in v0.9.0

func (in *ComplianceReport) DeepCopyInto(out *ComplianceReport)

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

type ComplianceSummary added in v0.9.0

type ComplianceSummary struct {
	FailCount int `json:"failCount,omitempty"`
	PassCount int `json:"passCount,omitempty"`
}

func TotalsCheckCount added in v0.9.0

func TotalsCheckCount(sr *report.ComplianceReport) ComplianceSummary

func (*ComplianceSummary) DeepCopy added in v0.9.0

func (in *ComplianceSummary) DeepCopy() *ComplianceSummary

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

func (*ComplianceSummary) DeepCopyInto added in v0.9.0

func (in *ComplianceSummary) DeepCopyInto(out *ComplianceSummary)

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

type ConfigAuditReport

type ConfigAuditReport struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Report ConfigAuditReportData `json:"report"`
}

ConfigAuditReport is a specification for the ConfigAuditReport resource.

func (*ConfigAuditReport) DeepCopy

func (in *ConfigAuditReport) DeepCopy() *ConfigAuditReport

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

func (*ConfigAuditReport) DeepCopyInto

func (in *ConfigAuditReport) DeepCopyInto(out *ConfigAuditReport)

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

func (*ConfigAuditReport) DeepCopyObject

func (in *ConfigAuditReport) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type ConfigAuditReportData

type ConfigAuditReportData struct {
	// +optional
	UpdateTimestamp metav1.Time `json:"updateTimestamp"`
	// +optional
	Scanner Scanner `json:"scanner"`
	// +optional
	Summary ConfigAuditSummary `json:"summary"`

	// Checks provides results of conducting audit steps.
	Checks []Check `json:"checks"`
}

func (*ConfigAuditReportData) DeepCopy

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

func (*ConfigAuditReportData) DeepCopyInto

func (in *ConfigAuditReportData) DeepCopyInto(out *ConfigAuditReportData)

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

type ConfigAuditReportList

type ConfigAuditReportList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata"`

	Items []ConfigAuditReport `json:"items"`
}

ConfigAuditReportList is a list of AuditConfig resources.

func (*ConfigAuditReportList) DeepCopy

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

func (*ConfigAuditReportList) DeepCopyInto

func (in *ConfigAuditReportList) DeepCopyInto(out *ConfigAuditReportList)

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

func (*ConfigAuditReportList) DeepCopyObject

func (in *ConfigAuditReportList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type ConfigAuditSummary

type ConfigAuditSummary struct {

	// CriticalCount is the number of failed checks with critical severity.
	CriticalCount int `json:"criticalCount"`

	// HighCount is the number of failed checks with high severity.
	HighCount int `json:"highCount"`

	// MediumCount is the number of failed checks with medium severity.
	MediumCount int `json:"mediumCount"`

	// LowCount is the number of failed check with low severity.
	LowCount int `json:"lowCount"`
}

ConfigAuditSummary counts failed checks by severity.

func ConfigAuditSummaryFromChecks

func ConfigAuditSummaryFromChecks(checks []Check) ConfigAuditSummary

func (*ConfigAuditSummary) DeepCopy

func (in *ConfigAuditSummary) DeepCopy() *ConfigAuditSummary

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

func (*ConfigAuditSummary) DeepCopyInto

func (in *ConfigAuditSummary) DeepCopyInto(out *ConfigAuditSummary)

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

type Control

type Control struct {
	// id define the control check id
	ID          string      `json:"id"`
	Name        string      `json:"name"`
	Description string      `json:"description,omitempty"`
	Checks      []SpecCheck `json:"checks,omitempty"`
	// define the severity of the control
	//+kubebuilder:validation:Enum={CRITICAL,HIGH,MEDIUM,LOW,UNKNOWN}
	Severity Severity `json:"severity"`
	// define the default value for check status in case resource not found
	//+kubebuilder:validation:Enum={PASS,WARN,FAIL}
	DefaultStatus ControlStatus `json:"defaultStatus,omitempty"`
}

Control represent the cps controls data and mapping checks

func (*Control) DeepCopy

func (in *Control) DeepCopy() *Control

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

func (*Control) DeepCopyInto

func (in *Control) DeepCopyInto(out *Control)

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

type ControlCheckResult added in v0.9.0

type ControlCheckResult struct {
	ID            string             `json:"id,omitempty"`
	Name          string             `json:"name,omitempty"`
	Description   string             `json:"description,omitempty"`
	DefaultStatus spec.ControlStatus `json:"status,omitempty"`
	Severity      string             `json:"severity,omitempty"`
	Checks        []ComplianceCheck  `json:"checks"`
}

func (*ControlCheckResult) DeepCopy added in v0.9.0

func (in *ControlCheckResult) DeepCopy() *ControlCheckResult

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

func (*ControlCheckResult) DeepCopyInto added in v0.9.0

func (in *ControlCheckResult) DeepCopyInto(out *ControlCheckResult)

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

type ControlCheckSummary added in v0.9.0

type ControlCheckSummary struct {
	ID        string `json:"id,omitempty"`
	Name      string `json:"name,omitempty"`
	Severity  string `json:"severity,omitempty"`
	TotalFail *int   `json:"totalFail,omitempty"`
}

func (*ControlCheckSummary) DeepCopy added in v0.9.0

func (in *ControlCheckSummary) DeepCopy() *ControlCheckSummary

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

func (*ControlCheckSummary) DeepCopyInto added in v0.9.0

func (in *ControlCheckSummary) DeepCopyInto(out *ControlCheckSummary)

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

type ControlStatus

type ControlStatus string
const (
	FailStatus ControlStatus = "FAIL"
	PassStatus ControlStatus = "PASS"
	WarnStatus ControlStatus = "WARN"
)

type ExposedSecret added in v0.1.0

type ExposedSecret struct {
	// Target is where the exposed secret was found.
	Target string `json:"target"`

	// RuleID is rule the identifier.
	RuleID string `json:"ruleID"`

	Title    string `json:"title"`
	Category string `json:"category"`
	//+kubebuilder:validation:Enum={CRITICAL,HIGH,MEDIUM,LOW}
	Severity Severity `json:"severity"`
	// Match where the exposed rule matched.
	Match string `json:"match"`
}

ExposedSecret is the spec for a exposed secret record.

func (*ExposedSecret) DeepCopy added in v0.1.0

func (in *ExposedSecret) DeepCopy() *ExposedSecret

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

func (*ExposedSecret) DeepCopyInto added in v0.1.0

func (in *ExposedSecret) DeepCopyInto(out *ExposedSecret)

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

type ExposedSecretReport added in v0.1.0

type ExposedSecretReport struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	// Report is the actual exposed secret report data.
	Report ExposedSecretReportData `json:"report"`
}

ExposedSecretReport summarizes exposed secrets in plaintext files built into container images.

func (*ExposedSecretReport) DeepCopy added in v0.1.0

func (in *ExposedSecretReport) DeepCopy() *ExposedSecretReport

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

func (*ExposedSecretReport) DeepCopyInto added in v0.1.0

func (in *ExposedSecretReport) DeepCopyInto(out *ExposedSecretReport)

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

func (*ExposedSecretReport) DeepCopyObject added in v0.1.0

func (in *ExposedSecretReport) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type ExposedSecretReportData added in v0.1.0

type ExposedSecretReportData struct {
	// UpdateTimestamp is a timestamp representing the server time in UTC when this report was updated.
	// +kubebuilder:validation:Type=string
	// +kubebuilder:validation:Format=date-time
	UpdateTimestamp metav1.Time `json:"updateTimestamp"`

	// Scanner is the scanner that generated this report.
	Scanner Scanner `json:"scanner"`

	// Registry is the registry the Artifact was pulled from.
	//+optional
	Registry Registry `json:"registry"`

	// Artifact represents a standalone, executable package of software that includes everything needed to
	// run an application.
	Artifact Artifact `json:"artifact"`

	// Summary is the exposed secrets counts grouped by Severity.
	Summary ExposedSecretSummary `json:"summary"`

	// Exposed secrets is a list of passwords, api keys, tokens and others items found in the Artifact.
	Secrets []ExposedSecret `json:"secrets"`
}

ExposedSecretReportData is the spec for the exposed secret scan result.

The spec follows the Pluggable Scanners API defined for Harbor. @see https://github.com/goharbor/pluggable-scanner-spec/blob/master/api/spec/scanner-adapter-openapi-v1.0.yaml

func (*ExposedSecretReportData) DeepCopy added in v0.1.0

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

func (*ExposedSecretReportData) DeepCopyInto added in v0.1.0

func (in *ExposedSecretReportData) DeepCopyInto(out *ExposedSecretReportData)

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

type ExposedSecretReportList added in v0.1.0

type ExposedSecretReportList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata"`

	Items []ExposedSecretReport `json:"items"`
}

ExposedSecretReportList is a list of ExposedSecretReport resources.

func (*ExposedSecretReportList) DeepCopy added in v0.1.0

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

func (*ExposedSecretReportList) DeepCopyInto added in v0.1.0

func (in *ExposedSecretReportList) DeepCopyInto(out *ExposedSecretReportList)

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

func (*ExposedSecretReportList) DeepCopyObject added in v0.1.0

func (in *ExposedSecretReportList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type ExposedSecretSummary added in v0.1.0

type ExposedSecretSummary struct {
	// CriticalCount is the number of exposed secrets with Critical Severity.
	//+kubebuilder:validation:Minimum=0
	CriticalCount int `json:"criticalCount"`

	// HighCount is the number of exposed secrets with High Severity.
	//+kubebuilder:validation:Minimum=0
	HighCount int `json:"highCount"`

	// MediumCount is the number of exposed secrets with Medium Severity.
	//+kubebuilder:validation:Minimum=0
	MediumCount int `json:"mediumCount"`

	// LowCount is the number of exposed secrets with Low Severity.
	//+kubebuilder:validation:Minimum=0
	LowCount int `json:"lowCount"`
}

ExposedSecretSummary is a summary of ExposedSecret counts grouped by Severity.

func (*ExposedSecretSummary) DeepCopy added in v0.1.0

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

func (*ExposedSecretSummary) DeepCopyInto added in v0.1.0

func (in *ExposedSecretSummary) DeepCopyInto(out *ExposedSecretSummary)

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

type InfraAssessmentReport added in v0.7.0

type InfraAssessmentReport struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Report InfraAssessmentReportData `json:"report"`
}

InfraAssessmentReport is a specification for the InfraAssessmentReport resource.

func (*InfraAssessmentReport) DeepCopy added in v0.7.0

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

func (*InfraAssessmentReport) DeepCopyInto added in v0.7.0

func (in *InfraAssessmentReport) DeepCopyInto(out *InfraAssessmentReport)

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

func (*InfraAssessmentReport) DeepCopyObject added in v0.7.0

func (in *InfraAssessmentReport) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type InfraAssessmentReportData added in v0.7.0

type InfraAssessmentReportData struct {
	Scanner Scanner                `json:"scanner"`
	Summary InfraAssessmentSummary `json:"summary"`

	// Checks provides results of conducting audit steps.
	Checks []Check `json:"checks"`
}

func (*InfraAssessmentReportData) DeepCopy added in v0.7.0

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

func (*InfraAssessmentReportData) DeepCopyInto added in v0.7.0

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

type InfraAssessmentReportList added in v0.7.0

type InfraAssessmentReportList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata"`

	Items []InfraAssessmentReport `json:"items"`
}

InfraAssessmentReportList is a list of Infra assessment resources.

func (*InfraAssessmentReportList) DeepCopy added in v0.7.0

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

func (*InfraAssessmentReportList) DeepCopyInto added in v0.7.0

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

func (*InfraAssessmentReportList) DeepCopyObject added in v0.7.0

func (in *InfraAssessmentReportList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type InfraAssessmentSummary added in v0.7.0

type InfraAssessmentSummary struct {

	// CriticalCount is the number of failed checks with critical severity.
	CriticalCount int `json:"criticalCount"`

	// HighCount is the number of failed checks with high severity.
	HighCount int `json:"highCount"`

	// MediumCount is the number of failed checks with medium severity.
	MediumCount int `json:"mediumCount"`

	// LowCount is the number of failed check with low severity.
	LowCount int `json:"lowCount"`
}

InfraAssessmentSummary counts failed checks by severity.

func InfraAssessmentSummaryFromChecks added in v0.7.0

func InfraAssessmentSummaryFromChecks(checks []Check) InfraAssessmentSummary

func (*InfraAssessmentSummary) DeepCopy added in v0.7.0

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

func (*InfraAssessmentSummary) DeepCopyInto added in v0.7.0

func (in *InfraAssessmentSummary) DeepCopyInto(out *InfraAssessmentSummary)

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

type RbacAssessmentReport added in v0.1.3

type RbacAssessmentReport struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Report RbacAssessmentReportData `json:"report"`
}

RbacAssessmentReport is a specification for the RbacAssessmentReport resource.

func (*RbacAssessmentReport) DeepCopy added in v0.1.3

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

func (*RbacAssessmentReport) DeepCopyInto added in v0.1.3

func (in *RbacAssessmentReport) DeepCopyInto(out *RbacAssessmentReport)

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

func (*RbacAssessmentReport) DeepCopyObject added in v0.1.3

func (in *RbacAssessmentReport) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type RbacAssessmentReportData added in v0.1.3

type RbacAssessmentReportData struct {
	Scanner Scanner               `json:"scanner"`
	Summary RbacAssessmentSummary `json:"summary"`

	// Checks provides results of conducting audit steps.
	Checks []Check `json:"checks"`
}

func (*RbacAssessmentReportData) DeepCopy added in v0.1.3

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

func (*RbacAssessmentReportData) DeepCopyInto added in v0.1.3

func (in *RbacAssessmentReportData) DeepCopyInto(out *RbacAssessmentReportData)

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

type RbacAssessmentReportList added in v0.1.3

type RbacAssessmentReportList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata"`

	Items []RbacAssessmentReport `json:"items"`
}

RbacAssessmentReportList is a list of Rbac assessment resources.

func (*RbacAssessmentReportList) DeepCopy added in v0.1.3

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

func (*RbacAssessmentReportList) DeepCopyInto added in v0.1.3

func (in *RbacAssessmentReportList) DeepCopyInto(out *RbacAssessmentReportList)

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

func (*RbacAssessmentReportList) DeepCopyObject added in v0.1.3

func (in *RbacAssessmentReportList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type RbacAssessmentSummary added in v0.1.3

type RbacAssessmentSummary struct {

	// CriticalCount is the number of failed checks with critical severity.
	CriticalCount int `json:"criticalCount"`

	// HighCount is the number of failed checks with high severity.
	HighCount int `json:"highCount"`

	// MediumCount is the number of failed checks with medium severity.
	MediumCount int `json:"mediumCount"`

	// LowCount is the number of failed check with low severity.
	LowCount int `json:"lowCount"`
}

RbacAssessmentSummary counts failed checks by severity.

func RbacAssessmentSummaryFromChecks added in v0.1.3

func RbacAssessmentSummaryFromChecks(checks []Check) RbacAssessmentSummary

func (*RbacAssessmentSummary) DeepCopy added in v0.1.3

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

func (*RbacAssessmentSummary) DeepCopyInto added in v0.1.3

func (in *RbacAssessmentSummary) DeepCopyInto(out *RbacAssessmentSummary)

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

type Registry

type Registry struct {
	// Server the FQDN of registry server.
	//+optional
	Server string `json:"server"`
}

Registry is a collection of repositories used to store Artifacts.

func (*Registry) DeepCopy

func (in *Registry) DeepCopy() *Registry

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

func (*Registry) DeepCopyInto

func (in *Registry) DeepCopyInto(out *Registry)

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

type ReportSpec

type ReportSpec struct {
	// cron define the intervals for report generation
	//+kubebuilder:validation:Pattern=`^(((([\*]{1}){1})|((\*\/){0,1}(([0-9]{1}){1}|(([1-5]{1}){1}([0-9]{1}){1}){1}))) ((([\*]{1}){1})|((\*\/){0,1}(([0-9]{1}){1}|(([1]{1}){1}([0-9]{1}){1}){1}|([2]{1}){1}([0-3]{1}){1}))) ((([\*]{1}){1})|((\*\/){0,1}(([1-9]{1}){1}|(([1-2]{1}){1}([0-9]{1}){1}){1}|([3]{1}){1}([0-1]{1}){1}))) ((([\*]{1}){1})|((\*\/){0,1}(([1-9]{1}){1}|(([1-2]{1}){1}([0-9]{1}){1}){1}|([3]{1}){1}([0-1]{1}){1}))|(jan|feb|mar|apr|may|jun|jul|aug|sep|okt|nov|dec)) ((([\*]{1}){1})|((\*\/){0,1}(([0-7]{1}){1}))|(sun|mon|tue|wed|thu|fri|sat)))$`
	Cron string `json:"cron"`
	//+kubebuilder:validation:Enum={summary,all}
	ReportFormat ReportType `json:"reportType"`
	Complaince   Complaince `json:"compliance"`
}

ReportSpec represent the compliance specification

func (*ReportSpec) DeepCopy

func (in *ReportSpec) DeepCopy() *ReportSpec

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

func (*ReportSpec) DeepCopyInto

func (in *ReportSpec) DeepCopyInto(out *ReportSpec)

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

type ReportStatus

type ReportStatus struct {
	Summary ComplianceSummary `json:"summary,omitempty"`

	UpdateTimestamp metav1.Time `json:"updateTimestamp"`
	// +kubebuilder:validation:Optional
	// +kubebuilder:validation:XPreserveUnknownFields
	DetailReport *ComplianceReport `json:"detailReport,omitempty"`
	// +kubebuilder:validation:Optional
	// +kubebuilder:validation:XPreserveUnknownFields
	SummaryReport *SummaryReport `json:"summaryReport,omitempty"`
}

func (*ReportStatus) DeepCopy

func (in *ReportStatus) DeepCopy() *ReportStatus

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

func (*ReportStatus) DeepCopyInto

func (in *ReportStatus) DeepCopyInto(out *ReportStatus)

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

type ReportType added in v0.9.0

type ReportType string
const (
	ReportSummary ReportType = "summary"
	ReportDetail  ReportType = "all"
)

type Scanner

type Scanner struct {
	// Name the name of the scanner.
	Name string `json:"name"`

	// Vendor the name of the vendor providing the scanner.
	Vendor string `json:"vendor"`

	// Version the version of the scanner.
	Version string `json:"version"`
}

Scanner is the spec for a scanner generating a security assessment report.

func (*Scanner) DeepCopy

func (in *Scanner) DeepCopy() *Scanner

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

func (*Scanner) DeepCopyInto

func (in *Scanner) DeepCopyInto(out *Scanner)

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

type Severity

type Severity string

Severity level of a vulnerability or a configuration audit check. +enum

const (
	SeverityCritical Severity = "CRITICAL"
	SeverityHigh     Severity = "HIGH"
	SeverityMedium   Severity = "MEDIUM"
	SeverityLow      Severity = "LOW"

	SeverityUnknown Severity = "UNKNOWN"
)

func StringToSeverity

func StringToSeverity(name string) (Severity, error)

StringToSeverity returns the enum constant of Severity with the specified name. The name must match exactly an identifier used to declare an enum constant. (Extraneous whitespace characters are not permitted.)

type SpecCheck

type SpecCheck struct {
	// id define the check id as produced by scanner
	ID string `json:"id"`
}

SpecCheck represent the scanner who perform the control check

func (*SpecCheck) DeepCopy

func (in *SpecCheck) DeepCopy() *SpecCheck

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

func (*SpecCheck) DeepCopyInto

func (in *SpecCheck) DeepCopyInto(out *SpecCheck)

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

type SummaryReport added in v0.9.0

type SummaryReport struct {
	ID              string                `json:"id,omitempty"`
	Title           string                `json:"title,omitempty"`
	SummaryControls []ControlCheckSummary `json:"controlCheck,omitempty"`
}

SummaryReport represents a kubernetes scan report with consolidated findings

func FromSummaryReport added in v0.9.0

func FromSummaryReport(sr *report.SummaryReport) *SummaryReport

FromSummaryReport map data from trivy summary report to crd summary report

func (*SummaryReport) DeepCopy added in v0.9.0

func (in *SummaryReport) DeepCopy() *SummaryReport

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

func (*SummaryReport) DeepCopyInto added in v0.9.0

func (in *SummaryReport) DeepCopyInto(out *SummaryReport)

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

type Vulnerability

type Vulnerability struct {
	// VulnerabilityID the vulnerability identifier.
	VulnerabilityID string `json:"vulnerabilityID"`

	// Resource is a vulnerable package, application, or library.
	Resource string `json:"resource"`

	// InstalledVersion indicates the installed version of the Resource.
	InstalledVersion string `json:"installedVersion"`

	// FixedVersion indicates the version of the Resource in which this vulnerability has been fixed.
	FixedVersion string `json:"fixedVersion"`

	// Severity level of a vulnerability or a configuration audit check.
	//+kubebuilder:validation:Enum={CRITICAL,HIGH,MEDIUM,LOW,UNKNOWN}
	Severity    Severity `json:"severity"`
	Title       string   `json:"title"`
	Description string   `json:"description,omitempty"`
	CVSSSource  string   `json:"cvsssource,omitempty"`
	PrimaryLink string   `json:"primaryLink,omitempty"`
	//+optional
	Links []string `json:"links"`
	Score *float64 `json:"score,omitempty"`
	//+optional
	Target string `json:"target"`
	//+optional
	CVSS types.VendorCVSS `json:"cvss,omitempty"`
	//+optional
	Class       string `json:"class,omitempty"`
	PackageType string `json:"packageType,omitempty"`
}

Vulnerability is the spec for a vulnerability record.

func (*Vulnerability) DeepCopy

func (in *Vulnerability) DeepCopy() *Vulnerability

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

func (*Vulnerability) DeepCopyInto

func (in *Vulnerability) DeepCopyInto(out *Vulnerability)

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

type VulnerabilityReport

type VulnerabilityReport struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	// Report is the actual vulnerability report data.
	Report VulnerabilityReportData `json:"report"`
}

VulnerabilityReport summarizes vulnerabilities in application dependencies and operating system packages built into container images.

func (*VulnerabilityReport) DeepCopy

func (in *VulnerabilityReport) DeepCopy() *VulnerabilityReport

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

func (*VulnerabilityReport) DeepCopyInto

func (in *VulnerabilityReport) DeepCopyInto(out *VulnerabilityReport)

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

func (*VulnerabilityReport) DeepCopyObject

func (in *VulnerabilityReport) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type VulnerabilityReportData

type VulnerabilityReportData struct {
	// UpdateTimestamp is a timestamp representing the server time in UTC when this report was updated.
	// +kubebuilder:validation:Type=string
	// +kubebuilder:validation:Format=date-time
	UpdateTimestamp metav1.Time `json:"updateTimestamp"`

	// Scanner is the scanner that generated this report.
	Scanner Scanner `json:"scanner"`

	// Registry is the registry the Artifact was pulled from.
	//+optional
	Registry Registry `json:"registry"`

	// Artifact represents a standalone, executable package of software that includes everything needed to
	// run an application.
	Artifact Artifact `json:"artifact"`

	// Summary is a summary of Vulnerability counts grouped by Severity.
	Summary VulnerabilitySummary `json:"summary"`

	// Vulnerabilities is a list of operating system (OS) or application software Vulnerability items found in the Artifact.
	Vulnerabilities []Vulnerability `json:"vulnerabilities"`
}

VulnerabilityReportData is the spec for the vulnerability scan result.

The spec follows the Pluggable Scanners API defined for Harbor. @see https://github.com/goharbor/pluggable-scanner-spec/blob/master/api/spec/scanner-adapter-openapi-v1.0.yaml

func (*VulnerabilityReportData) DeepCopy

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

func (*VulnerabilityReportData) DeepCopyInto

func (in *VulnerabilityReportData) DeepCopyInto(out *VulnerabilityReportData)

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

type VulnerabilityReportList

type VulnerabilityReportList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata"`

	// Vulnerability is the spec for a vulnerability record.
	Items []VulnerabilityReport `json:"items"`
}

VulnerabilityReportList is a list of VulnerabilityReport resources.

func (*VulnerabilityReportList) DeepCopy

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

func (*VulnerabilityReportList) DeepCopyInto

func (in *VulnerabilityReportList) DeepCopyInto(out *VulnerabilityReportList)

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

func (*VulnerabilityReportList) DeepCopyObject

func (in *VulnerabilityReportList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type VulnerabilitySummary

type VulnerabilitySummary struct {
	// CriticalCount is the number of vulnerabilities with Critical Severity.
	//+kubebuilder:validation:Minimum=0
	CriticalCount int `json:"criticalCount"`

	// HighCount is the number of vulnerabilities with High Severity.
	//+kubebuilder:validation:Minimum=0
	HighCount int `json:"highCount"`

	// MediumCount is the number of vulnerabilities with Medium Severity.
	//+kubebuilder:validation:Minimum=0
	MediumCount int `json:"mediumCount"`

	// LowCount is the number of vulnerabilities with Low Severity.
	//+kubebuilder:validation:Minimum=0
	LowCount int `json:"lowCount"`

	// UnknownCount is the number of vulnerabilities with unknown severity.
	//+kubebuilder:validation:Minimum=0
	UnknownCount int `json:"unknownCount"`

	// NoneCount is the number of packages without any vulnerability.
	//+kubebuilder:validation:Minimum=0
	//+optional
	NoneCount int `json:"noneCount"`
}

VulnerabilitySummary is a summary of Vulnerability counts grouped by Severity.

func (*VulnerabilitySummary) DeepCopy

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

func (*VulnerabilitySummary) DeepCopyInto

func (in *VulnerabilitySummary) DeepCopyInto(out *VulnerabilitySummary)

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