From de454e68420c8c85575c0d4eb1431de3d1ff94f0 Mon Sep 17 00:00:00 2001 From: Ivan Milchev Date: Thu, 7 Mar 2024 13:19:33 +0100 Subject: [PATCH] fix incognito scans with upstream creds (#1157) Signed-off-by: Ivan Milchev --- policy/scan/local_scanner.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/policy/scan/local_scanner.go b/policy/scan/local_scanner.go index 7abd9e73..508cde78 100644 --- a/policy/scan/local_scanner.go +++ b/policy/scan/local_scanner.go @@ -251,6 +251,11 @@ func createReporter(ctx context.Context, job *Job, upstream *upstream.UpstreamCo if err != nil { return nil, err } + for i := range bundle.Policies { + if bundle.Policies[i].Version == "n/a" { + bundle.Policies[i].Version = "0.0.0" // space policy has no version but we need it to compile it + } + } job.Bundle = bundle // also update the job with the fetched bundle reporter.AddBundle(bundle) }