From 5105b1746213f1c89790ca3dfe5b2c451a27d45f Mon Sep 17 00:00:00 2001 From: spydisec <9101327+spydisec@users.noreply.github.com> Date: Wed, 11 Nov 2026 23:16:41 +0000 Subject: [PATCH] fix: say that a container can't load audit rules In a container, auditctl -s fails and install refuses with audit_off. The text only said to boot the kernel with audit on, which doesn't help there. The text and the README now name the container case. This was item 3 of #45. Co-Authored-By: Claude Fable 5.2 --- README.md | 2 +- scripts/lib/hostcheck.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 08f7eb4..0e76b36 100644 --- a/README.md +++ b/README.md @@ -85,7 +85,7 @@ Install refuses only when auditd-kit can't work on the host. |---|---| | `not_root` | Install isn't running as root. | | `auditd_missing` | `auditctl` or `augenrules` isn't installed, or auditd is older than 2.8. | -| `audit_off` | The kernel has audit turned off. | +| `audit_off` | The kernel has audit turned off, or the host is a container, where audit rules can't be loaded. | | `low_disk` | The audit log filesystem has less than 1.5 times the chosen log size free. | | `tar_missing`, `service_missing` | The `tar` or `service` command isn't installed. | | `agent_needs_audit:` | An agent reads the audit events itself, so auditd gets none: osquery with `disable_audit=false`, or Auditbeat with its own audit rules or a unicast socket. | diff --git a/scripts/lib/hostcheck.sh b/scripts/lib/hostcheck.sh index 458324c..8180162 100644 --- a/scripts/lib/hostcheck.sh +++ b/scripts/lib/hostcheck.sh @@ -124,7 +124,7 @@ hc_check_auditd() { }') hc_ae=${hc_en:-unknown} elif [ "${HOSTCHECK_NEED_KERNEL:-yes}" = yes ]; then - hc_refuse audit_off "auditctl -s failed, so boot the kernel with audit on (no audit=0)" + hc_refuse audit_off "auditctl -s failed. Boot the kernel with audit on (no audit=0). In a container, audit rules can't be loaded, so install on the host itself" fi fi fi