From 385745e8a6c7b507fc635ecc8699241775d7f179 Mon Sep 17 00:00:00 2001 From: Sumit Morchhale Date: Wed, 26 Nov 2025 20:18:10 +0530 Subject: [PATCH 1/2] skip apisec from Total Severity --- internal/wrappers/results-summary.go | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/internal/wrappers/results-summary.go b/internal/wrappers/results-summary.go index d7cf67798..4e90a453c 100644 --- a/internal/wrappers/results-summary.go +++ b/internal/wrappers/results-summary.go @@ -83,7 +83,10 @@ var IsContainersEnabled bool func (engineSummary *EnginesResultsSummary) GetCriticalIssues() int { criticalIssues := 0 - for _, v := range *engineSummary { + for k, v := range *engineSummary { + if k == params.APISecType { // exclude API Security + continue + } criticalIssues += v.Critical } return criticalIssues @@ -91,7 +94,10 @@ func (engineSummary *EnginesResultsSummary) GetCriticalIssues() int { func (engineSummary *EnginesResultsSummary) GetHighIssues() int { highIssues := 0 - for _, v := range *engineSummary { + for k, v := range *engineSummary { + if k == params.APISecType { + continue + } highIssues += v.High } return highIssues @@ -99,7 +105,10 @@ func (engineSummary *EnginesResultsSummary) GetHighIssues() int { func (engineSummary *EnginesResultsSummary) GetLowIssues() int { lowIssues := 0 - for _, v := range *engineSummary { + for k, v := range *engineSummary { + if k == params.APISecType { + continue + } lowIssues += v.Low } return lowIssues @@ -107,7 +116,10 @@ func (engineSummary *EnginesResultsSummary) GetLowIssues() int { func (engineSummary *EnginesResultsSummary) GetMediumIssues() int { mediumIssues := 0 - for _, v := range *engineSummary { + for k, v := range *engineSummary { + if k == params.APISecType { + continue + } mediumIssues += v.Medium } return mediumIssues @@ -115,7 +127,10 @@ func (engineSummary *EnginesResultsSummary) GetMediumIssues() int { func (engineSummary *EnginesResultsSummary) GetInfoIssues() int { infoIssues := 0 - for _, v := range *engineSummary { + for k, v := range *engineSummary { + if k == params.APISecType { + continue + } infoIssues += v.Info } return infoIssues From 123e2483233cd1804d345b260df1afb122c00d9a Mon Sep 17 00:00:00 2001 From: Sumit Morchhale Date: Thu, 4 Dec 2025 18:18:15 +0530 Subject: [PATCH 2/2] Add note --- internal/commands/result.go | 1 + 1 file changed, 1 insertion(+) diff --git a/internal/commands/result.go b/internal/commands/result.go index 1afab952d..dded3c476 100644 --- a/internal/commands/result.go +++ b/internal/commands/result.go @@ -924,6 +924,7 @@ func printAPIsSecuritySummary(summary *wrappers.ResultSummary) { if summary.HasAPISecurityDocumentation() { fmt.Printf(" APIS DOCUMENTATION: %*d \n", defaultPaddingSize, summary.GetAPISecurityDocumentationTotal()) } + fmt.Printf(" Note: APIs vulnerability are part of SAST and therefore excluded from the TOTAL.\n") fmt.Printf(tableLine + twoNewLines) }