TMA-DOCKER-NO-PRIVILEGED
Ensure no running container is privileged
CríticaNivel 1Automatizadadocker
Descripción
Privileged containers have nearly full host access.
Cómo se verifica
Método de auditoría: Comando de 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- Salida esperada
0
Cómo se corrige
Método de corrección: Guía o parche de infraestructura
Remove 'privileged: true' from the container/compose/Kubernetes spec and redeploy
Propiedades
- Sistemas operativos
- Cualquiera
- Etiquetas
- dockercontainers
- Referencia
- CIS Docker Benchmark - Container runtime
Verificar este host
Ejecute esto en un equipo que tenga permiso para auditar. El escaneo es de solo lectura.
shell
tmaegis scan --target docker