Bug 1547610

Summary: Ansible remediation doesn't match OVAL check for xccdf_org.ssgproject.content_rule_aide_periodic_cron_checking
Product: Red Hat Enterprise Linux 7 Reporter: Matt Micene <mmicene>
Component: scap-security-guideAssignee: Watson Yuuma Sato <wsato>
Status: CLOSED DUPLICATE QA Contact: BaseOS QE Security Team <qe-baseos-security>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.5CC: matyc, mhaicman, openscap-maint
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: 2018-12-11 12:08:29 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 Matt Micene 2018-02-21 15:47:56 UTC
Description of problem:
After applying ansible remediation generated from a scanned RHEL 7.5 Beta host, the contents of the root crontab are different than the pattern in the OVAL check, causing the "Configure Periodic Execution of AIDE" item to be marked as failed.

The bash remediation sets the expected values.

Version-Release number of selected component (if applicable):
scap-security-guide-0.1.36-7.el7.noarch

How reproducible:


Steps to Reproduce:
1.  Scan host using C2S profile which includes the affected check
2.  Generate Ansible remediation
3.  Run playbook against host and rescan

Actual results:
"Configure Periodic Execution of AIDE" check marked as failed

Expected results:
Check should pass as an entry in /var/spool/cron/root exists

Additional info:

The Description of the check and the pattern in OVAL are not consistent.  In the OVAL check, the scan must run every day according to this pattern:
^[0-9]*[\s]*[0-9]*[\s]*\*[\s]*\*[\s]*\*[\s]*(root|)/usr/sbin/aide[\s]*\-\-check.*$

The bash remediation creates a schedule that runs every day according to the OVAL check.
05 4 * * * root /usr/sbin/aide --check

The Description allows for "At a minimum, AIDE should be configured to run a weekly scan."  

This is the schedule created by the ansible remediation but fails the OVAL check.
05 4 * * 5 root /usr/sbin/aide --check

At a minimum the ansible and bash remediation should take the same action and match the OVAL check.  It should also be clear to the user that the remediation is the strictest match in the Description.

Comment 2 Matěj Týč 2018-11-29 14:42:14 UTC
TLDR: The remediation schedules weekly checks, which are in line with the rule prose. The OVAL check is too strict.

Comment 3 Watson Yuuma Sato 2018-12-11 12:08:29 UTC

*** This bug has been marked as a duplicate of bug 1658036 ***