Documentation ¶
Index ¶
Constants ¶
View Source
const ( SeverityCriticalString = "Critical" SeverityHighString = "High" SeverityMediumString = "Medium" SeverityLowString = "Low" SeverityUnknownString = "Unknown" )
View Source
const ( SeverityUnknown = iota SeverityLow = iota SeverityMedium = iota SeverityHigh = iota SeverityCritical = iota )
View Source
const NumberOfSeverities = 5
Variables ¶
This section is empty.
Functions ¶
func ControlSeverityToInt ¶
func ControlSeverityToString ¶
func GetSupportedSeverities ¶ added in v0.0.194
func GetSupportedSeverities() []string
GetSupportedSeverities returns a slice of supported severities
func SeverityNumberToString ¶ added in v0.0.185
Types ¶
type IStatus ¶
type IStatus interface { Status() ScanningStatus Info() string IsPassed() bool IsFailed() bool IsExcluded() bool IsSkipped() bool }
IStatus interface handling status
type ScanningStatus ¶
type ScanningStatus string
const ( StatusPassed ScanningStatus = "passed" StatusExcluded ScanningStatus = "excluded" StatusIgnored ScanningStatus = "ignored" StatusFailed ScanningStatus = "failed" StatusSkipped ScanningStatus = "skipped" StatusUnknown ScanningStatus = "" // keep this empty StatusIrrelevant ScanningStatus = "irrelevant" StatusError ScanningStatus = "error" )
const (
InfoStatusSkipped ScanningStatus = "skipped"
)
func Compare ¶
func Compare(a, b ScanningStatus) ScanningStatus
Compare receive two statuses and returns the more significant one
status level: 1. failed 2. excludes 3. passed 4. skipped/ignore e.g.: Compare(failed, excludes) -> failed Compare(passed, excludes) -> excludes Compare(skipped, excludes) -> excludes Compare(failed, passed) -> failed
type StatusInfo ¶
type StatusInfo struct { InnerStatus ScanningStatus `json:"status,omitempty"` InnerInfo string `json:"info,omitempty"` }
func (*StatusInfo) Info ¶
func (s *StatusInfo) Info() string
func (*StatusInfo) IsExcluded ¶
func (s *StatusInfo) IsExcluded() bool
IsExcluded is the status excluded
func (*StatusInfo) IsSkipped ¶
func (s *StatusInfo) IsSkipped() bool
IsSkipped is the status skipped
func (*StatusInfo) Status ¶
func (s *StatusInfo) Status() ScanningStatus
Click to show internal directories.
Click to hide internal directories.