|
44 | 44 | "MEDIUM | RHEL-08-010040 | PATCH | RHEL 8 must display the Standard Mandatory DoD Notice and Consent Banner before granting local or remote access to the system via a ssh logon. | Set banner message"" |
45 | 45 | "MEDIUM | RHEL-08-010060 | PATCH | RHEL 8 must display the Standard Mandatory DoD Notice and Consent Banner before granting local or remote access to the system via a command line user logon. | Set banner message"" |
46 | 46 | copy: |
47 | | - dest: /etc/issue |
| 47 | + dest: "{{ item }}" |
48 | 48 | content: "{{ rhel8stig_logon_banner }}" |
49 | 49 | owner: root |
50 | 50 | group: root |
51 | 51 | mode: '0644' |
52 | 52 | notify: restart sshd |
| 53 | + with_items: |
| 54 | + - /etc/issue |
| 55 | + - /etc/issue.net |
53 | 56 | when: |
54 | 57 | # - not system_is_ec2 |
55 | 58 | - rhel_08_010040 or |
|
247 | 250 | - kerberos |
248 | 251 |
|
249 | 252 | - name: | |
250 | | - "HIGH | RHEL-08-010170 | PATCH | RHEL8 must use a Linux Security Module configured to enforce limits on system services." |
251 | | - "HIGH | RHEL-08-010450 | PATCH | RHEL 8 must enable the SELinux targeted policy." |
| 253 | + "MEDIUM | RHEL-08-010170 | PATCH | RHEL8 must use a Linux Security Module configured to enforce limits on system services." |
| 254 | + "MEDIUM | RHEL-08-010450 | PATCH | RHEL 8 must enable the SELinux targeted policy." |
252 | 255 | selinux: |
253 | 256 | state: enforcing |
254 | 257 | policy: targeted |
|
296 | 299 | file: |
297 | 300 | path: "{{ item }}" |
298 | 301 | mode: '1777' |
299 | | - with_items: |
| 302 | + with_items: |
300 | 303 | - "{{ rhel_08_010190_world_writable_files.stdout_lines }}" |
301 | 304 | when: |
302 | 305 | - rhel_08_010190 |
|
651 | 654 | name: esc |
652 | 655 | state: present |
653 | 656 | when: rhel8stig_gui |
654 | | - |
| 657 | + |
655 | 658 | - name: "MEDIUM | RHEL-08-010390 | PATCH | RHEL 8 must have the packages required for multifactor authentication installed. | Install non-GUI related packages" |
656 | 659 | dnf: |
657 | 660 | name: openssl-pkcs11 |
|
1575 | 1578 | tags: |
1576 | 1579 | - RHEL-08-010750 |
1577 | 1580 |
|
1578 | | -- name: "MEDIUM | REHL-08-010760 | PATCH | All RHEL 8 local interactive user accounts must be assigned a home directory upon creation." |
| 1581 | +- name: "MEDIUM | RHEL-08-010760 | PATCH | All RHEL 8 local interactive user accounts must be assigned a home directory upon creation." |
1579 | 1582 | lineinfile: |
1580 | 1583 | path: /etc/login.defs |
1581 | 1584 | regexp: '.*?CREATE_HOME.*' |
1582 | 1585 | line: CREATE_HOME yes |
1583 | 1586 | when: |
1584 | | - - rhel_01_010760 |
| 1587 | + - rhel_08_010760 |
1585 | 1588 | tags: |
1586 | | - - REHL-08-010760 |
| 1589 | + - RHEL-08-010760 |
1587 | 1590 | - login |
1588 | 1591 | - home |
1589 | 1592 |
|
|
1597 | 1600 | - rhel_08_010770 |
1598 | 1601 | - rhel8stig_disruption_high |
1599 | 1602 | - rhel_08_stig_interactive_homedir_inifiles is defined |
1600 | | - tags: |
| 1603 | + tags: |
1601 | 1604 | - RHEL-08-010770 |
1602 | 1605 | - complexity-high |
1603 | 1606 |
|
|
1671 | 1674 |
|
1672 | 1675 | - name: "MEDIUM | RHEL-08-020000 | AUDIT | RHEL 8 temporary user accounts must be provisioned with an expiration time of 72 hours or less." |
1673 | 1676 | debug: |
1674 | | - msg: |
| 1677 | + msg: |
1675 | 1678 | - "ALERT!!!! Please check temporary accounts for expiration dates to be 72 hours or less." |
1676 | 1679 | - "To do this please run sudo chage -l account_name for the accounts you need to check" |
1677 | 1680 | - "The results will display the Account Expires information" |
|
2218 | 2221 | lineinfile: |
2219 | 2222 | path: "/etc/pam.d/{{ item }}" |
2220 | 2223 | regexp: '^auth required pam_faillock.so preauth' |
2221 | | - line: "auth required pam_faillock.so preauth dir=/var/log/faillock silent audit deny={{ rhel8stig_pam_faillock.attempts }}{{ (rhel8stig_pam_faillock.fail_for_root) | ternary(' even_deny_root ',' ') }}fail_interval={{ rhel8stig_pam_faillock.interval }} unlock_time={{ rhel8stig_pam_faillock.unlock_time }}" |
| 2224 | + line: "auth required pam_faillock.so preauth dir=/var/log/faillock silent audit deny={{ rhel8stig_pam_faillock.attempts }}{{ (rhel8stig_pam_faillock.fail_for_root) | ternary(' even_deny_root ',' ') }}sfail_interval={{ rhel8stig_pam_faillock.interval }} unlock_time={{ rhel8stig_pam_faillock.unlock_time }}" |
2222 | 2225 | insertafter: '^auth' |
2223 | 2226 | notify: restart sssd |
2224 | 2227 | with_items: |
|
2881 | 2884 | path: /etc/security/pwquality.conf |
2882 | 2885 | create: yes |
2883 | 2886 | regexp: '^#?\s*dictcheck' |
2884 | | - line: "dictcheck = {{ rhel8stig_password_complexity.dictcheck | default('1') }}" |
| 2887 | + line: "dictcheck = {{ rhel8stig_password_complexity.dictcheck | default('1') }}" |
2885 | 2888 | when: |
2886 | 2889 | - rhel_08_020300 |
2887 | 2890 | tags: |
|
3373 | 3376 | with_items: |
3374 | 3377 | - -a always,exit -F arch=b32 -S lsetxattr -F auid>={{ rhel8stig_interactive_uid_start }} -F auid!=unset -k perm_mod |
3375 | 3378 | - -a always,exit -F arch=b64 -S lsetxattr -F auid>={{ rhel8stig_interactive_uid_start }} -F auid!=unset -k perm_mod |
3376 | | - - -a always,exit -F arch=b32 -S lsetxattr -F auid=0 -k perm_mod |
| 3379 | + - -a always,exit -F arch=b32 -S lsetxattr -F auid=0 -k perm_mod |
3377 | 3380 | - -a always,exit -F arch=b64 -S lsetxattr -F auid=0 -k perm_mod |
3378 | 3381 | notify: restart auditd |
3379 | 3382 | when: |
|
3406 | 3409 | - -a always,exit -F arch=b32 -S fremovexattr -F auid>={{ rhel8stig_interactive_uid_start }} -F auid!=unset -k perm_mod |
3407 | 3410 | - -a always,exit -F arch=b64 -S fremovexattr -F auid>={{ rhel8stig_interactive_uid_start }} -F auid!=unset -k perm_mod |
3408 | 3411 | - -a always,exit -F arch=b32 -S fremovexattr -F auid=0 -k perm_mod |
3409 | | - - -a always,exit -F arch=b64 -S fremovexattr -F auid=0 -k perm_mod |
| 3412 | + - -a always,exit -F arch=b64 -S fremovexattr -F auid=0 -k perm_mod |
3410 | 3413 | notify: restart auditd |
3411 | 3414 | when: |
3412 | 3415 | - rhel_08_030240 |
|
3623 | 3626 | tags: |
3624 | 3627 | - RHEL-08-030340 |
3625 | 3628 | - auditd |
3626 | | - |
| 3629 | + |
3627 | 3630 | - name: "MEDIUM | RHEL-08-030350 | PATCH | Successful/unsuccessful uses of the newgrp command in RHEL 8 must generate an audit record." |
3628 | 3631 | lineinfile: |
3629 | 3632 | path: /etc/audit/rules.d/audit.rules |
|
4319 | 4322 |
|
4320 | 4323 | - name: "MEDIUM | RHEL-08-040030 | AUDIT | RHEL 8 must be configured to prohibit or restrict the use of functions, ports, protocols, and/or services, as defined in the Ports, Protocols, and Services Management (PPSM) Category Assignments List (CAL) and vulnerability assessments. | Message out findings" |
4321 | 4324 | debug: |
4322 | | - msg: |
| 4325 | + msg: |
4323 | 4326 | - "The following output is what firewalld is accepting on service ports to {{ ansible_hostname }}." |
4324 | 4327 | - "{{ rhel8stig_PPSM_CLSA_check_firewalld.stdout_lines }}" |
4325 | 4328 | changed_when: true |
|
4487 | 4490 | - rhel_08_040090 |
4488 | 4491 | tags: |
4489 | 4492 | - RHEL-08-040090 |
4490 | | - - firewall |
| 4493 | + - firewall |
4491 | 4494 |
|
4492 | 4495 | - name: "MEDIUM | RHEL-08-040110 | PATCH | RHEL 8 wireless network adapters must be disabled." |
4493 | 4496 | block: |
|
5177 | 5180 | tags: |
5178 | 5181 | - RHEL-08-040330 |
5179 | 5182 |
|
5180 | | -- name: "HIGH | RHEL-08-040340 | PATCH | Remote X connections for interactive users must be encrypted in RHEL 8." |
| 5183 | +- name: "MEDIUM | RHEL-08-040340 | PATCH | Remote X connections for interactive users must be encrypted in RHEL 8." |
5181 | 5184 | lineinfile: |
5182 | 5185 | path: /etc/ssh/sshd_config |
5183 | 5186 | regexp: '^.*X11Forwarding' |
|
0 commit comments