TMAegis
Thêm quy tắc cho macos

macOS

TMA-MACOS-5.11

Ensure Logging Is Enabled for Sudo

CaoCấp 1Tự độngmacos

Mô tả

In order to properly monitor the use of the sudo command, logs events for any use of sudo should be captured in the unified log.

Cách kiểm tra

Phương pháp kiểm tra: Lệnh shell

shell
out=$(/usr/bin/sudo -V 2>/dev/null) || exit 1
printf '%s\n' "$out" | /usr/bin/grep -c "Log when a command is allowed by sudoers" || true
Đầu ra mong đợi
1

Cách khắc phục

Phương pháp khắc phục: Hướng dẫn hoặc bản vá hạ tầng

Terminal: sudo /usr/sbin/visudo -f /etc/sudoers.d/<configuration file name>.

Thuộc tính

Hệ điều hành
macos-26
Thẻ
macossystem-access
Tham chiếu
CIS Apple macOS 26 Tahoe Benchmark v1.1.0 - 5.11 Ensure Logging Is Enabled for Sudo

Kiểm tra máy này

Chạy lệnh này trên máy bạn được phép kiểm tra. Lần quét chỉ ở chế độ đọc.

shell
tmaegis scan --target macos