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 1623166

Summary: oscap scan failed under the profile C2S(RHLE6) for Verify Integrity with RPM for files under /etc/insights-clients
Product: Red Hat Enterprise Linux 6 Reporter: Jaskaran Singh Narula <janarula>
Component: insights-clientAssignee: jcrafts
Status: CLOSED ERRATA QA Contact: Jeff Needle <jneedle>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.10CC: alng, jcrafts, mhaicman, openscap-maint, pakotvan, toneata
Target Milestone: rc   
Target Release: ---   
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: 2019-08-13 14:59:46 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:

Comment 2 Jaskaran Singh Narula 2018-08-28 15:49:09 UTC
Description of problem: 

Scap scan failed with the profile C2S for Red Hat Enterprise Linux 6
at Verify Integrity with RPM: 
Verify and Correct File Permissions with RPM for the files under the folder /etc/insights-client. 

Now after applying the remediation script, the result remains the same and another scan on the same system states that the test is still failing again. 

The test is failing for the files under /etc/insights-client.

Files and observations mentioned below under Additional info. 

Version-Release number of selected component (if applicable):

- openscap-1.2.13-2.el6.x86_64
- rubygem-foreman_scap_client-0.3.0-2.el6sat.noarch
- openscap-scanner-1.2.13-2.el6.x86_64


How reproducible:
- Fully reproducible with RHEL 6.10 client. 

Steps to Reproduce:
1. Register an RHEL 6 client to Satellite 6.3 
2. Deploy puppet and SCAP policy on the client 
        Policy: C2S for Red Hat Enterprise Linux 6 
3. Now scan the system and check under full report for "verify Integrity with RPM"

Actual results:
verify Integrity with RPM: 
Verify and Correct File Permissions with RPM   ===>> FAIL 

Expected results:
verify Integrity with RPM: 
Verify and Correct File Permissions with RPM   ====>> PASS 


General obseravtion After following the remedation steps mentined in the scap profile: 
==================================================================
[root@satclient~]# rpm -Va | grep '^.M'
.M.......    /etc/insights-client/.exp.sed
.M.......    /etc/insights-client/.fallback.json
.M.......    /etc/insights-client/.fallback.json.asc
.M.......    /etc/insights-client/cert-api.access.redhat.com.pem
.M.......  c /etc/insights-client/insights-client.conf
.M.......    /etc/insights-client/insights-client.cron
.M.......    /etc/insights-client/redhattools.pub.gpg
.M.......    /etc/insights-client/rpm.egg
.M.......    /etc/insights-client/rpm.egg.asc
[root@satclient ~]# rpm -qf  /etc/insights-client/.exp.sed
insights-client-3.0.3-3.el6.noarch
[root@satclient ~]# rpm --setperms insights-client-3.0.3-3.el6.noarch
[root@satclient ~]# rpm --setperms insights-client-3.0.3-3.el6.noarch
[root@satclient ~]# rpm -Va | grep '^.M'
.M.......    /etc/insights-client/.exp.sed
.M.......    /etc/insights-client/.fallback.json
.M.......    /etc/insights-client/.fallback.json.asc
.M.......    /etc/insights-client/cert-api.access.redhat.com.pem
.M.......  c /etc/insights-client/insights-client.conf
.M.......    /etc/insights-client/insights-client.cron
.M.......    /etc/insights-client/redhattools.pub.gpg
.M.......    /etc/insights-client/rpm.egg
.M.......    /etc/insights-client/rpm.egg.asc
=================================================================

Comment 3 Marek Haicman 2018-08-28 19:33:41 UTC
Hello Jaskaran,
as you correctly observed, openscap for this particular rule does not perform nothing else than remediations / verification through RPM command.

rpm --setperms "${RPM_PACKAGE}"

It would be out of scope for us to workaround problems with packaging in other RPMs.

Thus it would be preferable to fix this in the spec file of insights-client. Moving.

Comment 7 errata-xmlrpc 2019-08-13 14:59:46 UTC
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, 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-2019:2474