ansible-lockdown / RHEL7-CIS

Ansible role for Red Hat 7 CIS Baseline
https://ansible-lockdown.readthedocs.io/en/latest/
MIT License
473 stars 303 forks source link

Missing quote line 207 of cis_5.3.x.yml #292

Closed mballon closed 2 years ago

mballon commented 2 years ago

Describe the Issue Missing quote line 207 of cis_5.3.x.yml

Expected Behavior Line should start with quote or have no quote at the end. I don't see why you're matching the commented line either, although that's just my opinion.

Actual Behavior This regex is not matching causing the line "HostbasedAuthentication no" to be added every time the tasks is run.

Control(s) Affected What controls are being affected by the issue

Environment (please complete the following information):

Additional Notes Example result of current version:

grep ^HostbasedAuthentication /etc/ssh/sshd_config

HostbasedAuthentication no HostbasedAuthentication no HostbasedAuthentication no HostbasedAuthentication no HostbasedAuthentication no

Possible Solution According to Anisble Module Doc a single quote on either end of the line or no quotes is the correct syntax. I test both and agree.

georgenalen commented 2 years ago

@mballon, Thanks for the issue, I have the fix in a new branch and PR process going.

-George