Merge pull request #222 from manuelbua/fix-severity-filtering-border-case

Fix minor issue where a dangling comma can cause any severity to match
This commit is contained in:
bauthard 2020-08-08 01:07:05 +05:30 committed by GitHub
commit b3ca1aa0d9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -191,7 +191,7 @@ func isNewPath(path string, pathMap map[string]bool) bool {
func hasMatchingSeverity(templateSeverity string, allowedSeverities []string) bool {
for _, s := range allowedSeverities {
if strings.HasPrefix(templateSeverity, s) {
if s != "" && strings.HasPrefix(templateSeverity, s) {
return true
}
}