RoleBinding grants Role permissions to Users or ServiceAccounts. This validator detects Roles that are not associated with any application workloads.
Affected Resources: Role, ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: podreader
rules:
- apiGroups: [""]
resources: ["pods"]
verbs: ["get", "watch", "list"]
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: read-pods
subjects:
- kind: ServiceAccount
name: backend
roleRef:
kind: Role
name: pod-reader # Different Rule used
apiGroup: rbac.authorization.k8s.io
Please let us know if there are other built-in validation rules you would like to see in Kubevious to detect misconfigurations and violations to best practices. Optionally, you can provide your details so we can reach out to you with follow-up questions.