Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

/per-rule doesn't report when Automatus errors #179

Open
mildas opened this issue May 6, 2024 · 1 comment
Open

/per-rule doesn't report when Automatus errors #179

mildas opened this issue May 6, 2024 · 1 comment

Comments

@mildas
Copy link
Contributor

mildas commented May 6, 2024

When Automatus errors (might be caused by tested rule), Contest doesn't report it:

2024-05-06 15:26:15 test.py:92: running: ./automatus.py rule --libvirt qemu:///system contest --product rhel9 --remediate-using oscap sudo_custom_logfile
Setting console output to log level INFO
INFO - The base image option has not been specified, choosing libvirt-based test environment.
INFO - Logging into /tmp/tmpvkzad62j/BUILD/scap-security-guide-0.1.73/tests/logs/rule-custom-2024-05-06-1526/test_suite.log
2024-05-06 15:26:17 test.py:118: using automatus log dir: /tmp/tmpvkzad62j/BUILD/scap-security-guide-0.1.73/tests/logs/rule-custom-2024-05-06-1526
ERROR - Terminating due to error: Unable to upload test scripts: Cannot extract data tarball /root/ssgts/tmpmih07c_v.tar.gz.
WARNING - Nothing has been tested!
2024-05-06 15:26:28 test.py:167: lib.virt.Guest.booted:615: shutting down contest
2024-05-06 15:26:28 test.py:167: lib.virt.wait_for_domstate:721: waiting for contest to be shut off for 300sec
2024-05-06 15:26:29 test.py:169: lib.waive.collect_waivers:141: using /var/tmp/fmf_wrapper_git_cache/tests/https___github.com_RHSecurityCompliance_contest/conf/waivers for waiving
2024-05-06 15:26:29 test.py:169: lib.results.report_plain:182: PASS /

and finishes as everything passed.

Reproducible on RHEL 9.0 compose (with latest content and scanner). On RHEL 9.2<=, it fine.

@comps
Copy link
Contributor

comps commented May 6, 2024

This might be automatus.py bug of not returning non-0. In other cases, we do catch it:

CalledProcessError: Command '['./automatus.py', 'rule', '--libvirt', 'qemu:///system', 'contest', '--product', 'rhel8', '--remediate-using', 'ansible', 'account_password_pam_faillock_password_auth', ..., 'wireless_disable_interfaces']' returned non-zero exit status 1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants