fix(wazuh): add LXC rootcheck exclusion to prevent false positives (#10436)

This commit is contained in:
Brett Lyons
2025-12-31 01:50:46 -07:00
committed by GitHub
parent 8dbc4161c7
commit 72a7777328

View File

@@ -39,6 +39,14 @@ rm -f wazuh-*.sh
rm -f ~/wazuh-install.output
msg_ok "Setup Wazuh"
# Fix LXC container false positives in rootcheck
# When running Wazuh in an LXC container, /dev/.lxc/* paths trigger false alerts
if [ -d /dev/.lxc ]; then
msg_info "Adding LXC rootcheck exclusion"
sed -i '/<\/rootcheck>/i \ <ignore>/dev/.lxc</ignore>' /var/ossec/etc/ossec.conf
msg_ok "Added LXC rootcheck exclusion"
fi
motd_ssh
customize
cleanup_lxc