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.
Description of problem:
First remediate the rhel7 base image:
# atomic scan --remediate --scan_type configuration_compliance --scanner_args profile=xccdf_org.ssgproject.content_profile_stig-rhel7-disa registry.access.stage.redhat.com/rhel7:latest
[...]
Remediating rule 5/33: 'xccdf_org.ssgproject.content_rule_aide_scan_notification'
grep: /etc/crontab: No such file or directory
grep: /etc/cron.d: No such file or directory
grep: /etc/cron.weekly: No such file or directory
grep: /etc/cron.monthly: No such file or directory
[...]
Successfully built remediated image 59a77dc246e5 from 4b8676171c27e9a36ee91e8769626779323ac2c49bbd99b0436a3d2af5e7758f.
Files associated with this scan are in /var/lib/atomic/openscap/2018-02-20-07-36-00-508269.
Now scan the remediated image using atomic scan and oscap-docker and check the result of the "Configure Notification of Post-AIDE Scan Details" rule:
# atomic scan --scan_type configuration_compliance --scanner_args profile=xccdf_org.ssgproject.content_profile_stig-rhel7-disa 59a77dc246e5 &>atomic.log
# grep "Configure Notification of Post-AIDE Scan Details" atomic.log -A2
Configure Notification of Post-AIDE Scan Details
Severity: Moderate
XCCDF result: fail
# oscap-docker image 59a77dc246e5 xccdf eval --profile xccdf_org.ssgproject.content_profile_stig-rhel7-disa ssg-rhel7-ds.xml &>oscap.log
(NOTE: ssg-rhel7-ds.xml is a datastream file from the openscap-docker image and is from scap-security-guide-0.1.36-7.el7.noarch)
# grep "Configure Notification of Post-AIDE Scan Details" oscap.log -A3
Title Configure Notification of Post-AIDE Scan Details
Rule xccdf_org.ssgproject.content_rule_aide_scan_notification
Ident CCE-80374-2
Result pass
Cron is installed on the host system, but not on the remediated container image:
# rpm -qa | grep cron
crontabs-1.11-6.20121102git.el7.noarch
cronie-anacron-1.4.11-19.el7.x86_64
cronie-1.4.11-19.el7.x86_64
# docker run --rm -it registry.access.redhat.com/rhel7 rpm -qa | grep cron
#
Uninstall cron from the host and run the scan using oscap-docker again:
# yum remove -y cronie
# oscap-docker image 59a77dc246e5 xccdf eval --profile xccdf_org.ssgproject.content_profile_stig-rhel7-disa ssg-rhel7-ds.xml &>oscap.log
# grep "Configure Notification of Post-AIDE Scan Details" oscap.log -A3
Title Configure Notification of Post-AIDE Scan Details
Rule xccdf_org.ssgproject.content_rule_aide_scan_notification
Ident CCE-80374-2
Result fail
And the rule is now correctly reported as fail. It is also _IMPORTANT_ to note that when scanning the original container image (registry.access.stage.redhat.com/rhel7:latest), oscap-docker correctly reports fail for the rule. So this only happens when scanning a remediated container image.
Version-Release number of selected component (if applicable):
openscap-scanner-1.2.16-6.el7.x86_64
openscap-containers-1.2.16-6.el7.noarch
openscap-1.2.16-6.el7.x86_64
scap-security-guide-0.1.36-7.el7.noarch
openscap-docker-7.5.0-2 (container image used by atomic scan)
atomic-1.20.1-9.git436cf5d.el7.x86_64
docker-1.12.6-71.git3e8e77d.el7.x86_64
How reproducible:
100%
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-2018:3302
Description of problem: First remediate the rhel7 base image: # atomic scan --remediate --scan_type configuration_compliance --scanner_args profile=xccdf_org.ssgproject.content_profile_stig-rhel7-disa registry.access.stage.redhat.com/rhel7:latest [...] Remediating rule 5/33: 'xccdf_org.ssgproject.content_rule_aide_scan_notification' grep: /etc/crontab: No such file or directory grep: /etc/cron.d: No such file or directory grep: /etc/cron.weekly: No such file or directory grep: /etc/cron.monthly: No such file or directory [...] Successfully built remediated image 59a77dc246e5 from 4b8676171c27e9a36ee91e8769626779323ac2c49bbd99b0436a3d2af5e7758f. Files associated with this scan are in /var/lib/atomic/openscap/2018-02-20-07-36-00-508269. Now scan the remediated image using atomic scan and oscap-docker and check the result of the "Configure Notification of Post-AIDE Scan Details" rule: # atomic scan --scan_type configuration_compliance --scanner_args profile=xccdf_org.ssgproject.content_profile_stig-rhel7-disa 59a77dc246e5 &>atomic.log # grep "Configure Notification of Post-AIDE Scan Details" atomic.log -A2 Configure Notification of Post-AIDE Scan Details Severity: Moderate XCCDF result: fail # oscap-docker image 59a77dc246e5 xccdf eval --profile xccdf_org.ssgproject.content_profile_stig-rhel7-disa ssg-rhel7-ds.xml &>oscap.log (NOTE: ssg-rhel7-ds.xml is a datastream file from the openscap-docker image and is from scap-security-guide-0.1.36-7.el7.noarch) # grep "Configure Notification of Post-AIDE Scan Details" oscap.log -A3 Title Configure Notification of Post-AIDE Scan Details Rule xccdf_org.ssgproject.content_rule_aide_scan_notification Ident CCE-80374-2 Result pass Cron is installed on the host system, but not on the remediated container image: # rpm -qa | grep cron crontabs-1.11-6.20121102git.el7.noarch cronie-anacron-1.4.11-19.el7.x86_64 cronie-1.4.11-19.el7.x86_64 # docker run --rm -it registry.access.redhat.com/rhel7 rpm -qa | grep cron # Uninstall cron from the host and run the scan using oscap-docker again: # yum remove -y cronie # oscap-docker image 59a77dc246e5 xccdf eval --profile xccdf_org.ssgproject.content_profile_stig-rhel7-disa ssg-rhel7-ds.xml &>oscap.log # grep "Configure Notification of Post-AIDE Scan Details" oscap.log -A3 Title Configure Notification of Post-AIDE Scan Details Rule xccdf_org.ssgproject.content_rule_aide_scan_notification Ident CCE-80374-2 Result fail And the rule is now correctly reported as fail. It is also _IMPORTANT_ to note that when scanning the original container image (registry.access.stage.redhat.com/rhel7:latest), oscap-docker correctly reports fail for the rule. So this only happens when scanning a remediated container image. Version-Release number of selected component (if applicable): openscap-scanner-1.2.16-6.el7.x86_64 openscap-containers-1.2.16-6.el7.noarch openscap-1.2.16-6.el7.x86_64 scap-security-guide-0.1.36-7.el7.noarch openscap-docker-7.5.0-2 (container image used by atomic scan) atomic-1.20.1-9.git436cf5d.el7.x86_64 docker-1.12.6-71.git3e8e77d.el7.x86_64 How reproducible: 100%