Skip to content

fix(roles/aide, roles/lynis): reduce AIDE false alarms - #749

Merged
markuslf merged 2 commits into
mainfrom
fix/aide-alert-fatigue
Nov 16, 2026
Merged

markuslf merged 2 commits into
mainfrom
fix/aide-alert-fatigue

Conversation

@markuslf

Copy link
Copy Markdown
Member

Two sources of daily or recurring AIDE false alarms.

  • roles/aide: acme.sh renews certificates in place, so every renewal failed the AIDE check. *.crt in /etc/pki/tls/certs and /etc/ssl/certs is now checked with PERMS, while the trust bundles and private keys keep NORMAL. Verified with aide 0.16 to 0.19.2; Molecule aide green on Rocky 8/9/10, Debian 12/13, Ubuntu 22.04/24.04/26.04.
  • roles/lynis: Lynis test FINT-4315 runs aide -D, which with aide 0.16 (RHEL 8) truncates /var/log/aide/aide.log, so aide-logfile warned every morning after the Lynis audit. The test is skipped by default. Verified in containers (Lynis 3.1.7, aide 0.16 on Rocky 8; aide 0.19.x unaffected); Molecule lynis green on Rocky 8/10, Debian 12, Ubuntu 22.04.

acme.sh rewrites the installed certificates in place on every renewal
(`cat "$CERT_PATH" >"$_real_cert"`, acme.sh 3.1.6), so each renewal
left the AIDE check failed until someone accepted it by hand. *.crt in
/etc/pki/tls/certs and /etc/ssl/certs is now checked with PERMS. The
trust bundles (ca-bundle.crt, ca-bundle.trust.crt, ca-certificates.crt)
match first and keep NORMAL, and so do the private keys, which acme.sh
reuses on a renewal.

Verified with aide 0.16 to 0.19.2 on Rocky 8, 9 and 10, Debian 12 and
13 and Ubuntu 22.04, 24.04 and 26.04.
Lynis test FINT-4315 runs `aide --config=/etc/aide.conf -D`. aide 0.16
(RHEL 8) opens the report_url file for writing while it parses the
configuration and so truncates /var/log/aide/aide.log, also with
--config-check. The daily audit at 06:xx thus left an empty report
behind, and aide-logfile warned "The last AIDE run aborted before it
wrote its report" until aidecheck.timer ran the next check.

Verified in containers: Lynis 3.1.7 with aide 0.16 on Rocky 8 empties
the report, with skip-test=FINT-4315 it stays. aide 0.19.1 (Debian 13)
and 0.19.2 (Rocky 9) keep it either way. The test only checks the
syntax of aide.conf, which the aide role validates on every
deployment, so it is skipped on every platform.
@markuslf
markuslf merged commit 90bf79a into main Nov 16, 2026
11 checks passed
@markuslf
markuslf deleted the fix/aide-alert-fatigue branch November 16, 2026 05:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant