diff --git a/pkg/trivyk8s/trivyk8s.go b/pkg/trivyk8s/trivyk8s.go index 6139e87..1ddecc2 100644 --- a/pkg/trivyk8s/trivyk8s.go +++ b/pkg/trivyk8s/trivyk8s.go @@ -173,9 +173,8 @@ func (c *client) ListArtifacts(ctx context.Context) ([]*artifacts.Artifact, erro if err != nil { lerr := fmt.Errorf("failed listing resources for gvr: %v - %w", gvr, err) - if errors.IsNotFound(err) { + if errors.IsNotFound(err) || errors.IsForbidden(err) { slog.Error("Unable to list resources", "error", lerr) - // if a resource is not found, we log and continue continue }