Skip to content

CMP-4441: Add rule kubevirt-seccomp-profile-permissions (CIS OCP-Virt 1.8) - #14952

Open
abushkin-redhat wants to merge 4 commits into
ComplianceAsCode:masterfrom
abushkin-redhat:cmp-4441
Open

CMP-4441: Add rule kubevirt-seccomp-profile-permissions (CIS OCP-Virt 1.8)#14952
abushkin-redhat wants to merge 4 commits into
ComplianceAsCode:masterfrom
abushkin-redhat:cmp-4441

Conversation

@abushkin-redhat

Copy link
Copy Markdown
Collaborator

Summary

  • Adds OpenSCAP node rule kubevirt-seccomp-profile-permissions checking that
    /var/lib/kubelet/seccomp/kubevirt/kubevirt.json has mode 0700 or more restrictive
  • Uses the file_permissions template — passes when the file is absent (compliant
    by default on non-virt nodes)
  • Adds the rule to the cis-vm-extension-node profile selections

Depends on

Test plan

Validated on a live OCP cluster (OCP 4.22, RHEL 10, TechPreviewNoUpgrade):

  • File absent → PASS
  • File present with wrong permissions (0777) → FAIL
  • File present with correct permissions (0700) → PASS

Vincent056 and others added 4 commits July 24, 2026 12:47
…irt 6.1)

OpenSCAP node rule checking that nested virtualization is disabled: the
'nested' parameter of kvm_intel/kvm_amd (exposed at
/sys/module/kvm_*/parameters/nested) must be N or 0. Nodes where the KVM
modules are not loaded do not expose the parameter, which is compliant -
so the rule is inert on non-virtualization nodes without needing a CPE.

Custom OVAL: for each module, absent-file (none_exist) OR content ^(N|0)$.
Validated on real hardware: a host with kvm_amd nested=1 evaluates false
(non-compliant) and the absent kvm_intel branch evaluates true, via
oscap oval eval of the built ssg-ocp4-oval.xml.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…controls)

Node companion profile for the CEL-based cis-vm-extension platform
profile, hosting the benchmark's node-level controls. 'platform:
ocp4-node' maps to the openshift_container_platform_node CPE, from which
the Compliance Operator derives Node-type scans (per-role master/worker),
same as cis-node.

The content build rejects profiles with no selections, so the profile
ships with its first rule, kubevirt-nested-virtualization-disabled
(CIS 6.1, CMP-4443). The remaining node rules add their selections under
their own tickets: CMP-4441 (1.8 seccomp profile permissions), CMP-4442
(1.9 cache directory permissions), CMP-4444 (6.2 vCPU metrics), CMP-4445
(6.3 CPU vulnerability mitigations). e2e/CI coverage for this profile is
tracked in CMP-4510.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
… 1.8)

OpenSCAP node rule checking that the kubevirt seccomp profile file
(/var/lib/kubelet/seccomp/kubevirt/kubevirt.json) has mode 0700 or more
restrictive. Uses the file_permissions template, which passes when the
file is absent (compliant by default on non-virt nodes).

Validated on a live cluster: file absent = PASS, file with 0777 = FAIL,
file with 0700 = PASS.
@openshift-ci

openshift-ci Bot commented Jul 31, 2026

Copy link
Copy Markdown

@abushkin-redhat: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/e2e-aws-openshift-node-compliance 2d862f8 link false /test e2e-aws-openshift-node-compliance

Full PR test history. Your PR dashboard.

Details

Instructions 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. I understand the commands that are listed here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants