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