Skip to content

Commit

Permalink
Ensure AIDE runs regularly. (#40)
Browse files Browse the repository at this point in the history
Do not create weekly cron if the apt-provided /etc/cron.daily/aide file exists.
Update cron file settings to match comment and run weekly, not daily.

Co-authored-by: Karl DeBisschop <[email protected]>
  • Loading branch information
kdebisschop and Karl DeBisschop authored Mar 26, 2022
1 parent 65ad8e7 commit 9d68c4b
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion tasks/section1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -661,6 +661,17 @@
- patch
- rule_1.4.1

- name: "SCORED | 1.4.1 | PATCH | Stat AIDE daily cron"
stat: path=/etc/cron.daily/aide
register: aide_daily_cron
tags:
- level1
- scored
- aide
- file_integrity
- patch
- rule_1.4.2

- name: "SCORED | 1.4.2 | PATCH | Ensure filesystem integrity is regularly checked"
cron:
name: Run AIDE integrity check weekly
Expand All @@ -670,10 +681,11 @@
hour: "{{ ubuntu2004cis_aide_cron['aide_hour'] | default('5') }}"
day: "{{ ubuntu2004cis_aide_cron['aide_day'] | default('*') }}"
month: "{{ ubuntu2004cis_aide_cron['aide_month'] | default('*') }}"
weekday: "{{ ubuntu2004cis_aide_cron['aide_weekday'] | default('*') }}"
weekday: "{{ ubuntu2004cis_aide_cron['aide_weekday'] | default('0') }}"
job: "{{ ubuntu2004cis_aide_cron['aide_job'] }}"
when:
- ubuntu2004cis_rule_1_4_2
- not aide_daily_cron.stat.exists
tags:
- level1
- scored
Expand Down

0 comments on commit 9d68c4b

Please sign in to comment.