report

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2023 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ComplianceReport

type ComplianceReport struct {
	metav1.ObjectMeta `json:"metadata,omitempty" yaml:"metadata,omitempty"`
	Spec              Spec `json:"spec" yaml:"spec"`
}

type ComplianceStatus

type ComplianceStatus string

RuleStatus is a status of rule result

const (
	ComplianceStatusCompliant    ComplianceStatus = "Compliant"
	ComplianceStatusNonCompliant ComplianceStatus = "NonCompliant"
)

type Component

type Component struct {
	// Component title in component-definition
	ComponentTitle string `json:"componentTitle,omitempty" yaml:"componentTitle,omitempty"`
	// Compliance status
	ComplianceStatus ComplianceStatus `json:"complianceStatus,omitempty" yaml:"complianceStatus,omitempty"`
	// Required controls
	RequiredControls []string `json:"requiredControls,omitempty" yaml:"requiredControls,omitempty"`
	// Checked controls
	CheckedControls []string `json:"checkedControls,omitempty" yaml:"checkedControls,omitempty"`
	// Used parameters
	Parameters map[string]string `json:"parameters,omitempty" yaml:"parameters,omitempty"`
	// Results per control
	ControlResults []ControlResult `json:"controlResults,omitempty" yaml:"controlResults,omitempty"`
}

type ControlResult

type ControlResult struct {
	// Control ID
	ControlId string `json:"controlId,omitempty" yaml:"controlId,omitempty"`
	// Compliance status
	ComplianceStatus ComplianceStatus `json:"complianceStatus,omitempty" yaml:"complianceStatus,omitempty"`
	// Results per rule
	RuleResults []RuleResult `json:"ruleResults,omitempty" yaml:"ruleResults,omitempty"`
}

type RuleResult

type RuleResult struct {
	// Rule ID
	RuleId string `json:"ruleId,omitempty" yaml:"ruleId,omitempty"`
	// Policy ID
	PolicyId string `json:"policyId,omitempty" yaml:"policyId,omitempty"`
	// Status
	Status RuleStatus `json:"status,omitempty" yaml:"status,omitempty"`
	// Reason
	Reason string `json:"reason,omitempty" yaml:"reason,omitempty"`
}

type RuleStatus

type RuleStatus string

RuleStatus is a status of rule result

const (
	// If test passed
	RuleStatusPass RuleStatus = "pass"

	// If test failed
	RuleStatusFail RuleStatus = "fail"

	// If test ended with error
	RuleStatusError RuleStatus = "error"

	// If rule doesn't have any implementation
	RuleStatusUnImplemented RuleStatus = "unimplemented"
)

type Spec

type Spec struct {
	Catalog    string      `json:"catalog,omitempty" yaml:"catalog,omitempty"`
	Profile    string      `json:"profile,omitempty" yaml:"profile,omitempty"`
	Components []Component `json:"components,omitempty" yaml:"components,omitempty"`
}

Jump to

Keyboard shortcuts

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