TMAegis
Más reglas para docker

TMA-DOCKER-2.10

Enable user namespace support

MediaNivel 2Automatizadadocker

Descripción

User namespace remapping maps root inside containers to an unprivileged host UID, limiting the impact of a container breakout. The audit checks that docker info lists name=userns under SecurityOptions.

Cómo se verifica

Método de auditoría: Comando de shell

shell
o=$(docker info --format '{{range .SecurityOptions}}{{.}} {{end}}') || exit 1; printf '%s\n' "$o" | grep -q 'name=userns' && echo compliant || echo missing
Salida esperada
compliant

Cómo se corrige

Método de corrección: Guía o parche de infraestructura

Ensure /etc/subuid and /etc/subgid contain a mapping, set "userns-remap": "default" in /etc/docker/daemon.json and restart the Docker daemon (existing images and volumes need to be re-created).

Propiedades

Sistemas operativos
Cualquiera
Etiquetas
dockerdaemon
Referencia
CIS Docker Benchmark v1.9.0 - 2.10 Enable user namespace support

Verificar este host

Ejecute esto en un equipo que tenga permiso para auditar. El escaneo es de solo lectura.

shell
tmaegis scan --target docker --level 2