Repository navigation
fix(roles/aide, roles/lynis): reduce AIDE false alarms - #749
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two sources of daily or recurring AIDE false alarms.
*.crtin/etc/pki/tls/certsand/etc/ssl/certsis now checked withPERMS, while the trust bundles and private keys keepNORMAL. Verified with aide 0.16 to 0.19.2; Moleculeaidegreen on Rocky 8/9/10, Debian 12/13, Ubuntu 22.04/24.04/26.04.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); Moleculelynisgreen on Rocky 8/10, Debian 12, Ubuntu 22.04.