From 2791e4273525a3658c742c9c37597c474649cad2 Mon Sep 17 00:00:00 2001 From: artaasadi Date: Wed, 13 Nov 2024 19:07:25 +0100 Subject: [PATCH] fix: benchmarks list in compliance results --- pkg/compliance/http_routes.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkg/compliance/http_routes.go b/pkg/compliance/http_routes.go index bb97e93db..c6f78dceb 100644 --- a/pkg/compliance/http_routes.go +++ b/pkg/compliance/http_routes.go @@ -344,6 +344,9 @@ func (h *HttpHandler) GetComplianceResults(echoCtx echo.Context) error { finding.ParentBenchmarkNames = append(finding.ParentBenchmarkNames, benchmark.Title) } } + if benchmark, ok := benchmarksMap[h.Source.BenchmarkID]; ok { + finding.ParentBenchmarkNames = append(finding.ParentBenchmarkNames, benchmark.Title) + } if control, ok := controlsMap[finding.ControlID]; ok { finding.ControlTitle = control.Title