Compare commits

...

1 commit

Author SHA1 Message Date
bui
86cf353456 make GetScope normalize the scope when we can 2023-01-17 14:47:53 +01:00

View file

@ -1,5 +1,9 @@
package models
import (
"strings"
)
func (a *Alert) HasRemediation() bool {
return true
}
@ -8,7 +12,15 @@ func (a *Alert) GetScope() string {
if a.Source.Scope == nil {
return ""
}
return *a.Source.Scope
//Normalize scope when we can
switch strings.ToLower(*a.Source.Scope) {
case "ip":
return "Ip"
case "range":
return "Range"
default:
return *a.Source.Scope
}
}
func (a *Alert) GetValue() string {