Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1814210

Summary: OCP4 content doesn't work for RHEL nodes, only on RHCOS nodes
Product: Red Hat Enterprise Linux 8 Reporter: xiyuan
Component: scap-security-guideAssignee: Vojtech Polasek <vpolasek>
Status: CLOSED NOTABUG QA Contact: BaseOS QE Security Team <qe-baseos-security>
Severity: high Docs Contact:
Priority: high    
Version: 8.0CC: ggasparb, jhrozek, josorior, mhaicman, pdhamdhe, wsato
Target Milestone: rcKeywords: Triaged
Target Release: 8.0Flags: pm-rhel: mirror+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-04-01 08:46:21 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:
Attachments:
Description Flags
openscap-pod-logs none

Description xiyuan 2020-03-17 11:33:16 UTC
Created attachment 1670781 [details]
openscap-pod-logs

Description of problem:
Deploy operator openshift-compliance, trigger compliancescans with aws_upi+Rhel7.6 cluster. The OCP4 content doesn't work for RHEL nodes, only on RHCOS nodes

Version-Release number of selected component (if applicable):
4.5.0-0.nightly-2020-03-16-221628

How reproducible:
Always

Steps to Reproduce:
1. Deploy operator openshift-compliance(Operator is available at link: https://github.com/openshift/compliance-operator)
2. set up aws_upi+Rhel7.6 cluster
3.  trigger compliancescan onerule-scan by below command:
oc apply -f - <<EOF
apiVersion: compliance.openshift.io/v1alpha1
kind: ComplianceScan
metadata:
  name: onerule-scan
spec:
  profile: xccdf_org.ssgproject.content_profile_coreos-ncp
  content: ssg-ocp4-ds.xml
  rule: xccdf_org.ssgproject.content_rule_no_direct_root_logins
  debug: true
  nodeSelector:
      node.openshift.io/os_id: "rhel"
EOF
4. Check the scan result for rhel nodes

Actual results:
1.The scan result should contain one rule, the rusult should be fail or pass

Expected results:
1. The scan result contain all rules for RHCOS.

Additional info:
logs and results attached.

Comment 2 Jakub Hrozek 2020-03-17 11:41:53 UTC
How to deal with different profiles for different OS-s is being discussed here:
https://lists.fedoraproject.org/archives/list/scap-security-guide@lists.fedorahosted.org/thread/IJHUGD37OEQSOHUUZTKOEHT3NR5DUJDA/

Comment 7 Juan Antonio Osorio 2021-04-01 08:46:21 UTC
The profile that was used is xccdf_org.ssgproject.content_profile_coreos-ncp and is applicable to RHCOS; not RHEL. On the other hand, that profile is not supported.