-
Notifications
You must be signed in to change notification settings - Fork 685
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
Add check if to continue with ansible task #11299
Add check if to continue with ansible task #11299
Conversation
Skipping CI for Draft Pull Request. |
This datastream diff is auto generated by the check Click here to see the full diffansible remediation for rule 'xccdf_org.ssgproject.content_rule_dir_perms_world_writable_root_owned' differs.
--- xccdf_org.ssgproject.content_rule_dir_perms_world_writable_root_owned
+++ xccdf_org.ssgproject.content_rule_dir_perms_world_writable_root_owned
@@ -142,6 +142,7 @@
world_writable_dirs: '{{ world_writable_dirs | union(item.stdout_lines) | list
}}'
loop: '{{ result_found_dirs.results }}'
+ when: item is not skipped
tags:
- CCE-83375-6
- DISA-STIG-RHEL-08-010700
ansible remediation for rule 'xccdf_org.ssgproject.content_rule_dir_perms_world_writable_sticky_bits' differs.
--- xccdf_org.ssgproject.content_rule_dir_perms_world_writable_sticky_bits
+++ xccdf_org.ssgproject.content_rule_dir_perms_world_writable_sticky_bits
@@ -163,6 +163,7 @@
world_writable_dirs: '{{ world_writable_dirs | union(item.stdout_lines) | list
}}'
loop: '{{ result_found_dirs.results }}'
+ when: result_found_dirs is not skipped and item is not skipped
tags:
- CCE-80783-4
- DISA-STIG-RHEL-08-010190 |
Code Climate has analyzed commit 40e9407 and detected 0 issues on this pull request. The test coverage on the diff in this pull request is 100.0% (50% is the threshold). This pull request will bring the total coverage in the repository to 58.5%. View more on Code Climate. |
failing automatus tests seemed to be because of dir_perms_world_writable_root_owned test involves some systemd service restarting and we have no systemd on podman |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The test scenarios pass locally when using a virtual machine back end.
jcerny@fedora ~/work/git/scap-security-guide (pr/11299) $ python3 tests/automatus.py rule --libvirt qemu:///system ssgts_rhel8 --remediate-using ansible dir_perms_world_writable_root_owned dir_perms_world_writable_sticky_bits
Setting console output to log level INFO
INFO - The base image option has not been specified, choosing libvirt-based test environment.
INFO - Logging into /home/jcerny/work/git/scap-security-guide/logs/rule-custom-2023-12-01-1155/test_suite.log
INFO - xccdf_org.ssgproject.content_rule_dir_perms_world_writable_root_owned
INFO - Script all_dirs_ok.pass.sh using profile (all) OK
INFO - Script world_writable_dir_on_nonlocal_fs.fail.sh using profile (all) OK
INFO - Script world_writable_dir_owned_by_uid_2.fail.sh using profile (all) OK
INFO - xccdf_org.ssgproject.content_rule_dir_perms_world_writable_sticky_bits
INFO - Script correct.pass.sh using profile (all) OK
INFO - Script tmp_no_sticky.fail.sh using profile (all) OK
jcerny@fedora ~/work/git/scap-security-guide (pr/11299) $ python3 tests/automatus.py rule --libvirt qemu:///system ssgts_rhel9 --remediate-using ansible dir_perms_world_writable_root_owned dir_perms_world_writable_sticky_bits
Setting console output to log level INFO
INFO - The base image option has not been specified, choosing libvirt-based test environment.
INFO - Logging into /home/jcerny/work/git/scap-security-guide/logs/rule-custom-2023-12-01-1202/test_suite.log
INFO - xccdf_org.ssgproject.content_rule_dir_perms_world_writable_root_owned
INFO - Script all_dirs_ok.pass.sh using profile (all) OK
INFO - Script world_writable_dir_on_nonlocal_fs.fail.sh using profile (all) OK
INFO - Script world_writable_dir_owned_by_uid_2.fail.sh using profile (all) OK
INFO - xccdf_org.ssgproject.content_rule_dir_perms_world_writable_sticky_bits
INFO - Script correct.pass.sh using profile (all) OK
INFO - Script tmp_no_sticky.fail.sh using profile (all) OK
Description:
Rationale: