v1

package
v0.0.0-...-d870e27 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package v1 contains API Schema definitions for the execution v1 API group +kubebuilder:object:generate=true +groupName=execution.experimental.securecodebox.io

Index

Constants

This section is empty.

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "execution.experimental.securecodebox.io", Version: "v1"}

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

Functions

This section is empty.

Types

type ExtractResults

type ExtractResults struct {
	// Indicates the type of the file. Usually a combination of the scanner name and file type. E.g. `nmap-xml`
	Type string `json:"type,omitempty"`

	// From where to extract the file? Absolute path on the containers file system. Must be located in `/home/securecodebox/`. E.g. `/home/securecodebox/nmap-results.xml`
	Location string `json:"location,omitempty"`
}

ExtractResults configures where the secureCodeBox can find the results of the scan once the scanner container exited.

func (*ExtractResults) DeepCopy

func (in *ExtractResults) DeepCopy() *ExtractResults

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

func (*ExtractResults) DeepCopyInto

func (in *ExtractResults) DeepCopyInto(out *ExtractResults)

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

type FindingSeverities

type FindingSeverities struct {
	Informational uint64 `json:"informational,omitempty"`
	Low           uint64 `json:"low,omitempty"`
	Medium        uint64 `json:"medium,omitempty"`
	High          uint64 `json:"high,omitempty"`
}

FindingSeverities indicates the count of finding with the respective severity

func (*FindingSeverities) DeepCopy

func (in *FindingSeverities) DeepCopy() *FindingSeverities

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

func (*FindingSeverities) DeepCopyInto

func (in *FindingSeverities) DeepCopyInto(out *FindingSeverities)

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

type FindingStats

type FindingStats struct {
	// Count indicates how many findings were identified in total
	Count uint64 `json:"count,omitempty"`
	// FindingSeverities indicates the count of finding with the respective severity
	FindingSeverities FindingSeverities `json:"severities,omitempty"`
	// FindingCategories indicates the count of finding broken down by their categories
	FindingCategories map[string]uint64 `json:"categories,omitempty"`
}

FindingStats contains the general stats about the results of the scan

func (*FindingStats) DeepCopy

func (in *FindingStats) DeepCopy() *FindingStats

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

func (*FindingStats) DeepCopyInto

func (in *FindingStats) DeepCopyInto(out *FindingStats)

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

type HookState

type HookState string

HookState Describes the State of a Hook on a Scan

const (
	Pending    HookState = "Pending"
	InProgress HookState = "InProgress"
	Completed  HookState = "Completed"
	Cancelled  HookState = "Cancelled"
	Failed     HookState = "Failed"
)

type HookStatus

type HookStatus struct {
	HookName string    `json:"hookName"`
	State    HookState `json:"state"`
	JobName  string    `json:"jobName,omitempty"`
}

func (*HookStatus) DeepCopy

func (in *HookStatus) DeepCopy() *HookStatus

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

func (*HookStatus) DeepCopyInto

func (in *HookStatus) DeepCopyInto(out *HookStatus)

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

type HookType

type HookType string

HookType Defines weather the hook should be able to change the findings or is run in a read only mode.

const (
	// ReadOnly ReadOnly Hooks are executed in parallel
	ReadOnly HookType = "ReadOnly"
	// ReadAndWrite ReadAndWrite Hooks are executed serially
	ReadAndWrite HookType = "ReadAndWrite"
)

type ParseDefinition

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

	Spec   ParseDefinitionSpec   `json:"spec,omitempty"`
	Status ParseDefinitionStatus `json:"status,omitempty"`
}

ParseDefinition is the Schema for the parsedefinitions API

func (*ParseDefinition) DeepCopy

func (in *ParseDefinition) DeepCopy() *ParseDefinition

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

func (*ParseDefinition) DeepCopyInto

func (in *ParseDefinition) DeepCopyInto(out *ParseDefinition)

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

func (*ParseDefinition) DeepCopyObject

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

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

type ParseDefinitionList

type ParseDefinitionList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []ParseDefinition `json:"items"`
}

ParseDefinitionList contains a list of ParseDefinition

func (*ParseDefinitionList) DeepCopy

func (in *ParseDefinitionList) DeepCopy() *ParseDefinitionList

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

func (*ParseDefinitionList) DeepCopyInto

func (in *ParseDefinitionList) DeepCopyInto(out *ParseDefinitionList)

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

func (*ParseDefinitionList) DeepCopyObject

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

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

type ParseDefinitionSpec

type ParseDefinitionSpec struct {

	// Foo is an example field of ParseDefinition. Edit ParseDefinition_types.go to remove/update
	HandlesResultsType string                        `json:"handlesResultsType,omitempty"`
	Image              string                        `json:"image,omitempty"`
	ImagePullSecrets   []corev1.LocalObjectReference `json:"imagePullSecrets,omitempty"`
}

ParseDefinitionSpec defines the desired state of ParseDefinition

func (*ParseDefinitionSpec) DeepCopy

func (in *ParseDefinitionSpec) DeepCopy() *ParseDefinitionSpec

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

