Hi,
I have tested this SCA check in my environment, and this rule failed for me as well. The reason is that SCA validates the file content directly, and in your case the syscall rule is split across two lines in /etc/audit/rules.d/50-kernel_modules.rules. The SCA regex expects all required tokens (including the key) to be on the same line, but your file shows:
-a always,exit -F arch=b64 -S init_module,finit_module,delete_module,create_module,query_module -F auid>=1000 -F auid!=unset
-k kernel_modules <-- on a new line
Although auditctl -l correctly shows -F key=kernel_modules (meaning the rule is loaded fine), the file-level checks (d:/etc/audit/rules.d -> ...) don’t match because -k isn’t on the same line as the syscall rule.
To resolve this issue, ensure everything is on a single line. You can replace the content of /etc/audit/rules.d/50-kernel_modules.rules with the following (covers both ABIs and kmod execution). Keep the key name exactly as shown:
sudo tee /etc/audit/rules.d/50-kernel_modules.rules >/dev/null <<'EOF'
# Kernel module syscalls (both ABIs)
-a always,exit -F arch=b64 -S init_module -S finit_module -S delete_module -S create_module -S query_module -F auid>=1000 -F auid!=unset -k kernel_modules
-a always,exit -F arch=b32 -S init_module -S finit_module -S delete_module -S create_module -S query_module -F auid>=1000 -F auid!=unset -k kernel_modules
# Executions via kmod wrapper
-a always,exit -F path=/usr/bin/kmod -F perm=x -F auid>=1000 -F auid!=unset -k kernel_modules
# (Optional, harmless; some policies also look for these tools)
-w /sbin/insmod -p x -k kernel_modules
-w /sbin/modprobe -p x -k kernel_modules
-w /sbin/rmmod -p x -k kernel_modules
-w /usr/sbin/insmod -p x -k kernel_modules
-w /usr/sbin/modprobe -p x -k kernel_modules
-w /usr/sbin/rmmod -p x -k kernel_modules
EOF
Reload the rules:
sudo augenrules --load
Verify they match the SCA regex:
sudo auditctl -l | sed 's/ \+/\ /g' | grep -E 'kernel_modules|init_module|finit_module|delete_module|create_module|query_module|/usr/bin/kmod'
Then restart thew Wazuh agent to re-run the SCA scan again:
systemctl restart wazuh-agent
After some time check your Wazuh Configuration Assessment dashboard for checking the SCA status.
After applying the above, the SCA check passed successfully in my tests. I’ve attached a screenshot of my validation for reference.
For more details, you can also refer to the Wazuh SCA documentation.

