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

Need to set pipefail when using shell in ansible #6730

Merged
merged 2 commits into from Mar 24, 2021

Conversation

brett060102
Copy link
Contributor

Upstream ansible lint tests require pipefail when using shell
in ansible.

Description:

  • fix ansible-lint pipefail check failures
  • Added set pipefail where possible
  • Added #noqa 306 in cases were grep was used

Rationale:

  • no ansible link failures

Upstream ansible lint tests require pipefail when using shell
in ansible.
@openshift-ci-robot openshift-ci-robot added the needs-ok-to-test Used by openshift-ci bot. label Mar 19, 2021
@openshift-ci-robot
Copy link
Collaborator

Hi @brett060102. Thanks for your PR.

I'm waiting for a ComplianceAsCode member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@openscap-ci
Copy link
Collaborator

openscap-ci commented Mar 19, 2021

Changes identified:
Rules:
 no_host_based_files
 no_user_host_based_files
 gui_login_dod_acknowledgement
 accounts_passwords_pam_tally2
 pam_disable_automatic_configuration
 set_password_hashing_min_rounds_logindefs
 smartcard_pam_enabled
 accounts_no_uid_except_zero
 audit_rules_privileged_commands
 dir_perms_world_writable_sticky_bits
 file_permissions_var_log_messages
 dconf_db_up_to_date
 aide_verify_acls
 aide_verify_ext_attributes
 ensure_gpgcheck_never_disabled

Show details

Rule no_host_based_files:
 Ansible remediation changed.
Rule no_user_host_based_files:
 Ansible remediation changed.
Rule gui_login_dod_acknowledgement:
 Ansible remediation changed.
Rule accounts_passwords_pam_tally2:
 Ansible remediation changed.
Rule pam_disable_automatic_configuration:
 Ansible remediation changed.
Rule set_password_hashing_min_rounds_logindefs:
 Ansible remediation changed.
Rule smartcard_pam_enabled:
 Ansible remediation changed.
Rule accounts_no_uid_except_zero:
 Ansible remediation changed.
Rule audit_rules_privileged_commands:
 Ansible remediation changed.
Rule dir_perms_world_writable_sticky_bits:
 Ansible remediation changed.
Rule file_permissions_var_log_messages:
 Ansible remediation changed.
Rule dconf_db_up_to_date:
 Ansible remediation changed.
Rule aide_verify_acls:
 Ansible remediation changed.
Rule aide_verify_ext_attributes:
 Ansible remediation changed.
Rule ensure_gpgcheck_never_disabled:
 Ansible remediation changed.

Recommended tests to execute:
 build_product rhel8
 tests/test_suite.py rule --libvirt qemu:///system test-suite-vm --remediate-using ansible --datastream build/ssg-rhel8-ds.xml no_host_based_files
 tests/test_suite.py rule --libvirt qemu:///system test-suite-vm --remediate-using ansible --datastream build/ssg-rhel8-ds.xml no_user_host_based_files
 tests/test_suite.py rule --libvirt qemu:///system test-suite-vm --remediate-using ansible --datastream build/ssg-rhel8-ds.xml accounts_no_uid_except_zero
 tests/test_suite.py rule --libvirt qemu:///system test-suite-vm --remediate-using ansible --datastream build/ssg-rhel8-ds.xml audit_rules_privileged_commands
 tests/test_suite.py rule --libvirt qemu:///system test-suite-vm --remediate-using ansible --datastream build/ssg-rhel8-ds.xml dir_perms_world_writable_sticky_bits
 tests/test_suite.py rule --libvirt qemu:///system test-suite-vm --remediate-using ansible --datastream build/ssg-rhel8-ds.xml dconf_db_up_to_date
 tests/test_suite.py rule --libvirt qemu:///system test-suite-vm --remediate-using ansible --datastream build/ssg-rhel8-ds.xml aide_verify_acls
 tests/test_suite.py rule --libvirt qemu:///system test-suite-vm --remediate-using ansible --datastream build/ssg-rhel8-ds.xml aide_verify_ext_attributes
 tests/test_suite.py rule --libvirt qemu:///system test-suite-vm --remediate-using ansible --datastream build/ssg-rhel8-ds.xml ensure_gpgcheck_never_disabled
 build_product sle12
 tests/test_suite.py rule --libvirt qemu:///system test-suite-vm --remediate-using ansible --datastream build/ssg-sle12-ds.xml gui_login_dod_acknowledgement
 tests/test_suite.py rule --libvirt qemu:///system test-suite-vm --remediate-using ansible --datastream build/ssg-sle12-ds.xml accounts_passwords_pam_tally2
 tests/test_suite.py rule --libvirt qemu:///system test-suite-vm --remediate-using ansible --datastream build/ssg-sle12-ds.xml pam_disable_automatic_configuration
 tests/test_suite.py rule --libvirt qemu:///system test-suite-vm --remediate-using ansible --datastream build/ssg-sle12-ds.xml set_password_hashing_min_rounds_logindefs
 tests/test_suite.py rule --libvirt qemu:///system test-suite-vm --remediate-using ansible --datastream build/ssg-sle12-ds.xml smartcard_pam_enabled
 tests/test_suite.py rule --libvirt qemu:///system test-suite-vm --remediate-using ansible --datastream build/ssg-sle12-ds.xml file_permissions_var_log_messages

@ggbecker
Copy link
Member

@vojtapolasek
Copy link
Collaborator

Thank you for the fix, now all test pass. Merging.

@vojtapolasek vojtapolasek merged commit 0ec5baa into ComplianceAsCode:master Mar 24, 2021
@yuumasato yuumasato added this to the 0.1.56 milestone Mar 24, 2021
@brett060102 brett060102 deleted the fix_ansible_lint branch June 28, 2023 20:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-ok-to-test Used by openshift-ci bot.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants