Skip to content

Commit

Permalink
Merge pull request #136 from dderemiah/fix_5.2.3.6
Browse files Browse the repository at this point in the history
Fixes list privileged cmd collection to match benchmark
  • Loading branch information
uk-bolly authored Jan 30, 2024
2 parents abd02cc + 7104ccf commit 17517ff
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tasks/section_5/cis_5.2.3.x.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
- name: "5.2.3.6 | PATCH | Ensure use of privileged commands is collected"
block:
- name: "5.2.3.6 | AUDIT | Ensure use of privileged commands is collected | Get list of privileged programs"
ansible.builtin.shell: for i in $(df | grep '^/dev' | awk '{ print $NF }'); do find $i -xdev -type f -perm -4000 -o -type f -perm -2000 2>/dev/null; done
ansible.builtin.shell: for i in $(findmnt -n -l -k -it $(awk '/nodev/ { print $2 }' /proc/filesystems | paste -sd,) | grep -Pv "noexec|nosuid" | awk '{print $1}'); do find $i -xdev -type f -perm -4000 -o -type f -perm -2000 2>/dev/null; done
register: priv_procs
changed_when: false
check_mode: false
Expand Down

0 comments on commit 17517ff

Please sign in to comment.