TMAegisBeta
Más reglas para linux

Linux distributions

TMA-UBUNTU2604-6.2.2.2

Ensure audit logs are not automatically deleted

BajaNivel 2Automatizadalinux

Descripción

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.

Cómo se verifica

Método de auditoría: Comando de shell

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
Salida esperada
compliant

Cómo se corrige

Método de corrección: Guía o parche de infraestructura

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

Propiedades

Sistemas operativos
ubuntu-26.04
Etiquetas
cis-convertedlinux
Referencia
CIS Ubuntu Linux 26.04 LTS Benchmark v1.0.0 - 6.2.2.2

Verificar este host

Ejecute esto en un equipo que tenga permiso para auditar. El escaneo es de solo lectura.

shell
tmaegis scan --target linux --level 2