MongoDB
TMA-MONGODB-6.3
Ensure that server-side scripting is disabled if not needed
설명
MongoDB supports the execution of JavaScript code for certain server-side operations: mapReduce, group, $where, $accumulator, and $function aggregation operations that allow users to define custom aggregation expressions. If you do not use these operations, server-side scripting should be disabled. The benchmark rates this recommendation Manual; the automated check covers its objective pass criterion. Checks the YAML config file /etc/mongod.conf (SKIP when it does not exist). Treat a FAIL as an accepted exception only where server-side JavaScript ($where, mapReduce, $function, $accumulator) is required.
점검 방법
감사 방식: 파일 패턴
- 파일
/etc/mongod.conf- 패턴
(?m)^[ \t]*javascriptEnabled:[ \t]*['\x22]?false\b
조치 방법
조치 방식: 가이드 또는 인프라 패치
If server-side scripting is not required set security.javascriptEnabled: false in /etc/mongod.conf (or start mongod/mongos with --noscripting) and restart.
속성
- 운영 체제
- 모두
- 태그
- mongodbhardening
- 참고 자료
- CIS MongoDB 8 Benchmark v2.0.0 - 6.3 Ensure that server-side scripting is disabled if not needed
이 호스트 점검하기
감사 권한이 있는 시스템에서 실행하세요. 스캔은 읽기 전용입니다.
tmaegis scan --target mongodb --level 2