Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

trivy k8s rbac filter not working #2764

Closed
josedonizetti opened this issue Aug 22, 2022 · 0 comments · Fixed by #2765
Closed

trivy k8s rbac filter not working #2764

josedonizetti opened this issue Aug 22, 2022 · 0 comments · Fixed by #2765
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug.
Milestone

Comments

@josedonizetti
Copy link
Contributor

/trivy k8s --security-checks=rbac --report=summary cluster
178 / 178 [-------------------------------------------------------------------------------------------------------------------------------------------------] 100.00% 12 p/s

Summary Report for minikube
┌───────────┬──────────┬───────────────────┐
│ Namespace │ Resource │  RBAC Assessment  │
│           │          ├───┬───┬───┬───┬───┤
│           │          │ C │ H │ M │ L │ U │
└───────────┴──────────┴───┴───┴───┴───┴───┘
Severities: C=CRITICAL H=HIGH M=MEDIUM L=LOW U=UNKNOWN

it works though if I also filter by config

trivy k8s --security-checks=rbac,config --report=summary cluster
178 / 178 [--------------------------------------------------------------------------------------------------------------------------------------------------] 100.00% 4 p/s

Summary Report for minikube
┌──────────────┬──────────────────────────────────────┬────────────────────┐
│  Namespace   │               Resource               │ Misconfigurations  │
│              │                                      ├───┬───┬───┬────┬───┤
│              │                                      │ C │ H │ M │ L  │ U │
├──────────────┼──────────────────────────────────────┼───┼───┼───┼────┼───┤
│ trivy-system │ Deployment/trivy-operator            │   │   │ 1 │ 7  │   │
│ kube-system  │ Pod/storage-provisioner              │   │ 1 │ 5 │ 10 │   │
│ kube-system  │ Pod/etcd-minikube                    │   │ 1 │ 3 │ 7  │   │
│ kube-system  │ Deployment/coredns                   │   │   │ 3 │ 5  │   │
│ kube-system  │ DaemonSet/kube-proxy                 │   │ 2 │ 4 │ 10 │   │
│ kube-system  │ Service/kube-dns                     │   │   │ 1 │    │   │
│ kube-system  │ Pod/kube-apiserver-minikube          │   │ 1 │ 4 │ 19 │   │
│ kube-system  │ Pod/kube-scheduler-minikube          │   │ 1 │ 3 │ 9  │   │
│ kube-system  │ Pod/kube-controller-manager-minikube │   │ 1 │ 3 │ 11 │   │
│ default      │ CronJob/hellocron                    │   │   │ 2 │ 10 │   │
│ default      │ Deployment/orion                     │   │   │ 6 │ 20 │   │
│ default      │ Job/pi                               │   │   │ 3 │ 10 │   │
│ default      │ Pod/prometheus                       │   │   │ 4 │ 10 │   │
└──────────────┴──────────────────────────────────────┴───┴───┴───┴────┴───┘
Severities: C=CRITICAL H=HIGH M=MEDIUM L=LOW U=UNKNOWN


Summary Report for minikube
┌──────────────┬─────────────────────────────────────────────────────────────────┬───────────────────┐
│  Namespace   │                            Resource                             │  RBAC Assessment  │
│              │                                                                 ├───┬───┬───┬───┬───┤
│              │                                                                 │ C │ H │ M │ L │ U │
├──────────────┼─────────────────────────────────────────────────────────────────┼───┼───┼───┼───┼───┤
│ trivy-system │ Role/trivy-operator                                             │   │   │ 1 │   │   │
│ kube-system  │ Role/system:controller:cloud-provider                           │   │   │ 1 │   │   │
│ kube-system  │ Role/system::leader-locking-kube-scheduler                      │   │   │ 1 │   │   │
│ kube-system  │ Role/system:controller:bootstrap-signer                         │ 1 │   │   │   │   │
│ kube-system  │ Role/system:persistent-volume-provisioner                       │   │ 2 │   │   │   │
│ kube-system  │ Role/system::leader-locking-kube-controller-manager             │   │   │ 1 │   │   │
│ kube-system  │ Role/system:controller:token-cleaner                            │ 1 │   │   │   │   │
│ kube-public  │ Role/system:controller:bootstrap-signer                         │   │   │ 1 │   │   │
│              │ ClusterRole/system:controller:endpointslicemirroring-controller │   │ 1 │   │   │   │
│              │ ClusterRole/system:controller:endpointslice-controller          │   │ 1 │   │   │   │
│              │ ClusterRole/system:kube-scheduler                               │   │ 2 │   │   │   │
│              │ ClusterRole/system:kube-controller-manager                      │ 5 │ 2 │   │   │   │
│              │ ClusterRole/system:controller:cronjob-controller                │   │ 2 │   │   │   │
│              │ ClusterRole/cluster-admin                                       │ 2 │   │   │   │   │
│              │ ClusterRole/system:controller:endpoint-controller               │   │ 1 │   │   │   │
│              │ ClusterRole/system:aggregate-to-edit                            │ 2 │ 7 │ 1 │   │   │
│              │ ClusterRole/system:controller:deployment-controller             │   │ 2 │   │   │   │
│              │ ClusterRole/system:controller:resourcequota-controller          │ 1 │   │   │   │   │
│              │ ClusterRole/system:controller:horizontal-pod-autoscaler         │ 2 │   │   │   │   │
│              │ ClusterRole/trivy-operator                                      │ 1 │ 1 │   │   │   │
│              │ ClusterRole/system:controller:expand-controller                 │ 1 │   │   │   │   │
│              │ ClusterRole/system:controller:namespace-controller              │ 1 │   │   │   │   │
│              │ ClusterRole/system:controller:job-controller                    │   │ 1 │   │   │   │
│              │ ClusterRole/system:controller:root-ca-cert-publisher            │   │   │ 1 │   │   │
│              │ ClusterRole/system:controller:persistent-volume-binder          │ 1 │ 2 │   │   │   │
│              │ ClusterRole/system:controller:replication-controller            │   │ 1 │   │   │   │
│              │ ClusterRole/system:controller:generic-garbage-collector         │ 1 │   │   │   │   │
│              │ ClusterRole/edit                                                │ 2 │ 7 │ 1 │   │   │
│              │ ClusterRole/system:node                                         │ 1 │   │   │   │   │
│              │ ClusterRole/system:controller:replicaset-controller             │   │ 1 │   │   │   │
│              │ ClusterRole/admin                                               │ 3 │ 7 │ 1 │   │   │
│              │ ClusterRole/system:aggregate-to-admin                           │ 1 │   │   │   │   │
└──────────────┴─────────────────────────────────────────────────────────────────┴───┴───┴───┴───┴───┘
Severities: C=CRITICAL H=HIGH M=MEDIUM L=LOW U=UNKNOWN
@josedonizetti josedonizetti added the kind/bug Categorizes issue or PR as related to a bug. label Aug 22, 2022
@josedonizetti josedonizetti self-assigned this Aug 22, 2022
@josedonizetti josedonizetti added this to the v0.32.0 milestone Aug 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant