TMAegisBeta
更多 macos 規則

macOS

TMA-MACOS-5.11

Ensure Logging Is Enabled for Sudo

高等級 1自動化macos

說明

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.

檢查方式

稽核方法: 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
預期輸出
1

修補方式

修補方法: 操作指南或基礎設施修補檔

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

屬性

作業系統
macos-26
標籤
macossystem-access
參考資料
CIS Apple macOS 26 Tahoe Benchmark v1.1.0 - 5.11 Ensure Logging Is Enabled for Sudo

檢查此主機

請在您有權稽核的機器上執行此指令。掃描為唯讀操作。

shell
tmaegis scan --target macos