Stabilization: Add RHEL9-specific audit rules for faillock and lastlog with auid filter - #15035
Merged
jan-cerny merged 1 commit intoAug 24, 2026
Merged
Conversation
RHEL9 STIG v2r9 requires auid filters for the following audit rules: - RHEL-09-654250: audit_rules_login_events_faillock - RHEL-09-654255: audit_rules_login_events_lastlog RHEL10 STIG v1r2 does NOT require auid filters for the equivalent rules: - RHEL-10-500750 - RHEL-10-500760 This commit removes the templates from rule.yml and provides: 1. **shared.sh/yml/xml** - Template-derived content (no auid filters) used by: - rhel8, rhel10, ol7, ol8, ol9, ol10, rhcos4, rhv4 - almalinux9, anolis8, anolis23, fedora - debian11, ubuntu2204, ubuntu2404 - sle12, sle15 2. **rhel9.sh/yml/xml** - Custom RHEL9 content with required auid filters: - Bash: Uses bash_fix_audit_syscall_rule macro with AUID_FILTERS - Ansible: Adds auid>=1000 and auid!=unset to rule patterns - OVAL: Requires auid>=1000 and auid!=unset in pattern matching The generated RHEL9 rules include: ``` -a always,exit -F arch=b32 -F path=/var/run/faillock -F perm=wa -F auid>=1000 -F auid!=unset -k logins -a always,exit -F arch=b64 -F path=/var/run/faillock -F perm=wa -F auid>=1000 -F auid!=unset -k logins ``` And similar for /var/log/lastlog. Test scenarios verify both passing and failing cases for RHEL9. This is a temporary solution until DISA clarifies why RHEL10 STIG doesn't require the auid parameter. If DISA updates RHEL10 to match RHEL9, the custom content can be updated accordingly. Fixes: Missed requirement in PR ComplianceAsCode#15000 References: https://stigaview.com/products/rhel9/v2r9/RHEL-09-654250/ References: https://stigaview.com/products/rhel9/v2r9/RHEL-09-654255/ References: https://stigaview.com/products/rhel10/v1r2/RHEL-10-500750 References: https://stigaview.com/products/rhel10/v1r2/RHEL-10-500760 (cherry picked from commit 6be7f90)
ggbecker
requested review from
Mab879,
jan-cerny,
matusmarhefka and
vojtapolasek
as code owners
August 24, 2026 09:41
jan-cerny
approved these changes
Aug 24, 2026
jan-cerny
merged commit Aug 24, 2026
b0b8463
into
ComplianceAsCode:stabilization
57 of 58 checks passed
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.
Backport #15016