The built-in "cluster-admin" role is used Affecting Deployment service in Kubernetes


Severity

0.0
high
0
10
    Severity Framework
    Snyk CCSS
    Rule category
    IAM / Access

Is your enviroment affected by this misconfiguration?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
    Frameworks
    CIS-Kubernetes
  • Snyk ID SNYK-CC-00650
  • credit Snyk Research Team

Description

The "cluster-admin" role comes with super-user level access which can be used to manipulate all resources in the cluster. Avoid using this role unless absolutely necessary.

How to fix?

Set the name attribute in roleRef to a value other than cluster_admin.

Example Configuration

apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
  name: valid-rolebinding
subjects:
  - kind: ServiceAccount
    name: test
    namespace: test-ns
roleRef:
  kind: ClusterRole
  name: not-cluster-admin
  apiGroup: rbac.authorization.k8s.io