diff --git a/pkg/collect/cluster_resources.go b/pkg/collect/cluster_resources.go index e9a4f7f8..19c7db87 100644 --- a/pkg/collect/cluster_resources.go +++ b/pkg/collect/cluster_resources.go @@ -457,11 +457,7 @@ func authCanI(client *kubernetes.Clientset, namespaces []string) (map[string][]b continue } - rules := []rbacv1.PolicyRule{} - for _, rule := range convertToPolicyRule(response.Status) { - rules = append(rules, rule) - } - + rules := convertToPolicyRule(response.Status) b, err := json.MarshalIndent(rules, "", " ") if err != nil { errorsByNamespace[namespace] = err.Error()