TMAegis
mongodb 관련 규칙 더 보기

TMA-MONGODB-5.4

Ensure that new entries are appended to the end of the log file

낮음레벨 2자동mongodb

설명

By default, new log entries will overwrite old entries after a restart of the mongod or Mongols service. Enabling the systemLog.logAppend setting causes new entries to be appended to the end of the log file rather than overwriting the existing content of the log when the mongos or mongod instance restarts. Checks the YAML config file /etc/mongod.conf (SKIP when it does not exist).

점검 방법

감사 방식: 파일 패턴

파일
/etc/mongod.conf
패턴
(?m)^[ \t]*logAppend:[ \t]*['\x22]?true\b

조치 방법

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

Set systemLog.logAppend: true in /etc/mongod.conf and restart mongod.

속성

운영 체제
모두
태그
mongodblogging
참고 자료
CIS MongoDB 8 Benchmark v2.0.0 - 5.4 Ensure that new entries are appended to the end of the log file

이 호스트 점검하기

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

shell
tmaegis scan --target mongodb --level 2