From 56f57722f762e0911be9fce4f148c8f12eaf6159 Mon Sep 17 00:00:00 2001 From: Matheus Alcantara Date: Thu, 14 Oct 2021 14:01:42 -0300 Subject: [PATCH] cli: fix breaking change on vulnerability hashes On pr #636 we add the rule id on description of vulnerability, but the Details of vulnerability is used to generate the vulnerability hash, so adding the rule id on details generate a different hash which cause a breaking change. So this commit remove the rule id prefix from Details field of Vulnerability. Signed-off-by: Matheus Alcantara --- internal/services/formatters/service.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/services/formatters/service.go b/internal/services/formatters/service.go index 0477fc600..a1d3d22b8 100644 --- a/internal/services/formatters/service.go +++ b/internal/services/formatters/service.go @@ -242,7 +242,7 @@ func (s *Service) newVulnerabilityFromFinding(finding *engine.Finding, tool tool Confidence: confidence.Confidence(finding.Confidence), File: s.removeHorusecFolder(finding.SourceLocation.Filename), Code: s.GetCodeWithMaxCharacters(finding.CodeSample, finding.SourceLocation.Column), - Details: fmt.Sprintf("%s: %s\n%s", finding.ID, finding.Name, finding.Description), + Details: fmt.Sprintf("%s\n%s", finding.Name, finding.Description), SecurityTool: tool, Language: language, Severity: severities.GetSeverityByString(finding.Severity),