Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ActionItem ¶
type ActionItem struct { ResourceNamespace string ResourceKind string ResourceName string Title string Description string Remediation string EventType string Severity float64 Category string }
ActionItem represents an action item from a report
func ProcessCheckForItem ¶
func ProcessCheckForItem(ctx context.Context, check CustomCheck, instance CustomCheckInstance, obj map[string]interface{}, resourceName, resourceKind, resourceNamespace string) ([]ActionItem, error)
type CheckSetting ¶
type CheckSetting struct { CheckName string Targets []string AdditionalData struct { Name string Output OutputFormat Parameters map[string]interface{} } }
func (CheckSetting) GetUnstructuredObject ¶
func (supposedInstance CheckSetting) GetUnstructuredObject(namespace string) *unstructured.Unstructured
type CustomCheck ¶
type CustomCheck struct { metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` Spec CustomCheckSpec }
CustomCheck is a custom OPA check.
type CustomCheckInstance ¶
type CustomCheckInstance struct { metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` Spec CustomCheckInstanceSpec }
CustomCheckInstance is an instance of a custom check
type CustomCheckInstanceSpec ¶
type CustomCheckInstanceSpec struct { Parameters map[string]interface{} Targets []KubeTarget Output OutputFormat CustomCheckName string }
CustomCheckInstanceSpec is the body of an instance of a custom check
type CustomCheckSpec ¶
type CustomCheckSpec struct { AdditionalKubernetesData []KubeTarget Output OutputFormat Rego string }
CustomCheckSpec is the body of a Custom Check object
type KubeTarget ¶
KubeTarget is a mapping of kinds and API groups
type OPACustomCheck ¶
type OPACustomCheck struct { Name string Rego string Title *string Severity *float64 Remediation *string Category *string AdditionalKubernetesData []string }
func (OPACustomCheck) GetUnstructuredObject ¶
func (supposedCheck OPACustomCheck) GetUnstructuredObject(namespace string) *unstructured.Unstructured
type OutputFormat ¶
type OutputFormat struct { Title *string Severity *float64 Remediation *string Category *string Description *string }
func (*OutputFormat) SetDefaults ¶
func (o *OutputFormat) SetDefaults(others ...OutputFormat)
Click to show internal directories.
Click to hide internal directories.