-
Notifications
You must be signed in to change notification settings - Fork 744
[Ubuntu] Drop pam config for faillock audit tests #13362
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
Conversation
Hi @alanmcanonical. 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 Once the patch is verified, the new status will be reflected by the 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-sigs/prow repository. |
This datastream diff is auto generated by the check Click here to see the full diffbash remediation for rule 'xccdf_org.ssgproject.content_rule_accounts_passwords_pam_faillock_audit' differs.
--- xccdf_org.ssgproject.content_rule_accounts_passwords_pam_faillock_audit
+++ xccdf_org.ssgproject.content_rule_accounts_passwords_pam_faillock_audit
@@ -1,5 +1,5 @@
# Remediation is applicable only in certain platforms
-if grep -qP "^ID=[\"']?rhel[\"']?$" "/etc/os-release" && { real="$(grep -P "^VERSION_ID=[\"']?[\w.]+[\"']?$" /etc/os-release | sed "s/^VERSION_ID=[\"']\?\([^\"']\+\)[\"']\?$/\1/")"; expected="8.2"; printf "%s\n%s" "$expected" "$real" | sort -VC; }; then
+if rpm --quiet -q pam; then
if [ -f /usr/bin/authselect ]; then
if ! authselect check; then
ansible remediation for rule 'xccdf_org.ssgproject.content_rule_accounts_passwords_pam_faillock_audit' differs.
--- xccdf_org.ssgproject.content_rule_accounts_passwords_pam_faillock_audit
+++ xccdf_org.ssgproject.content_rule_accounts_passwords_pam_faillock_audit
@@ -1,9 +1,22 @@
+- name: Gather the package facts
+ package_facts:
+ manager: auto
+ tags:
+ - CCE-86099-9
+ - DISA-STIG-RHEL-08-020021
+ - NIST-800-53-AC-7 (a)
+ - accounts_passwords_pam_faillock_audit
+ - low_complexity
+ - low_disruption
+ - medium_severity
+ - no_reboot_needed
+ - restrict_strategy
+
- name: Account Lockouts Must Be Logged - Check if system relies on authselect tool
ansible.builtin.stat:
path: /usr/bin/authselect
register: result_authselect_present
- when: ansible_distribution == 'RedHat' and ansible_distribution_version is version('8.2',
- '>=')
+ when: '"pam" in ansible_facts.packages'
tags:
- CCE-86099-9
- DISA-STIG-RHEL-08-020021
@@ -66,8 +79,7 @@
- result_authselect_enable_feature_cmd is not skipped
- result_authselect_enable_feature_cmd is success
when:
- - ansible_distribution == 'RedHat' and ansible_distribution_version is version('8.2',
- '>=')
+ - '"pam" in ansible_facts.packages'
- result_authselect_present.stat.exists
tags:
- CCE-86099-9
@@ -132,8 +144,7 @@
when:
- result_pam_faillock_is_enabled.found == 0
when:
- - ansible_distribution == 'RedHat' and ansible_distribution_version is version('8.2',
- '>=')
+ - '"pam" in ansible_facts.packages'
- not result_authselect_present.stat.exists
tags:
- CCE-86099-9
@@ -151,8 +162,7 @@
ansible.builtin.stat:
path: /etc/security/faillock.conf
register: result_faillock_conf_check
- when: ansible_distribution == 'RedHat' and ansible_distribution_version is version('8.2',
- '>=')
+ when: '"pam" in ansible_facts.packages'
tags:
- CCE-86099-9
- DISA-STIG-RHEL-08-020021
@@ -172,8 +182,7 @@
line: audit
state: present
when:
- - ansible_distribution == 'RedHat' and ansible_distribution_version is version('8.2',
- '>=')
+ - '"pam" in ansible_facts.packages'
- result_faillock_conf_check.stat.exists
tags:
- CCE-86099-9
@@ -552,8 +561,7 @@
when:
- result_pam_file_present.stat.exists
when:
- - ansible_distribution == 'RedHat' and ansible_distribution_version is version('8.2',
- '>=')
+ - '"pam" in ansible_facts.packages'
- result_faillock_conf_check.stat.exists
tags:
- CCE-86099-9
@@ -594,8 +602,7 @@
when:
- result_pam_faillock_audit_parameter_is_present.found == 0
when:
- - ansible_distribution == 'RedHat' and ansible_distribution_version is version('8.2',
- '>=')
+ - '"pam" in ansible_facts.packages'
- not result_faillock_conf_check.stat.exists
tags:
- CCE-86099-9
Platform has been changed for rule 'xccdf_org.ssgproject.content_rule_accounts_passwords_pam_faillock_audit'
--- xccdf_org.ssgproject.content_rule_accounts_passwords_pam_faillock_audit
+++ xccdf_org.ssgproject.content_rule_accounts_passwords_pam_faillock_audit
@@ -1 +1 @@
-oval:ssg-os_linux_rhel_gt_or_eq_8_2:def:1
+oval:ssg-package_pam:def:1 |
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.
I will let @dodys do the final review.
Code Climate has analyzed commit 8116fbe 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 61.9% (0.0% change). View more on Code Climate. |
The failed ansible tests might be fixed by #13363 |
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.
lgtm, thanks
Description:
Rationale: