Skip to content

Commit

Permalink
fix: respect namespace scope in trivy analyzer (#661)
Browse files Browse the repository at this point in the history
Signed-off-by: Johannes Kleinlercher <johannes@kleinlercher.at>
  • Loading branch information
jkleinlercher committed Sep 15, 2023
1 parent 0325724 commit 6481590
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/integration/trivy/analyzer.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ func (TrivyAnalyzer) analyzeVulnerabilityReports(a common.Analyzer) ([]common.Re
if err != nil {
return nil, err
}
err = restClient.Get().Resource("vulnerabilityreports").Do(a.Context).Into(result)
err = restClient.Get().Resource("vulnerabilityreports").Namespace(a.Namespace).Do(a.Context).Into(result)
if err != nil {
return nil, err
}
Expand Down Expand Up @@ -103,7 +103,7 @@ func (t TrivyAnalyzer) analyzeConfigAuditReports(a common.Analyzer) ([]common.Re
if err != nil {
return nil, err
}
err = restClient.Get().Resource("configauditreports").Do(a.Context).Into(result)
err = restClient.Get().Resource("configauditreports").Namespace(a.Namespace).Do(a.Context).Into(result)
if err != nil {
return nil, err
}
Expand Down

0 comments on commit 6481590

Please sign in to comment.