diff --git a/pkg/trivyk8s/trivyk8s.go b/pkg/trivyk8s/trivyk8s.go index 6a08c5e..6139e87 100644 --- a/pkg/trivyk8s/trivyk8s.go +++ b/pkg/trivyk8s/trivyk8s.go @@ -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 }