Docker
TMA-DOCKER-3.7
Ensure that registry certificate file ownership is set to root:root
高级别 1自动化docker
说明
Registry certificate files under /etc/docker/certs.d must be owned by root:root so that they cannot be replaced by unprivileged users. The audit lists files under /etc/docker/certs.d not owned by root:root; not applicable when /etc/docker/certs.d does not exist.
检查方式
审计方法: Shell 命令
shell
out=$(find /etc/docker/certs.d -type f \( ! -user root -o ! -group root \) 2>/dev/null) || exit 1; [ -z "$out" ] && echo compliant || printf '%s\n' "$out"- 预期输出
compliant
修复方式
修复方法: Shell 命令
shell
find /etc/docker/certs.d -type f -exec chown root:root {} +属性
- 操作系统
- 任意
- 标签
- dockerpermissionstls
- 参考
- CIS Docker Benchmark v1.9.0 - 3.7 Ensure that registry certificate file ownership is set to root:root
检查本机
请在您有权审计的机器上运行此命令。扫描为只读操作。
shell
tmaegis scan --target docker