Skip to content
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

Search for SUID extends to NFS mount directories #217

Closed
tedunder237 opened this issue Jul 10, 2024 · 1 comment
Closed

Search for SUID extends to NFS mount directories #217

tedunder237 opened this issue Jul 10, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@tedunder237
Copy link

tedunder237 commented Jul 10, 2024

Describe the Issue
Our systems automount home directories which are listed to be searched for SUID exec. First, this is probably not the intent of the code since in 6.1.12 task the --local flag is used in df, and second the find command is taking a long time to run. Also suspect the CIS guidelines is to only perform checks on local filesystems.

Expected Behavior
Task should only include local filesystems

Actual Behavior
Task is including all found filesystems include NFS mounts

Control(s) Affected
6.1.13, 6.1.14

Environment (please complete the following information):

  • branch being used: 1.3.1
  • Ansible Version: 2.4.19
  • Host Python Version: 3.9.18
  • Additional Details: Rocky 9

Possible Solution
Add the local flag to df to prevent including external filesystems tasks/section_6/cis_6.1.x.yml

For 6.1.13, line 261, add flag:
ansible.builtin.shell: df {{ item.mount }} --local -P | awk {'if (NR!=1) print $6'} | xargs -I '{}' find '{}' -xdev -type f -perm -4000
For 6.1.14, line line 304, add flag:
ansible.builtin.shell: df {{ item.mount }} --local -P | awk {'if (NR!=1) print $6'} | xargs -I '{}' find '{}' -xdev -type f -perm -2000

Tested on Rocky 9

@tedunder237 tedunder237 added the bug Something isn't working label Jul 10, 2024
uk-bolly added a commit that referenced this issue Jul 12, 2024
@uk-bolly uk-bolly self-assigned this Jul 12, 2024
@uk-bolly
Copy link
Member

hi @tedunder237

You should find this has been released to both devel a while ago and main over the last week. I will therefore close this issue, please reopen if you still experience the same issue.

many thanks

uk-bolly

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants