ansible-lockdown / AMAZON2023-CIS

Ansible role for Amazon2023 CIS Baseline
https://ansible-lockdown.readthedocs.io/en/latest/
MIT License
24 stars 19 forks source link

Rule 2.2.17 needs to mask the service as well as the socket #22

Closed DianaMariaDDM closed 5 months ago

DianaMariaDDM commented 9 months ago

Describe the Issue The implementation of this control lacks one of the things that CIS considers necessary for the rule to be compliant.

Expected Behavior As stated in the "Remediation" section of this rule, CIS mentions that if the rpcbind package is required as a dependency, one should stop and mask both the rpcbind.service and rpcbind.socket systemd units.

Actual Behavior At this moment the tasks are written to only stop and mask the rpcbind.socket, which leads to a "FAIL" result from CIS.

Control(s) Affected 2.2.17 Ensure rpcbind is not installed or the rpcbind services are masked

Environment (please complete the following information):

Additional Notes Anything additional goes here

Possible Solution The tasks for this control need to stop and mask the rpcbind.service as well as the rpcbind.socket. This solution will be provided in a PR.