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 1658036 - [pci dss] rule "Configure Periodic Execution of AIDE" fails due to regex issues
Summary: [pci dss] rule "Configure Periodic Execution of AIDE" fails due to regex issues
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: scap-security-guide
Version: 7.6
Hardware: x86_64
OS: Linux
high
urgent
Target Milestone: rc
: ---
Assignee: Vojtech Polasek
QA Contact: Jan Černý
URL:
Whiteboard:
: 1547610 1673954 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-12-11 05:45 UTC by Ravindra Patil
Modified: 2023-09-07 19:34 UTC (History)
8 users (show)

Fixed In Version: scap-security-guide-0.1.46-10.el7
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-03-31 19:38:15 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2020:1019 0 None None None 2020-03-31 19:38:35 UTC

Description Ravindra Patil 2018-12-11 05:45:41 UTC
Description of problem:

Rule states that "At a minimum, AIDE should be configured to run a weekly scan.". We've implemented a cron job for running the scan on a weekly basis:
[root@P03MQT02 ~]# cat /etc/crontab
#Ansible: AIDE check
0 21 * * 6 root /usr/sbin/aide --check &>/dev/null

The (non-POSIX compatible?) regex for checking this is:
^(([0-9]*[\s]*[0-9]*[\s]*\*[\s]*\*[\s]*\*)|@(hourly|daily|weekly|monthly))[\s]*root[\s]*/usr/sbin/aide[\s]*\-\-check.*$

Since we don't use @weekly it actually expects a * in the 'day of week' field. We want to randomize the hour that the job is run at, so we set the 'minute', 'hour' and 'day of week' field.


# oscap xccdf eval --profile xccdf_org.ssgproject.content_profile_pci-dss --rule xccdf_org.ssgproject.content_rule_aide_periodic_cron_checking /usr/share/xml/scap/ssg/content/ssg-rhel7-ds.xml
WARNING: This content points out to the remote resources. Use `--fetch-remote-resources' option to download them.
WARNING: Skipping https://www.redhat.com/security/data/oval/com.redhat.rhsa-RHEL7.xml.bz2 file which is referenced from XCCDF content
Title   Configure Periodic Execution of AIDE
Rule    xccdf_org.ssgproject.content_rule_aide_periodic_cron_checking
Ident   CCE-26952-2
Result  fail

It expects weekly,daily or hourly in 5th column in cron job, which is impossible. It should accept value at 'day of week' and should pass the rule. 

If I user '*' in fifth column, rule is passed. i.e. daily job runs but unable to schedule weekly job. 

Version-Release number of selected component (if applicable):
openscap-1.2.10-3.el7_3.x86_64

How reproducible:
1. Schedule cron job
# cat /etc/crontab
0 21 * * 6 root /usr/sbin/aide --check &>/dev/null

2. Run the report to check cron job scheduled weekly to execute 'aide --check' command. 

Steps to Reproduce:
1. Install package 
2. Add weekly cron job 
3. Run report 

Actual results:
Rule fails 

Expected results:
Rule should pass, as weekly cron job is allowed for aide check. 

Additional info:

Comment 2 Watson Yuuma Sato 2018-12-11 12:08:29 UTC
*** Bug 1547610 has been marked as a duplicate of this bug. ***

Comment 3 Watson Yuuma Sato 2019-02-11 09:18:54 UTC
*** Bug 1673954 has been marked as a duplicate of this bug. ***

Comment 5 Vojtech Polasek 2019-11-15 10:47:58 UTC
The fix is merged upstream:
https://github.com/ComplianceAsCode/content/pull/4989

Comment 11 errata-xmlrpc 2020-03-31 19:38:15 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-2020:1019


Note You need to log in before you can comment on or make changes to this bug.