Why it matters
Reading Secrets yields every credential stored in them: service-account tokens, registry passwords, database credentials.
How to fix it
Remove get, list and watch on secrets, or restrict the rule with `resourceNames`.
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.2: Access to Secrets is 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 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 PersistentVolumes
KubernetesSeverity: Low
k8s.rbac.pv-create - Role can mint service-account tokens
KubernetesSeverity: Medium
k8s.rbac.token-create - Role can exec into or attach to pods
KubernetesSeverity: Medium
k8s.rbac.pod-exec - Role can change admission webhooks
KubernetesSeverity: Medium
k8s.rbac.webhook-config - Role can create pods
KubernetesSeverity: Medium
k8s.rbac.pod-create - Role uses a wildcard
KubernetesSeverity: Medium
k8s.rbac.wildcard
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