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

macOS

TMA-MACOS14-3.3

Ensure install.log Is Retained for 365 or More Days and No Maximum Size

СреднийУровень 1Автоматическаяmacos

Описание

macOS writes information pertaining to system-related events to the file /var/log/install.log and has a configurable retention policy for this file. The default logging setting limits the file size of the logs and the maximum size for all logs. The default allows for an errant application to fill the log files and does not enforce sufficient log retention. The Benchmark recommends a value based on standard use cases. The value should align with local requirements within the organization. The default value has an "all_max" file limitation, no reference to a minimum retention, and a less precise rotation argument. The all_max flag control will remove old log entries based only on the size of the log files. Log size can vary widely depending on how verbose installing applications are in their log entries. The decision here is to ensure that logs go back a year, and depending on the appli...

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

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

shell
f=/etc/asl/com.apple.install
[ -r "$f" ] || exit 1
t=$(/usr/bin/grep -io 'ttl=[0-9]*' "$f" | /usr/bin/head -1 | /usr/bin/cut -d= -f2)
if [ -n "$t" ] && [ "$t" -ge 365 ] && ! /usr/bin/grep -qi 'all_max=' "$f"; then echo compliant; else echo "ttl=${t:-unset}; all_max present or ttl < 365"; fi
Ожидаемый вывод
compliant

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

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

Terminal Method: Perform the following to ensure that install logs are retained for at least 365 days: Edit the /etc/asl/com.apple.install file and add or modify the ttl value to 365 or greater on the file line. Also, remove the all_max= setting and value from the file line.

Свойства

Операционные системы
macos-14
Теги
loggingmacossonoma
Источник
CIS Apple macOS 14.0 Sonoma Benchmark v3.1.0 - 3.3 Ensure install.log Is Retained for 365 or More Days and No Maximum Size

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

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

shell
tmaegis scan --target macos