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

CIS 5.2.1.2 | PATCH | Ensure auditing for processes that start prior to auditd is enable does not account for extra characters on line #17

Closed ssarkar9 closed 7 months ago

ssarkar9 commented 10 months ago

Describe the Issue GRUB_CMDLINE_LINUX="audit=1 audit_backlog_limit=8192 pti=on page_poison=1 vsyscall=none" is a sample line.

Expected Behavior Audit for the process prior to start of auditd should pass.

Actual Behavior This is actually showing up as failed.

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

Environment (please complete the following information):

Additional Notes Anything additional goes here

Possible Solution Use GRUB_CMDLINE_LINUX instead of GRUB_CMDLINE_LINUX_Default

ashfaqsharif commented 9 months ago

@ssarkar9 : my checks are looking good as per CIS standard after hardening the instance using this repo. Can you please elaborate when you say your checks are failing? What settings are you referring to:

grubby --info=ALL | grep -Po '\baudit=1\b'

audit=1

grubby --info=ALL | grep -Po "\baudit_backlog_limit=\d+\b"

audit_backlog_limit=8192

systemctl is-enabled auditd

enabled

I assume AL2023 uses GRUB_CMDLINE_LINUX_DEFAULT and not GRUB_CMDLINE_LINUX. So I am not sure what we should modify in this repo.

uk-bolly commented 7 months ago

hi @ssarkar9 and @ashfaqsharif

Just following up on this thread, could we have a little more clarity on what you are seeing, what you are expecting and what is failing so that we may follow this up.

Many thanks

uk-bolly

ssarkar9 commented 7 months ago

Please close. This is actually fine. I ran a STIG and then Ansible lockdown. I switched the order where lock down was run first and then STIG. STIG was causing issue. This can be closed