TMAegis베타
docker 관련 규칙 더 보기

Docker

TMA-DOCKER-2.3

Ensure the logging level is set to 'info'

낮음레벨 1자동docker

설명

The info log level captures all logs except debug; lower levels lose security events and debug floods logs. Compliant when log-level is unset (default info) or set to info. The audit reads the running dockerd command line (ps) together with /etc/docker/daemon.json.

점검 방법

감사 방식: 셸 명령

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); printf '%s\n' "$s" | grep -Eq -e '(--log-level[= ]+|"log-level"[[:space:]]*:[[:space:]]*")(debug|warn|error|fatal)' && echo noncompliant || echo compliant
예상 출력
compliant

조치 방법

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

Remove the log-level option or set "log-level": "info" in /etc/docker/daemon.json (remove --log-level from the dockerd start-up flags) and restart the Docker daemon.

속성

운영 체제
모두
태그
dockerdaemon
참고 자료
CIS Docker Benchmark v1.9.0 - 2.3 Ensure the logging level is set to 'info'

이 호스트 점검하기

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

shell
tmaegis scan --target docker