From 998dcdddc64fde806b7b5d0e9ff149826cf7892e Mon Sep 17 00:00:00 2001 From: chenk Date: Wed, 7 Sep 2022 11:18:05 +0300 Subject: [PATCH] feat: dynamic links support for scan results Signed-off-by: chenk --- pkg/scanner/local/scan.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg/scanner/local/scan.go b/pkg/scanner/local/scan.go index 819c1493c87..7c508de3b2c 100644 --- a/pkg/scanner/local/scan.go +++ b/pkg/scanner/local/scan.go @@ -489,6 +489,10 @@ func toDetectedMisconfiguration(res ftypes.MisconfResult, defaultSeverity dbType res.References = append(res.References, primaryURL) } + if len(primaryURL) == 0 && len(res.References) > 0 { + primaryURL = res.References[0] + } + return types.DetectedMisconfiguration{ ID: res.ID, AVDID: res.AVDID,