forked from ansible-lockdown/RHEL9-CIS
rhel_09 updates
Signed-off-by: Mark Bolwell <mark.bollyuk@gmail.com>
This commit is contained in:
parent
b5c57abc33
commit
0350e234fe
4 changed files with 43 additions and 43 deletions
|
|
@ -126,16 +126,16 @@
|
|||
ansible.builtin.shell: df --local -P | awk {'if (NR!=1) print $6'} | xargs -I '{}' find '{}' -xdev -type f -perm -0002
|
||||
failed_when: false
|
||||
changed_when: false
|
||||
register: rhel_08_6_1_9_perms_results
|
||||
register: rhel_09_6_1_9_perms_results
|
||||
|
||||
- name: "6.1.9 | PATCH | Ensure no world writable files exist | Adjust world-writable files if they exist (Configurable)"
|
||||
ansible.builtin.file:
|
||||
path: '{{ item }}'
|
||||
mode: o-w
|
||||
state: touch
|
||||
with_items: "{{ rhel_08_6_1_9_perms_results.stdout_lines }}"
|
||||
with_items: "{{ rhel_09_6_1_9_perms_results.stdout_lines }}"
|
||||
when:
|
||||
- rhel_08_6_1_9_perms_results.stdout_lines is defined
|
||||
- rhel_09_6_1_9_perms_results.stdout_lines is defined
|
||||
- rhel9cis_no_world_write_adjust
|
||||
when:
|
||||
- rhel9cis_rule_6_1_9
|
||||
|
|
@ -154,7 +154,7 @@
|
|||
changed_when: false
|
||||
failed_when: false
|
||||
check_mode: false
|
||||
register: rhel_08_6_1_10_audit
|
||||
register: rhel_09_6_1_10_audit
|
||||
with_items: "{{ ansible_mounts }}"
|
||||
loop_control:
|
||||
label: "{{ item.mount }}"
|
||||
|
|
@ -163,7 +163,7 @@
|
|||
- name: "6.1.10 | AUDIT | Ensure no unowned files or directories exist | Displaying any unowned files or directories"
|
||||
ansible.builtin.debug:
|
||||
msg: "Warning !! Manual intervention is required -- missing owner on items in {{ item.item.mount }}: {{ item.stdout_lines | join(', ') }}"
|
||||
with_items: "{{ rhel_08_6_1_10_audit.results }}"
|
||||
with_items: "{{ rhel_09_6_1_10_audit.results }}"
|
||||
when:
|
||||
- item.stdout_lines is defined
|
||||
- item.stdout_lines | length > 0
|
||||
|
|
@ -193,7 +193,7 @@
|
|||
check_mode: false
|
||||
failed_when: false
|
||||
changed_when: false
|
||||
register: rhel_08_6_1_11_audit
|
||||
register: rhel_09_6_1_11_audit
|
||||
with_items: "{{ ansible_mounts }}"
|
||||
loop_control:
|
||||
label: "{{ item.mount }}"
|
||||
|
|
@ -202,7 +202,7 @@
|
|||
- name: "6.1.11 | AUDIT | Ensure no ungrouped files or directories exist | Displaying all ungrouped files or directories"
|
||||
ansible.builtin.debug:
|
||||
msg: "Warning !! Manual intervention is required -- missing group on items in {{ item.item.mount }}: {{ item.stdout_lines | join(', ') }}"
|
||||
with_items: "{{ rhel_08_6_1_11_audit.results }}"
|
||||
with_items: "{{ rhel_09_6_1_11_audit.results }}"
|
||||
when:
|
||||
- item.stdout_lines is defined
|
||||
- item.stdout_lines | length > 0
|
||||
|
|
@ -244,7 +244,7 @@
|
|||
ansible.builtin.shell: df {{ item.mount }} -P | awk {'if (NR!=1) print $6'} | xargs -I '{}' find '{}' -xdev -type f -perm -4000
|
||||
failed_when: false
|
||||
changed_when: false
|
||||
register: rhel_08_6_1_13_perms_results
|
||||
register: rhel_09_6_1_13_perms_results
|
||||
with_items: "{{ ansible_mounts }}"
|
||||
loop_control:
|
||||
label: "{{ item.mount }}"
|
||||
|
|
@ -252,16 +252,16 @@
|
|||
- name: "6.1.13 | AUDIT | Audit SUID executables | Alert SUID executables exist"
|
||||
ansible.builtin.debug:
|
||||
msg: "Warning!! Manual intervention is required -- SUID set on items in {{ item.item.mount }}: {{ item.stout_lines | join(', ') }}"
|
||||
with_items: "{{ rhel_08_6_1_13_perms_results.stdout_lines }}"
|
||||
with_items: "{{ rhel_09_6_1_13_perms_results.stdout_lines }}"
|
||||
when:
|
||||
- rhel_08_6_1_13_perms_results.stdout is defined
|
||||
- rhel_09_6_1_13_perms_results.stdout is defined
|
||||
|
||||
- name: "6.1.13 | AUDIT | Audit SUID executables | Alert SUID executables exist | warning"
|
||||
ansible.builtin.import_tasks: warning_facts.yml
|
||||
vars:
|
||||
warn_control_id: '6.1.13'
|
||||
when:
|
||||
- rhel_08_6_1_13_perms_results.stdout is defined
|
||||
- rhel_09_6_1_13_perms_results.stdout is defined
|
||||
when:
|
||||
- rhel9cis_rule_6_1_13
|
||||
tags:
|
||||
|
|
@ -278,7 +278,7 @@
|
|||
ansible.builtin.shell: df {{ item.mount }} -P | awk {'if (NR!=1) print $6'} | xargs -I '{}' find '{}' -xdev -type f -perm -2000
|
||||
failed_when: false
|
||||
changed_when: false
|
||||
register: rhel_08_6_1_14_perms_results
|
||||
register: rhel_09_6_1_14_perms_results
|
||||
with_items: "{{ ansible_mounts }}"
|
||||
loop_control:
|
||||
label: "{{ item.mount }}"
|
||||
|
|
@ -286,16 +286,16 @@
|
|||
- name: "6.1.14 | AUDIT | Audit SGID executables | Alert SGID executables exist"
|
||||
ansible.builtin.debug:
|
||||
msg: "Manual intervention is required -- SGID set on items in {{ item.item.mount }}: {{ item.stout_lines | join(', ') }}"
|
||||
with_items: "{{ rhel_08_6_1_14_perms_results.stdout_lines }}"
|
||||
with_items: "{{ rhel_09_6_1_14_perms_results.stdout_lines }}"
|
||||
when:
|
||||
- rhel_08_6_1_14_perms_results.stdout is defined
|
||||
- rhel_09_6_1_14_perms_results.stdout is defined
|
||||
|
||||
- name: "6.1.14 | AUDIT | Audit SGID executables| warning"
|
||||
ansible.builtin.import_tasks: warning_facts.yml
|
||||
vars:
|
||||
warn_control_id: '6.1.14'
|
||||
when:
|
||||
- rhel_08_6_1_14_perms_results.stdout is defined
|
||||
- rhel_09_6_1_14_perms_results.stdout is defined
|
||||
when:
|
||||
- rhel9cis_rule_6_1_14
|
||||
tags:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue