TMAegis
docker のその他のルール

TMA-DOCKER-NO-PRIVILEGED

Ensure no running container is privileged

クリティカルレベル 1自動docker

説明

Privileged containers have nearly full host access.

チェック方法

監査方法: シェルコマンド

shell
ids=$(docker ps -q) || exit 1; [ -z "$ids" ] && { echo 0; exit 0; }; out=$(docker inspect --format '{{.HostConfig.Privileged}}' $ids) || exit 1; printf '%s\n' "$out" | grep -c true || true
期待される出力
0

修正方法

修正方法: ガイダンスまたは IaC パッチ

Remove 'privileged: true' from the container/compose/Kubernetes spec and redeploy

プロパティ

オペレーティングシステム
すべて
タグ
dockercontainers
参照
CIS Docker Benchmark - Container runtime

このホストをチェック

監査が許可されているマシンで実行してください。スキャンは読み取り専用です。

shell
tmaegis scan --target docker