-
Notifications
You must be signed in to change notification settings - Fork 2.3k
/
compliance.go
33 lines (28 loc) · 975 Bytes
/
compliance.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
package types
type Severity string
type ControlStatus string
// SpecCheck represent the scanner who perform the control check
type SpecCheck struct {
ID string `yaml:"id"`
}
// ComplianceSpec represent the compliance specification
type ComplianceSpec struct {
Spec Spec `yaml:"spec"`
}
type Spec struct {
ID string `yaml:"id"`
Title string `yaml:"title"`
Description string `yaml:"description"`
Version string `yaml:"version"`
RelatedResources []string `yaml:"relatedResources"`
Controls []Control `yaml:"controls"`
}
// Control represent the cps controls data and mapping checks
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"`
}