TMAegisBeta
更多 cockroachdb 规则

CockroachDB

TMA-COCKROACHDB-1.4

Do Not Use the --insecure Flag in Production Environments Under Any Circumstances

严重级别 1自动化cockroachdb

说明

CockroachDB supports an --insecure startup option that disables all node-to-node and client-to-node encryption, authentication, and certificate validation. When started in this mode, the cluster operates entirely without Transport Layer Security (TLS), allowing unauthenticated and unencrypted connections. This option exists only for initial testing or ephemeral local development. The benchmark rates this recommendation Manual; the automated check covers its objective pass criterion. Passes when no running cockroach start process uses --insecure (FAIL when no node process is running). Also grep the node log for "RUNNING IN INSECURE MODE".

检查方式

审计方法: Shell 命令

shell
out=$(ps -eo args= | grep '[c]ockroach start') || exit 1; printf '%s\n' "$out" | grep -c -- '--insecure' || true
预期输出
0

修复方式

修复方法: 操作指南或基础设施补丁

Stop the insecure nodes, create a CA and node/client certificates (cockroach cert create-ca / create-node / create-client), replace --insecure with --certs-dir=<certs> in the systemd unit and restart the nodes.

属性

操作系统
任意
标签
cockroachdbtlsauthentication
参考
CIS CockroachDB v25.x Benchmark v1.0.0 - 1.4 Do Not Use the --insecure Flag in Production Environments Under Any Circumstances

检查本机

请在您有权审计的机器上运行此命令。扫描为只读操作。

shell
tmaegis scan --target cockroachdb