Why it matters
A `*` in a rule's verbs, resources or API groups grants everything that exists now and everything added later, including custom resources nobody reviewed.
How to fix it
List the verbs and resources the role needs explicitly.
What TrustIvan reads
Read through the Kubernetes API with the read-only role TrustIvan's install creates.
Benchmark controls
- CIS Kubernetes Benchmark 1.9.0, control
5.1.3: Wildcards in Roles and ClusterRoles are minimised - NSA/CISA Kubernetes Hardening Guidance 1.2, control
authn.rbac: Role-based access control grants least privilege. Also checked for this control: cluster-admin is granted, Role can escalate, bind or impersonate, Role can use the nodes/proxy subresource, Role can create pods, Role can exec into or attach to pods, Role can read Secrets, Workload runs as a service account with cluster-admin
Control numbers are the published ones; the titles are TrustIvan's own short descriptions. The benchmarks belong to their publishers, who do not endorse TrustIvan.
Related checks
- Role can change admission webhooks
KubernetesSeverity: Medium
k8s.rbac.webhook-config - Role can mint service-account tokens
KubernetesSeverity: Medium
k8s.rbac.token-create - Role can read Secrets
KubernetesSeverity: Medium
k8s.rbac.secrets-read - Role can create PersistentVolumes
KubernetesSeverity: Low
k8s.rbac.pv-create - Role can exec into or attach to pods
KubernetesSeverity: Medium
k8s.rbac.pod-exec - Role can create pods
KubernetesSeverity: Medium
k8s.rbac.pod-create
Terms: KSPM (Kubernetes security posture management), Kubernetes RBAC, NSA/CISA Kubernetes Hardening Guidance, CIS Benchmarks
All Kubernetes posture checks · The whole catalogue · How this works in TrustIvan · Documentation