TMA-DOCKER-NO-PRIVILEGED
Ensure no running container is privileged
CríticaNível 1Automatizadadocker
Descrição
Privileged containers have nearly full host access.
Como é verificado
Método de auditoria: Comando shell
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- Saída esperada
0
Como é corrigido
Método de correção: Orientação ou patch de infraestrutura
Remove 'privileged: true' from the container/compose/Kubernetes spec and redeploy
Propriedades
- Sistemas operacionais
- Qualquer
- Tags
- dockercontainers
- Referência
- CIS Docker Benchmark - Container runtime
Verificar este host
Execute isto em uma máquina que você tenha permissão para auditar. A varredura é somente leitura.
shell
tmaegis scan --target docker