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:
Currently `atomic scan' exit codes only inform user about its successful/unsuccessful termination. For better utilization, mainly in automated scripts, it should add one more exit code, for example:
0 - successful, scan pass
1 - unsuccessful, some error occured
2 - successful, scan failed [THIS IS CURRENTLY MISSING]
This would also reflect the exit codes of the oscap(8) which uses exit codes in the following way:
Normally, the exit status is 0 when operation finished successfully and 1 otherwise. In cases when oscap performs evaluation of the system it may return 2 indicating success of the operation but incompliance of the assessed system.
This would probably need to be implemented in `oscapd-evaluate' (part of openscap-daemon RPM) as `atomic scan' only serves as a wrapper for `oscapd-evaluate' command (which is run in openscap-docker container) and exits with the exact same exit code as `oscapd-evaluate'. Anyway, it would have to be documented also for `atomic scan'.
Version-Release number of selected component (if applicable):
atomic-1.12.5-2.el7
openscap-daemon-0.1.6-1.el7
How reproducible:
Always when `atomic scan' is successful but scan failed (incompliance of the assessed system was found).
Steps to Reproduce:
1. atomic scan IMAGE/CONTAINER
2. echo $?
Actual results:
Expected results:
Additional info: