Skip to content

Commit

Permalink
feat: support exclude/include kinds/namespaces (#327)
Browse files Browse the repository at this point in the history
Signed-off-by: chenk <[email protected]>
  • Loading branch information
chen-keinan authored Apr 9, 2024
1 parent 192b032 commit 317b5ac
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/trivyk8s/trivyk8s.go
Original file line number Diff line number Diff line change
Expand Up @@ -375,8 +375,9 @@ func (c *client) filterNamespaces(comp []bom.Component) []bom.Component {
bm := make([]bom.Component, 0)
for _, co := range comp {
if FilterResources(c.GetIncludeNamespaces(), c.GetExcludeNamespaces(), co.Namespace) {
bm = append(bm, co)
continue
}
bm = append(bm, co)
}
return bm
}
Expand Down

0 comments on commit 317b5ac

Please sign in to comment.