Skip to content

Commit

Permalink
fix: [Bug] Filter PolicyReport ignores namespace flag
Browse files Browse the repository at this point in the history
Signed-off-by: Kay Yan <[email protected]>
  • Loading branch information
yankay committed Dec 20, 2024
1 parent 8cd3b29 commit 6f73116
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/integration/kyverno/analyzer.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {

Check warning on line 42 in pkg/integration/kyverno/analyzer.go

View check run for this annotation

Codecov / codecov/patch

pkg/integration/kyverno/analyzer.go#L42

Added line #L42 was not covered by tests
return nil, err
}

Expand Down

0 comments on commit 6f73116

Please sign in to comment.