func (*ParseDefinitionSpec) DeepCopyInto

func (in *ParseDefinitionSpec) DeepCopyInto(out *ParseDefinitionSpec)

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

type ParseDefinitionStatus

type ParseDefinitionStatus struct {
}

ParseDefinitionStatus defines the observed state of ParseDefinition

func (*ParseDefinitionStatus) DeepCopy

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

func (*ParseDefinitionStatus) DeepCopyInto

func (in *ParseDefinitionStatus) DeepCopyInto(out *ParseDefinitionStatus)

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

type Scan

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

	Spec   ScanSpec   `json:"spec,omitempty"`
	Status ScanStatus `json:"status,omitempty"`
}

Scan is the Schema for the scans API

func (*Scan) DeepCopy

func (in *Scan) DeepCopy() *Scan

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

func (*Scan) DeepCopyInto

func (in *Scan) DeepCopyInto(out *Scan)

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

func (*Scan) DeepCopyObject

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

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

type ScanCompletionHook

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

	Spec   ScanCompletionHookSpec   `json:"spec,omitempty"`
	Status ScanCompletionHookStatus `json:"status,omitempty"`
}

ScanCompletionHook is the Schema for the ScanCompletionHooks API

func (*ScanCompletionHook) DeepCopy

func (in *ScanCompletionHook) DeepCopy() *ScanCompletionHook

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

func (*ScanCompletionHook) DeepCopyInto

func (in *ScanCompletionHook) DeepCopyInto(out *ScanCompletionHook)

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

func (*ScanCompletionHook) DeepCopyObject

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

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

type ScanCompletionHookList

type ScanCompletionHookList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []ScanCompletionHook `json:"items"`
}

ScanCompletionHookList contains a list of ScanCompletionHook

func (*ScanCompletionHookList) DeepCopy

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

func (*ScanCompletionHookList) DeepCopyInto

func (in *ScanCompletionHookList) DeepCopyInto(out *ScanCompletionHookList)

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

func (*ScanCompletionHookList) DeepCopyObject

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

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

type ScanCompletionHookSpec

type ScanCompletionHookSpec struct {

	// Image is the container image for the hooks kubernetes job
	Image            string                        `json:"image,omitempty"`
	ImagePullSecrets []corev1.LocalObjectReference `json:"imagePullSecrets,omitempty"`
	Env              []corev1.EnvVar               `json:"env,omitempty"`
	Type             HookType                      `json:"type"`
	// ServiceAccountName Name of the serviceAccount Name used. Should only be used if your hook needs specifc RBAC Access. Otherwise the hook is run using a "scan-completion-hook" service account. The service account should have at least "get" rights on scans.execution.experimental.securecodebox.io, and "get" & "patch" scans.execution.experimental.securecodebox.io/status
	ServiceAccountName *string `json:"serviceAccountName,omitempty"`
}

ScanCompletionHookSpec defines the desired state of ScanCompletionHook

func (*ScanCompletionHookSpec) DeepCopy

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

func (*ScanCompletionHookSpec) DeepCopyInto

func (in *ScanCompletionHookSpec) DeepCopyInto(out *ScanCompletionHookSpec)

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

type ScanCompletionHookStatus

type ScanCompletionHookStatus struct {
}

ScanCompletionHookStatus defines the observed state of ScanCompletionHook

func (*ScanCompletionHookStatus) DeepCopy

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

func (*ScanCompletionHookStatus) DeepCopyInto

func (in *ScanCompletionHookStatus) DeepCopyInto(out *ScanCompletionHookStatus)

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

type ScanList

type ScanList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []Scan `json:"items"`
}

ScanList type wrapping multiple Scans

func (*ScanList) DeepCopy

func (in *ScanList) DeepCopy() *ScanList

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

func (*ScanList) DeepCopyInto

func (in *ScanList) DeepCopyInto(out *ScanList)

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

func (*ScanList) DeepCopyObject

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

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

type ScanSpec

type ScanSpec struct {
	ScanType string `json:"scanType,omitempty"`

	Parameters []string `json:"parameters,omitempty"`

	// Env allows to specify environment vars for the scanner container. These will be merged will the env vars specified for the first container of the pod defined in the ScanType
	Env []corev1.EnvVar `json:"env,omitempty"`

	Cascades *metav1.LabelSelector `json:"cascades,omitempty"`
}

ScanSpec defines the desired state of Scan

func (*ScanSpec) DeepCopy

func (in *ScanSpec) DeepCopy() *ScanSpec

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

func (*ScanSpec) DeepCopyInto

func (in *ScanSpec) DeepCopyInto(out *ScanSpec)

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

type ScanStatus

type ScanStatus struct {
	State string `json:"state,omitempty"`

	ErrorDescription string `json:"errorDescription,omitempty"`

	// RawResultType determines which kind of ParseDefinition will be used to turn the raw results of the scanner into findings
	RawResultType string `json:"rawResultType,omitempty"`
	// RawResultFile Filename of the result file of the scanner. e.g. `nmap-result.xml`
	RawResultFile string `json:"rawResultFile,omitempty"`

	Findings FindingStats `json:"findings,omitempty"`

	ReadAndWriteHookStatus []HookStatus `json:"readAndWriteHookStatus,omitempty"`
}

