TMAegisБета
Другие правила для mongodb

MongoDB

TMA-MONGODB-6.3

Ensure that server-side scripting is disabled if not needed

СреднийУровень 2Автоматическаяmongodb

Описание

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

Проверить этот хост

Выполните команду на компьютере, аудит которого вам разрешён. Сканирование работает только на чтение.

shell
tmaegis scan --target mongodb --level 2