Why it matters
exec and attach give a shell in a running container, with its service account token and whatever it can reach.
How to fix it
Grant exec and attach only to break-glass roles.
What TrustIvan reads
Read through the Kubernetes API with the read-only role TrustIvan's install creates.
Benchmark controls
- 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 read Secrets, Role uses a wildcard, 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 create pods
KubernetesSeverity: Medium
k8s.rbac.pod-create - Role can create PersistentVolumes
KubernetesSeverity: Low
k8s.rbac.pv-create - Role can use the nodes/proxy subresource
KubernetesSeverity: Medium
k8s.rbac.node-proxy - Role can read Secrets
KubernetesSeverity: Medium
k8s.rbac.secrets-read - Role can escalate, bind or impersonate
KubernetesSeverity: High
k8s.rbac.escalate-bind-impersonate - Role can mint service-account tokens
KubernetesSeverity: Medium
k8s.rbac.token-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