CMP-4436: Add manual rule kubevirt-restrict-exec-access-to-pods (CIS-OCP-Virt 1.11) - #14936
Conversation
|
Hi @taimurhafeez. Thanks for your PR. I'm waiting for a ComplianceAsCode member to verify that this patch is reasonable to test. If it is, they should reply with Tip We noticed you've done this a few times! Consider joining the org to skip this step and gain Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
LGTM on the rule content. Two asks: (1) rebase to drop the duplicated build-script/docs change once #14920 merges; (2) |
rhmdnd
left a comment
There was a problem hiding this comment.
Looking good but we'll need to rebase and add something to the description that clearly points users to CustomRules as a way to automate this.
Thanks @taimurhafeez!
| a running container, which provides direct access to the workload | ||
| environment. Unrestricted exec access allows any namespace user to | ||
| interact with running virtual machine pods, potentially modifying | ||
| runtime state, accessing sensitive data, or disrupting workloads. |
There was a problem hiding this comment.
We discussed manual rules with the team. The consensus is that manual rules serve as signals for customers to create their own CustomRules that replace the manual check with an environment-specific automated check.
We can update the description to make this more apparent:
Because the set of authorized subjects varies by organization, this rule
requires manual verification. Consider creating a CustomRule with a CEL
expression that inspects ClusterRoleBindings and RoleBindings for subjects
granted the <tt>pods/exec</tt> permission, asserting that only your
approved administrators appear in the results.
…ints organizations to CustomRules for automation. Co-Authored-By: Claude Opus 4.6 (1M context)
bc612b4 to
966e91d
Compare
|
PR needs rebase. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
Add a manual rule for CIS OCP-Virt control 1.11 "Restrict exec access to pods". The rule documents the audit procedure (oc adm policy who-can exec pod) and is added to the cis-vm-extension CEL profile. Also relax build_cel_content.py to warn instead of error when a CEL profile references rules without CEL checks, allowing manual rules in CEL profiles. Update CEL documentation accordingly.
Co-Authored-By: Claude