More Info:
Verifies no (Cluster)RoleBinding targets system:anonymous or system:unauthenticated. Such bindings grant access to unauthenticated callers.Risk Level
CriticalAddress
SecurityCompliance Standards
- Cloudanix Best Practice
Triage and Remediation
- Remediation
Remediation
Manual Steps
Manual Steps
-
List the offending RoleBindings (run on any machine with kubectl access):
-
For each violating namespaced RoleBinding you want to remove, delete it (on any machine with kubectl access), replacing
<namespace>and<name>with values from step 1: -
For each violating ClusterRoleBinding you want to remove, delete it (on any machine with kubectl access), replacing
<name>with the value from step 1: -
If you need to preserve access for specific authenticated identities, recreate appropriate bindings without
system:anonymousorsystem:unauthenticatedas subjects (on any machine with kubectl access). For example, bind a ClusterRole to a specific Azure AD group: -
Re-run the verification command to confirm there are no remaining bindings that reference
system:anonymousorsystem:unauthenticated(on any machine with kubectl access):The output must include only:
Using kubectl
Using kubectl
On any machine with kubectl access:Note each violating object’s Example:Example:
- Identify violating RoleBindings and ClusterRoleBindings
kind, name, and, if present, ns= namespace.- Delete each violating RoleBinding
kind=RoleBinding ns=<namespace> name=<name>):- Delete each violating ClusterRoleBinding
kind=ClusterRoleBinding name=<name> and no ns=):- (Optional, declarative) Remove from GitOps/manifests
RoleBinding / ClusterRoleBinding definitions from the source manifests and re-apply:- Verify remediation
is_compliant=true:Automation
Automation

