ansible-lockdown / RHEL9-CIS

Ansible role for Red Hat 9 CIS Baseline
https://ansible-lockdown.readthedocs.io
MIT License
124 stars 94 forks source link

cis-1.1.1.yml /bin/true -> /bin/false ? #219

Closed Wykx-Sama closed 4 months ago

Wykx-Sama commented 4 months ago

Question Is that normal that in the cis_1.1.1.yml modprobe config line is set to /bin/true as it's making the rule to failed du to not being set to /bin/false ?

Example :

Should be that ? :

uk-bolly commented 4 months ago

hi @Wykx-Sama

Thank you for your time in raising this issue, looking through this controls documentation. It doesn't state that it must be /bin/false, the supplied remediation script set it to false but in the audit section it actually looks for the following in order to pass the audit. So in this case it can be set to either false or true.

if grep -Pq -- '^\h*install \/bin\/(true|false)' <<< "$l_loadable";
then
    l_output="$l_output\n - module: \"$l_mname\" is not loadable: \"$l_loadable\""
      else
    l_output2="$l_output2\n - module: \"$l_mname\" is loadable: \"$l_loadable\""
fi

There are larger discussions about this subject this on the internet, with many feeling it should be true due to the fact running /bin/false returns a non 0 return code. Marking it as a failed item at boot time, where as /bin/true has a clean exit code, give the same effect and a clean boot.

many thanks

uk-bolly

Wykx-Sama commented 4 months ago

Ok thanks you very much for the clarification :)