TMAegisБета
Другие правила для linux

Linux distributions

TMA-UBUNTU2004-6.3.2.2

Ensure audit logs are not automatically deleted

НизкийУровень 2Автоматическаяlinux

Описание

The max_log_file_action setting determines how to handle the audit log file reaching the max file size. A value of keep_logs will rotate the logs but never delete old logs.

Как проверяется

Метод проверки: Команда оболочки

shell
alt0() { command -v grep >/dev/null 2>&1 || { echo "step1: grep not installed"; return 1; }; o=$(bash -c 'grep max_log_file_action /etc/audit/auditd.conf' 2>&1); printf '%s\n' "$o" | tr -s ' \t' '  ' | sed 's/^ //;s/ $//' | grep -Fxq -- 'max_log_file_action = keep_logs' || { echo step1: missing 'max_log_file_action = keep_logs'; return 1; }; }; if alt0; then echo compliant; fi
Ожидаемый вывод
compliant

Как исправляется

Метод исправления: Рекомендация или патч инфраструктуры

Set the following parameter in /etc/audit/auditd.conf: max_log_file_action = keep_logs

Свойства

Операционные системы
ubuntu-20.04
Теги
cis-convertedlinux
Источник
CIS Ubuntu Linux 20.04 LTS Benchmark v3.0.0 - 6.3.2.2

Проверить этот хост

Выполните команду на компьютере, аудит которого вам разрешён. Сканирование работает только на чтение.

shell
tmaegis scan --target linux --level 2