Bug 2040282
Summary: | Some rhcos rules have no scan type, all the rhcos rules should be marked as 'node' | ||
---|---|---|---|
Product: | OpenShift Container Platform | Reporter: | hongyan li <hongyli> |
Component: | Compliance Operator | Assignee: | Vincent Shen <wenshen> |
Status: | CLOSED ERRATA | QA Contact: | Prashant Dhamdhere <pdhamdhe> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 4.10 | CC: | jhrozek, lbragsta, mrogers, stevsmit, wenshen, xiyuan |
Target Milestone: | --- | ||
Target Release: | 4.10.0 | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: |
* Previously, some rules associated with extended Open Vulnerability and Assessment Language (OVAL) definitions had a `checkType` of `None`. This was because the compliance Operator was not processing extended OVAL definitions when parsing rules. With this update, content from extended OVAL definitions is parsed so that these rules now have a `checkType` of either `Node` or `Platform`. (link:https://bugzilla.redhat.com/show_bug.cgi?id=2040282[*BZ#2040282*])
|
Story Points: | --- |
Clone Of: | Environment: | ||
Last Closed: | 2022-02-07 05:46:25 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
hongyan li
2022-01-13 11:03:42 UTC
Related fix PR: https://github.com/openshift/compliance-operator/pull/774 [Bug_Verification] Looks good. The rules without checkType are reduced to 60 now, it was around 116 before the fix. Verified on: 4.10.0-0.nightly-2022-01-31-012936 + compliance-operator.v0.1.48 $ oc get csv NAME DISPLAY VERSION REPLACES PHASE compliance-operator.v0.1.48 Compliance Operator 0.1.48 Succeeded elasticsearch-operator.5.3.4-13 OpenShift Elasticsearch Operator 5.3.4-13 Succeeded $ oc get pods NAME READY STATUS RESTARTS AGE compliance-operator-bddd85dfd-xx8ns 1/1 Running 1 (3h16m ago) 3h17m ocp4-openshift-compliance-pp-7785bff67c-6dw4q 1/1 Running 0 3h16m rhcos4-openshift-compliance-pp-c84d79c7-jgzvm 1/1 Running 0 3h16m $ oc get profile.compliance NAME AGE ocp4-cis 3h16m ocp4-cis-node 3h16m ocp4-e8 3h16m ocp4-moderate 3h16m ocp4-moderate-node 3h16m ocp4-nerc-cip 3h16m ocp4-nerc-cip-node 3h16m ocp4-pci-dss 3h16m ocp4-pci-dss-node 3h16m rhcos4-e8 3h16m rhcos4-moderate 3h16m rhcos4-nerc-cip 3h16m $ oc get rules.compliance -ojsonpath='{range .items[?(@.checkType=="Platform")]}{.metadata.name}{"\n"}{end}'|wc -l 116 $ oc get rules.compliance -ojsonpath='{range .items[?(@.checkType=="Platform")]}{.metadata.name}{"\n"}{end}' |head ocp4-api-server-admission-control-plugin-alwaysadmit ocp4-api-server-admission-control-plugin-alwayspullimages ocp4-api-server-admission-control-plugin-namespacelifecycle ocp4-api-server-admission-control-plugin-noderestriction ocp4-api-server-admission-control-plugin-scc ocp4-api-server-admission-control-plugin-securitycontextdeny ocp4-api-server-admission-control-plugin-serviceaccount ocp4-api-server-anonymous-auth ocp4-api-server-api-priority-flowschema-catch-all ocp4-api-server-api-priority-gate-enabled $ oc get rule ocp4-api-server-admission-control-plugin-alwaysadmit -ojsonpath={.checkType} Platform $ oc get rule ocp4-api-server-api-priority-gate-enabled -ojsonpath={.checkType} Platform $ oc get rules.compliance -ojsonpath='{range .items[?(@.checkType=="Node")]}{.metadata.name}{"\n"}{end}'| wc -l 647 $ oc get rules.compliance -ojsonpath='{range .items[?(@.checkType=="Node")]}{.metadata.name}{"\n"}{end}'| tail -15 rhcos4-sysctl-net-ipv6-conf-default-accept-redirects rhcos4-sysctl-net-ipv6-conf-default-accept-source-route rhcos4-sysctl-net-ipv6-conf-default-disable-ipv6 rhcos4-sysctl-user-max-user-namespaces rhcos4-usbguard-allow-hid rhcos4-usbguard-allow-hid-and-hub rhcos4-usbguard-allow-hub rhcos4-wireless-disable-interfaces rhcos4-zipl-audit-argument rhcos4-zipl-audit-backlog-limit-argument rhcos4-zipl-bls-entries-only rhcos4-zipl-bootmap-is-up-to-date rhcos4-zipl-page-poison-argument rhcos4-zipl-slub-debug-argument rhcos4-zipl-vsyscall-argument $ oc get rule rhcos4-sysctl-user-max-user-namespaces -ojsonpath={.checkType} Node $ oc get rule rhcos4-zipl-vsyscall-argument -ojsonpath={.checkType} Node $ rulesWithCheckType=$(oc get rules.compliance -ojsonpath='{range .items[?(@.checkType)]}{.metadata.name}{"|"}{end}') $ oc get rules.compliance -ojsonpath='{range .items[*]}{.metadata.name}{"\n"}{end}'|grep -Ev ${rulesWithCheckType%?} |wc -l 60 $ oc get rules.compliance -ojsonpath='{range .items[*]}{.metadata.name}{"\n"}{end}'|grep -Ev ${rulesWithCheckType%?} |tail rhcos4-postfix-client-configure-relayhost rhcos4-rsyslog-accept-remote-messages-tcp rhcos4-rsyslog-accept-remote-messages-udp rhcos4-set-ip6tables-default-rule rhcos4-set-iptables-default-rule rhcos4-set-iptables-default-rule-forward rhcos4-sshd-limit-user-access rhcos4-sysctl-crypto-fips-enabled rhcos4-wireless-disable-in-bios rhcos4-zipl-enable-selinux $ oc get rule rhcos4-zipl-enable-selinux -ojsonpath={.checkType} No result Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (OpenShift Compliance Operator bug fix and enhancement update), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2022:0416 |