Mark missing_auid tests as pass for lastlog/faillock audit rules - #15058
Merged
Mab879 merged 2 commits intoAug 26, 2026
Merged
Conversation
The OVAL check for audit_rules_login_events_lastlog on rhel9 (modern audit watch style) matches audit rules with or without the auid filters (-F auid>=1000 -F auid!=unset), since the generated pattern ends with 'perm=wa.*$'. A rule that omits the auid filters therefore passes the scan, so the rhel9_missing_auid scenario must be a pass test, not a fail.
Like audit_rules_login_events_lastlog, this rule uses the audit_rules_watch template and on rhel9 (modern audit watch style) the OVAL check matches audit rules with or without the auid filters (-F auid>=1000 -F auid!=unset), since the generated pattern ends with 'perm=wa.*$'. A rule that omits the auid filters therefore passes the scan, so the rhel9_missing_auid scenario must be a pass test, not a fail.
|
@ggbecker: The following test failed, say
Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
Mab879
approved these changes
Aug 26, 2026
Mab879
approved these changes
Aug 26, 2026
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.
Description:
rhel9_missing_auidAutomatus scenarios of theaudit_rules_login_events_lastlogandaudit_rules_login_events_faillockrules from
.failtests to.passtests. On rhel9 (which uses themodernaudit watch style), the OVAL check accepts audit rules with or without the
auidfilters (-F auid>=1000 -F auid!=unset), so an audit rule that omitsthem must pass the scan.
Rationale:
audit_rules_watchtemplate, which generates a patternending in
-F perm=wa.*$for the-a always,exitrule form. The trailing.*$makes theauidfilters optional, so a rule like-a always,exit -F arch=b32 -F path=<watched_path> -F perm=wa -F key=loginsmatches and the scan passes. The scenarios were previously classified as
failures, which contradicts each rule's own
warnings:note stating the OVALaccepts audit rules with or without the
auidfilters. This mismatch caused afalse test expectation.
Review Hints:
warnings:block in itsrule.ymland from the generated regex inshared/templates/audit_rules_watch/oval.template.python tests/automatus.py rule --libvirt qemu:///system <VM> audit_rules_login_events_lastlog audit_rules_login_events_faillock.fail.sh→.pass.sh) plus a one-linecomment update; the
-masterand-stabilizationbranches are identical.