Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
documentation_complete: true

title: 'Restrict Exec Access to Pods'

description: |-
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.

rationale: |-
Exec access to pods provides an interactive channel into the
container runtime environment. In an OpenShift Virtualization
context, this means direct access to the processes backing a
running virtual machine. Granting this capability to unauthorized
subjects increases the risk of data exfiltration, workload
tampering, and privilege escalation. Restricting exec access
ensures that only approved administrators can interact with
running pods.

severity: medium

ocil_clause: 'unauthorized subjects can exec into pods'

ocil: |-
Run the following command to check which subjects can exec into pods:
<pre>$ oc adm policy who-can exec pod</pre>
Verify that only authorized subjects are listed in the output.
1 change: 1 addition & 0 deletions products/ocp4/profiles/cis-vm-extension.profile
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,4 @@ selections:
- kubevirt-downward-metrics-disabled
- kubevirt-ksm-disabled
- kubevirt-no-jsonpatch-annotations
- kubevirt-restrict-exec-access-to-pods
Loading