diff --git a/applications/openshift-virtualization/kubevirt-restrict-cross-datavolume-cloning/rule.yml b/applications/openshift-virtualization/kubevirt-restrict-cross-datavolume-cloning/rule.yml new file mode 100644 index 000000000000..00fcdd668db0 --- /dev/null +++ b/applications/openshift-virtualization/kubevirt-restrict-cross-datavolume-cloning/rule.yml @@ -0,0 +1,34 @@ +documentation_complete: true + +title: 'Restrict Access to Cross DataVolume Cloning' + +description: |- + Because the set of authorized subjects and namespaces is specific to each + cluster, this rule cannot be evaluated automatically and is reported as + manual. Organizations can create a CustomRule with a CEL expression that + lists RoleBindings referencing the datavolume-cloner ClusterRole + and verifies that only approved subjects and destination namespaces are + bound. + +rationale: |- + Cross-namespace DataVolume cloning copies disk image data between + namespaces. If the rolebindings that grant cloning permissions are + too broad, unauthorized users in destination namespaces can clone + disks containing sensitive data from source namespaces. Reviewing + and restricting these rolebindings ensures that only intended + namespaces and subjects can perform cross-namespace disk cloning + operations. + +severity: medium + +ocil_clause: 'unauthorized subjects have cross-namespace datavolume cloning access' + +ocil: |- + Run the following command to review rolebindings that grant + cross-namespace DataVolume cloning permissions in the source + namespace: +
$ oc get rolebinding -n <source-namespace> <allow-clone-to-user> -oyaml+ Review rolebindings binding a datavolume-cloner-style + ClusterRole to service accounts in other namespaces. Verify that + destination namespaces are intended and only authorized subjects + are bound. diff --git a/products/ocp4/profiles/cis-vm-extension.profile b/products/ocp4/profiles/cis-vm-extension.profile index 9c3e034f0bb9..41e934d9158d 100644 --- a/products/ocp4/profiles/cis-vm-extension.profile +++ b/products/ocp4/profiles/cis-vm-extension.profile @@ -39,4 +39,5 @@ selections: - kubevirt-downward-metrics-disabled - kubevirt-ksm-disabled - kubevirt-no-jsonpatch-annotations + - kubevirt-restrict-cross-datavolume-cloning - kubevirt-restrict-exec-access-to-pods