CMP-4434: Add manual rule kubevirt-use-multi-network-policies CIS OCP-Virt 4.3 - #14928
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. |
|
/ok-to-test |
|
LGTM on the rule content (matches the plan decision to ship CIS 4.3 as Manual — MultiNetworkPolicy CRD is disabled by default). Two asks: (1) rebase to drop the duplicated build-script/docs change once #14920 merges; (2) mention in the description that the audit requires |
rhmdnd
left a comment
There was a problem hiding this comment.
Looks good, but we'll need to rebase and add something more to the description that points users to CustomRules as a way to automate this finding.
5644a34 to
e45ff9e
Compare
e45ff9e to
6612be3
Compare
status and points organizations to CustomRules for automation. Co-Authored-By: Claude Opus 4.6
6612be3 to
968e89b
Compare
|
|
||
| title: 'Use Multi-Network Policies' | ||
|
|
||
| description: |- |
There was a problem hiding this comment.
After reading these manual rule descriptions a few times, I think they are a bit backwards.
First thing in the description should be what the rule is or should be checking for, then we can say we cannot automate the rule, then suggest how they can do it themselves.
Additionally, it looks like the rule description is a bit misaligned.
For example:
Ensure that at least one <tt>MultiNetworkPolicy</tt> object exists in each namespace
defined in the cluster. Where each <tt>MultiNetworkPollicy</tt> must match a VM and the
<tt>NetworkAttachmentDefinition</tt> the VM is connected to.
Because the required multi-network policy configuration is specific
to each cluster's secondary network topology, this rule cannot be
evaluated automatically and always reports a manual status.
Organizations that use secondary networks should consider creating
a CustomRule with a CEL expression.
Then, ideally have an example CEL expression that users an use as a base to write their own expression.
There was a problem hiding this comment.
We can do this improvement in a follow up PR.
|
/ok-to-test |
|
@taimurhafeez: The following test failed, say
Full PR test history. Your PR dashboard. 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. I understand the commands that are listed here. |
Lance's concerns have been addressed.
Summary
kubevirt-use-multi-network-policiesfor CIS OCP-Virt 4.3 (Use multi-network policies, Level 2)MultiNetworkPolicyis not a registered resource type on test clusters (OCP 4.22, disabled in Cluster Network Operator) — a CEL check would fetch an unregistered type and produce misleading resultsoc get multi-networkpolicies -Abuild_cel_content.pyto warn (instead of error) when a CEL profile references rules without CEL checks, allowing manual rules in CEL profilesTest plan
./build_product ocp4 --cel-content=ocp4completes with warning, no errorsbuild/ocp4-cel-content.yaml(expected — no CEL expression)cis-vm-extensionprofile are unaffectedCo Authored by Claude.