Skip to content

Conversation

jan-cerny
Copy link
Collaborator

Description:

Introduce new template audit_rules_kernel_module_loading and use this template in rules in audit_kernel_module_loading group instead of static content. This change reduces code duplication and unifies code among similar rules.

Rationale:

Consequence of this change is that the rule audit_rules_kernel_module_loading_create now will start containing -F auid>=1000 -F auid!=unset in the audit rule that was missing there.

Resolves: https://issues.redhat.com/browse/RHEL-102334

Review Hints:

Run automatus tests for audit_rules_kernel_module_loading_create and other rules.

Use template audit_rules_kernel_module_loading instead of static content
in rules audit_rules_kernel_module_loading_create,
audit_rules_kernel_module_loading_delete
audit_rules_kernel_module_loading_finit,
audit_rules_kernel_module_loading_init,
audit_rules_kernel_module_loading_query.

This change unifies the content and reduces code duplication.
Unify rule descriptions in rules that use the audit_rules_kernel_module_loading
template.
Refactor the OVAL code in audit_rules_kernel_module_loading template
by moving the common code to a new Jinja macro.
The point of this change is to have just a single definition of the
regular expression. That allows us to change the regular expression
more easily.
Create templated test scenarios for the
audit_rules_kernel_module_loading template, based on existing scenarios
in rule audit_rules_kernel_module_loading_delete.  Remove some per-rule
test scenarios to prevent duplication.
@jan-cerny jan-cerny added this to the 0.1.79 milestone Oct 16, 2025
@jan-cerny jan-cerny added the bugfix Fixes to reported bugs. label Oct 16, 2025
Copy link

openshift-ci bot commented Oct 16, 2025

@jan-cerny: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/e2e-aws-openshift-node-compliance 0af380b link true /test e2e-aws-openshift-node-compliance

Full PR test history. Your PR dashboard.

Instructions 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 Mab879 self-assigned this Oct 16, 2025
@Mab879
Copy link
Member

Mab879 commented Oct 16, 2025

@yuumasato @Vincent056 @rhmdnd Can you please review the k8s remediation?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix Fixes to reported bugs.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants