Documentation ¶
Index ¶
- func AggregateAllChecksBySpecID(multiResults []types.Results, cs ComplianceSpec) map[string]types.Results
- func GetComplianceSpec(specNameOrPath string) ([]byte, error)
- func MapSpecCheckIDToFilteredResults(result types.Result, checkIDs map[types.SecurityCheck][]string) map[string]types.Results
- type ComplianceSpec
- type Control
- type ControlCheck
- type ControlStatus
- type Severity
- type Spec
- type SpecCheck
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AggregateAllChecksBySpecID ¶
func AggregateAllChecksBySpecID(multiResults []types.Results, cs ComplianceSpec) map[string]types.Results
AggregateAllChecksBySpecID aggregates all scan results and map it to spec ids
func GetComplianceSpec ¶
GetComlianceSpec accepct compliance flag name/path and return builtin or file system loaded spec
func MapSpecCheckIDToFilteredResults ¶
func MapSpecCheckIDToFilteredResults(result types.Result, checkIDs map[types.SecurityCheck][]string) map[string]types.Results
MapSpecCheckIDToFilteredResults map spec check id to filtered scan results
Types ¶
type ComplianceSpec ¶
type ComplianceSpec struct {
Spec Spec `yaml:"spec"`
}
ComplianceSpec represent the compliance specification
func (*ComplianceSpec) CheckIDs ¶
func (cs *ComplianceSpec) CheckIDs() map[types.SecurityCheck][]string
CheckIDs return list of compliance check IDs
func (*ComplianceSpec) SecurityChecks ¶
func (cs *ComplianceSpec) SecurityChecks() ([]types.SecurityCheck, error)
SecurityChecks reads spec control and determines the scanners by check ID prefix
type Control ¶
type Control struct { ID string `yaml:"id"` Name string `yaml:"name"` Description string `yaml:"description,omitempty"` Checks []SpecCheck `yaml:"checks"` Severity Severity `yaml:"severity"` DefaultStatus ControlStatus `yaml:"defaultStatus,omitempty"` }
Control represent the cps controls data and mapping checks
type ControlCheck ¶
type ControlCheck struct { ID string `yaml:"id"` Name string `yaml:"name"` Description string `yaml:"description,omitempty"` PassTotal int `yaml:"passTotal"` FailTotal int `yaml:"failTotal"` Severity Severity `yaml:"severity"` }
ControlCheck provides the result of conducting a single audit step.
type ControlStatus ¶
type ControlStatus string
const ( FailStatus ControlStatus = "FAIL" PassStatus ControlStatus = "PASS" WarnStatus ControlStatus = "WARN" )
Click to show internal directories.
Click to hide internal directories.