-
Notifications
You must be signed in to change notification settings - Fork 2
/
misconfiguration.go
44 lines (36 loc) · 1.51 KB
/
misconfiguration.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
34
35
36
37
38
39
40
41
42
43
44
package types
import ftypes "github.com/khulnasoft-lab/vul/pkg/fanal/types"
// DetectedMisconfiguration holds detected misconfigurations
type DetectedMisconfiguration struct {
Type string `json:",omitempty"`
ID string `json:",omitempty"`
AVDID string `json:",omitempty"`
Title string `json:",omitempty"`
Description string `json:",omitempty"`
Message string `json:",omitempty"`
Namespace string `json:",omitempty"`
Query string `json:",omitempty"`
Resolution string `json:",omitempty"`
Severity string `json:",omitempty"`
PrimaryURL string `json:",omitempty"`
References []string `json:",omitempty"`
Status MisconfStatus `json:",omitempty"`
Layer ftypes.Layer `json:",omitempty"`
CauseMetadata ftypes.CauseMetadata `json:",omitempty"`
// For debugging
Traces []string `json:",omitempty"`
}
// MisconfStatus represents a status of misconfiguration
type MisconfStatus string
const (
// StatusPassed represents successful status
StatusPassed MisconfStatus = "PASS"
// StatusFailure represents failure status
StatusFailure MisconfStatus = "FAIL"
// StatusException Passed represents the status of exception
StatusException MisconfStatus = "EXCEPTION"
)
// GetID retrun misconfig ID
func (mc *DetectedMisconfiguration) GetID() string {
return mc.AVDID
}