florianutz / ubuntu2004_cis

Ubuntu CIS Hardening Ansible Role
MIT License
109 stars 67 forks source link

Ensure AIDE runs regularly. #40

Closed kdebisschop closed 2 years ago

kdebisschop commented 2 years ago

Do not create weekly cron if the apt-provided /etc/cron.daily/aide file exists. The package aide-common, which is installed by this hardening process already includes a script to run AIDE daily (in /etc/cron.daily/aide). Therefore, we should only add a new cron file if the daily cron has been removed.

Also, there is an issue in the AIDE cron setting. The comment says the scan will be weekly, but the weekday is set to "*" and the scan therefor runs every day. I updated cron file settings to match comment and run weekly, not daily.

And my IDE removed some trailing whitespace.