ScanStatus defines the observed state of Scan

func (*ScanStatus) DeepCopy

func (in *ScanStatus) DeepCopy() *ScanStatus

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

func (*ScanStatus) DeepCopyInto

func (in *ScanStatus) DeepCopyInto(out *ScanStatus)

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

type ScanType

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

	Spec   ScanTypeSpec   `json:"spec,omitempty"`
	Status ScanTypeStatus `json:"status,omitempty"`
}

ScanType is the Schema for the scantypes API

func (*ScanType) DeepCopy

func (in *ScanType) DeepCopy() *ScanType

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

func (*ScanType) DeepCopyInto

func (in *ScanType) DeepCopyInto(out *ScanType)

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

func (*ScanType) DeepCopyObject

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

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

type ScanTypeList

type ScanTypeList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []ScanType `json:"items"`
}

ScanTypeList contains a list of ScanType

func (*ScanTypeList) DeepCopy

func (in *ScanTypeList) DeepCopy() *ScanTypeList

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

func (*ScanTypeList) DeepCopyInto

func (in *ScanTypeList) DeepCopyInto(out *ScanTypeList)

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

func (*ScanTypeList) DeepCopyObject

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

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

type ScanTypeSpec

type ScanTypeSpec struct {
	ExtractResults ExtractResults `json:"extractResults,omitempty"`

	// Template of the kubernetes job to create when running the scan
	JobTemplate batchv1.Job `json:"jobTemplate,omitempty"`
}

ScanTypeSpec defines the desired state of ScanType

func (*ScanTypeSpec) DeepCopy

func (in *ScanTypeSpec) DeepCopy() *ScanTypeSpec

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

func (*ScanTypeSpec) DeepCopyInto

func (in *ScanTypeSpec) DeepCopyInto(out *ScanTypeSpec)

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

type ScanTypeStatus

type ScanTypeStatus struct {
}

ScanTypeStatus defines the observed state of ScanType

func (*ScanTypeStatus) DeepCopy

func (in *ScanTypeStatus) DeepCopy() *ScanTypeStatus

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

func (*ScanTypeStatus) DeepCopyInto

func (in *ScanTypeStatus) DeepCopyInto(out *ScanTypeStatus)

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

type ScheduledScan

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

	Spec   ScheduledScanSpec   `json:"spec,omitempty"`
	Status ScheduledScanStatus `json:"status,omitempty"`
}

ScheduledScan is the Schema for the scheduledscans API

func (*ScheduledScan) DeepCopy

func (in *ScheduledScan) DeepCopy() *ScheduledScan

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

func (*ScheduledScan) DeepCopyInto

func (in *ScheduledScan) DeepCopyInto(out *ScheduledScan)

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

func (*ScheduledScan) DeepCopyObject

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

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

type ScheduledScanList

type ScheduledScanList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []ScheduledScan `json:"items"`
}

ScheduledScanList contains a list of ScheduledScan

func (*ScheduledScanList) DeepCopy

func (in *ScheduledScanList) DeepCopy() *ScheduledScanList

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

func (*ScheduledScanList) DeepCopyInto

func (in *ScheduledScanList) DeepCopyInto(out *ScheduledScanList)

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

func (*ScheduledScanList) DeepCopyObject

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

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

type ScheduledScanSpec

type ScheduledScanSpec struct {

	// Interval describes how often the scan should be repeated
	// Examples: '12h', '7d', '30m' (only days, hours and minutes supported, specified as integers)
	Interval metav1.Duration `json:"interval"`

	// HistoryLimit determines how many past Scans will be kept until the oldest one will be delted, defaults to 3. When set to 0 Scans will be deleted directly after completion
	HistoryLimit int64 `json:"historyLimit,omitempty"`

	// Foo is an example field of ScheduledScan. Edit ScheduledScan_types.go to remove/update
	ScanSpec *ScanSpec `json:"scanSpec"`
}

ScheduledScanSpec defines the desired state of ScheduledScan

func (*ScheduledScanSpec) DeepCopy

func (in *ScheduledScanSpec) DeepCopy() *ScheduledScanSpec

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

func (*ScheduledScanSpec) DeepCopyInto

func (in *ScheduledScanSpec) DeepCopyInto(out *ScheduledScanSpec)

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

type ScheduledScanStatus

type ScheduledScanStatus struct {
	LastScheduleTime *metav1.Time `json:"lastScheduleTime,omitempty"`

	// Findings Contains the findings stats of the most recent completed scan
	Findings FindingStats `json:"findings,omitempty"`
}

ScheduledScanStatus defines the observed state of ScheduledScan

func (*ScheduledScanStatus) DeepCopy

func (in *ScheduledScanStatus) DeepCopy() *ScheduledScanStatus

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

func (*ScheduledScanStatus) DeepCopyInto

func (in *ScheduledScanStatus) DeepCopyInto(out *ScheduledScanStatus)

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