TMAegis베타
docker 관련 규칙 더 보기

Docker

TMA-DOCKER-3.10

Ensure that TLS CA certificate file permissions are set to 444 or more restrictively

높음레벨 1자동docker

설명

The TLS CA certificate file must have mode 444 or more restrictive. The path is taken from --tlscacert on the dockerd command line or "tlscacert" in /etc/docker/daemon.json (default /root/.docker/ca.pem); compliant when no such file exists (TLS not configured).

점검 방법

감사 방식: 셸 명령

shell
args=$(ps -eo args 2>/dev/null) || exit 1; s=$(printf '%s\n' "$args" | grep '[d]ockerd'; cat /etc/docker/daemon.json 2>/dev/null); p=$(printf '%s\n' "$s" | sed -n -e 's/.*--tlscacert[= ]\([^ ]*\).*/\1/p' -e 's/.*"tlscacert"[[:space:]]*:[[:space:]]*"\([^"]*\)".*/\1/p' | head -n 1); [ -n "$p" ] || p=/root/.docker/ca.pem; [ -e "$p" ] || { echo compliant; exit 0; }; out=$(find "$p" -maxdepth 0 -perm /7333) || exit 1; [ -z "$out" ] && echo compliant || echo "$p"
예상 출력
compliant

조치 방법

조치 방식: 가이드 또는 인프라 패치

chmod 444 <path of the tlscacert file> (as configured for dockerd).

속성

운영 체제
모두
태그
dockerpermissionstls
참고 자료
CIS Docker Benchmark v1.9.0 - 3.10 Ensure that TLS CA certificate file permissions are set to 444 or more restrictively

이 호스트 점검하기

감사 권한이 있는 시스템에서 실행하세요. 스캔은 읽기 전용입니다.

shell
tmaegis scan --target docker