diff --git a/pkg/models/helpers.go b/pkg/models/helpers.go index 8c082550d..088613044 100644 --- a/pkg/models/helpers.go +++ b/pkg/models/helpers.go @@ -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 {