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

RHEL-08-010161 Define new variable based on the fact ansible_mounts #270

Open
prestonSeaman2 opened this issue Apr 24, 2024 · 0 comments
Open
Labels
bug Something isn't working

Comments

@prestonSeaman2
Copy link

Describe the Issue
The fact ansible_mounts does not currently exclude items who's device attribute begins with /dev. The current find on 010161 will search nfs drives and cause major issues.

Expected Behavior
Only local file systems on a machine should be accessed when performing hardening.

Actual Behavior
NFS drives are being accessed while performing hardening steps. This can potentially be a catastrophic issue for some users.

Control(s) Affected
RHEL-08-010161

  • Additional Details:

Additional Notes
Anything additional goes here

Possible Solution
Define a new variable based on the fact ansible_mounts which excludes items who's device attribute begins with /dev. e.g.:
rhel8stig_local_mounts: "{{ ansible_mounts | to_json | from_json | json_query(rhel8stig_local_mounts_query) }}"rhel8stig_local_mounts_query: "[?starts_with(device, '/dev/')].mount"

@prestonSeaman2 prestonSeaman2 added the bug Something isn't working label Apr 24, 2024
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

1 participant