From 5d5f8dbd3d728e883fbc0ba8940c11a3ed622d08 Mon Sep 17 00:00:00 2001 From: Eran Turgeman Date: Sun, 8 Dec 2024 13:39:56 +0200 Subject: [PATCH] fixed prefix in markdown messages counting in sarif validations --- utils/validations/test_validate_sarif.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/validations/test_validate_sarif.go b/utils/validations/test_validate_sarif.go index ace35d83..24864996 100644 --- a/utils/validations/test_validate_sarif.go +++ b/utils/validations/test_validate_sarif.go @@ -155,7 +155,7 @@ func countJasResults(runs []*sarif.Run) (vulnerabilities, violations int) { for _, run := range runs { for _, result := range run.Results { // JAS results does not have watch property yet, we should infer by prefix in msg - if strings.HasPrefix(sarifutils.GetResultMsgMarkdown(result), "Security violation") { + if strings.HasPrefix(sarifutils.GetResultMsgMarkdown(result), "[Security violation]") { violations++ } else { vulnerabilities++