From 6f73116adad598078795c464d2fd6285ce12f402 Mon Sep 17 00:00:00 2001 From: Kay Yan Date: Fri, 20 Dec 2024 09:46:39 +0000 Subject: [PATCH] fix: [Bug] Filter PolicyReport ignores namespace flag Signed-off-by: Kay Yan --- pkg/integration/kyverno/analyzer.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/integration/kyverno/analyzer.go b/pkg/integration/kyverno/analyzer.go index 0a20e82e2e..8b8cb22164 100644 --- a/pkg/integration/kyverno/analyzer.go +++ b/pkg/integration/kyverno/analyzer.go @@ -39,7 +39,7 @@ func (KyvernoAnalyzer) analyzePolicyReports(a common.Analyzer) ([]common.Result, if err != nil { return nil, err } - if err := client.List(a.Context, result, &ctrl.ListOptions{}); err != nil { + if err := client.List(a.Context, result, &ctrl.ListOptions{Namespace: a.Namespace}); err != nil { return nil, err }