Skip to content

Commit 5cb2c3a

Browse files
authored
Merge pull request #146 from bykvaadm/fix_5.3.3.3.x
[5.3.3.3.x] sync audit regexp with cis
2 parents 488d642 + 28509b7 commit 5cb2c3a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tasks/section_5/cis_5.3.3.3.x.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
- pam
1414
block:
1515
- name: "5.3.3.3.1 | AUDIT | Ensure password history remember is configured | Check existing files"
16-
ansible.builtin.shell: grep -Psi -- '^\s*password\s+[^#\n\r]+\s+pam_pwhistory\.so\s+([^#\n\r]+\s+)?remember=\d+\b' /etc/pam.d/common-password
16+
ansible.builtin.shell: grep -Psi -- '^\h*password\h+[^#\n\r]+\h+pam_pwhistory\.so\h+([^#\n\r]+\h+)?remember=\d+\b' /etc/pam.d/common-password
1717
register: discovered_pwhistory_remember
1818
changed_when: false
1919
failed_when: discovered_pwhistory_remember.rc not in [0, 1]
@@ -40,7 +40,7 @@
4040
- pam
4141
block:
4242
- name: "5.3.3.3.2 | AUDIT | Ensure password history is enforced for the root user | Check existing files"
43-
ansible.builtin.shell: grep -Psi -- '^\s*password\s+[^#\n\r]+\s+pam_pwhistory\.so\s+([^#\n\r]+\s+)?enforce_for_root\b' /etc/pam.d/common-password
43+
ansible.builtin.shell: grep -Psi -- '^\h*password\h+[^#\n\r]+\h+pam_pwhistory\.so\h+([^#\n\r]+\h+)?enforce_for_root\b' /etc/pam.d/common-password
4444
register: discovered_pwhistory_enforce_for_root
4545
changed_when: false
4646
failed_when: discovered_pwhistory_enforce_for_root.rc not in [0, 1]
@@ -67,7 +67,7 @@
6767
- pam
6868
block:
6969
- name: "5.3.3.3.3 | AUDIT | Ensure pam_pwhistory includes use_authtok | Check existing files"
70-
ansible.builtin.shell: grep -Psi -- '^\s*password\s+[^#\n\r]+\s+pam_pwhistory\.so\s+([^#\n\r]+\s+)?use_authtok\b' /etc/pam.d/common-password
70+
ansible.builtin.shell: grep -Psi -- '^\h*password\h+[^#\n\r]+\h+pam_pwhistory\.so\h+([^#\n\r]+\h+)?use_authtok\b' /etc/pam.d/common-password
7171
register: discovered_pwhistory_use_authtok
7272
changed_when: false
7373
failed_when: discovered_pwhistory_use_authtok.rc not in [0, 1]

0 commit comments

Comments
 (0)