Bug 1781606

Summary: Remediation of rule rsyslog_files_permissions produces error result
Product: Red Hat Enterprise Linux 8 Reporter: Matus Marhefka <mmarhefk>
Component: scap-security-guideAssignee: Watson Yuuma Sato <wsato>
Status: CLOSED ERRATA QA Contact: Matus Marhefka <mmarhefk>
Severity: medium Docs Contact:
Priority: medium    
Version: 8.2CC: ggasparb, janarula, matyc, mhaicman
Target Milestone: rcKeywords: Bugfix
Target Release: 8.2   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: scap-security-guide-0.1.50-6.el8 Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-11-04 02:29:53 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 Matus Marhefka 2019-12-10 10:18:55 UTC
Description of problem:
When remediating rule rsyslog_files_permissions (part of PCI-DSS profile) an error is produced:

Fix execution completed and returned: 0

/usr/bin/stat: cannot stat '/var/lib/rsyslog")': No such file or directory
/tmp/oscap.il14hg/fix-XXjoN7jO: line 48: [: : integer expression expected
/usr/bin/stat: cannot stat '/etc/rsyslog.d/*.conf"': No such file or directory
/tmp/oscap.il14hg/fix-XXjoN7jO: line 48: [: : integer expression expected
/usr/bin/stat: cannot stat '/var/log/cron': No such file or directory
/tmp/oscap.il14hg/fix-XXjoN7jO: line 48: [: : integer expression expected
/usr/bin/stat: cannot stat '/var/log/boot.log': No such file or directory
/tmp/oscap.il14hg/fix-XXjoN7jO: line 48: [: : integer expression expected

Failed to verify applied fix: Checking engine returns: fail


Also rules rsyslog_files_ownership and rsyslog_files_groupownership have OVAL definitions and tests, but they are missing remediations. This needs to be investigated.


Version-Release number of selected component (if applicable):
scap-security-guide-0.1.47-2.el8.noarch
scap-security-guide-0.1.48-1.git7e4b9fb.el8.noarch


How reproducible:
always


Steps to Reproduce:
Perform installation of RHEL 8 machine using oscap-anaconda-addon and PCI-DSS profile from the specified RPM packages, or remediate machine directly using `oscap xccdf eval --remediate --profile xccdf_org.ssgproject.content_profile_pci-dss --results-arf arf_results.xml --report pci-dss.html /usr/share/xml/scap/ssg/content/ssg-rhel8-ds.xml`.


Actual results:
Remediation of rule rsyslog_files_permissions produces error result.


Expected results:
Remediation of rule rsyslog_files_permissions produces fixed result.

Comment 1 Gabriel Gaspar Becker 2019-12-10 13:55:16 UTC
Actually the remediation seems to be fixed by https://github.com/ComplianceAsCode/content/pull/4906

But, the OVAL is still defective which causes the rule to fail after remediating it. This upstream PR aims to address the issue with the OVAL but is not merged yet: https://github.com/ComplianceAsCode/content/pull/4379

Comment 4 Watson Yuuma Sato 2020-05-20 14:56:15 UTC
OVAL and Remediation are fixed in: https://github.com/ComplianceAsCode/content/pull/5763

Comment 12 errata-xmlrpc 2020-11-04 02:29:53 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 (scap-security-guide 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-2020:4626