From f48fbfb120e8ab1c28df0bbb24e8bccd98e14fe6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20M=C3=BCller?= Date: Mon, 31 Oct 2022 17:33:47 +0100 Subject: [PATCH] Improve pluralization for vulnerability count --- query/query.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/query/query.go b/query/query.go index d84286c..89621da 100644 --- a/query/query.go +++ b/query/query.go @@ -81,7 +81,7 @@ func QueryCves(sb *types.Sbom, cve string, workspace string, apiKey string) (*[] return nil, errors.Wrapf(err, "failed to unmarshal response") } if len(result.Query.Data) > 0 { - if len(result.Query.Data) == 1 { + if len(result.Query.Data) == 1 && len(result.Query.Data[0].Cves) != 0 { skill.Log.Infof("Detected %d vulnerability", len(result.Query.Data[0].Cves)) } else { skill.Log.Infof("Detected %d vulnerabilities", len(result.Query.Data[0].Cves))