Docker
TMA-DOCKER-2.10
Enable user namespace support
MédiaNível 2Automatizadadocker
Descrição
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.
Como é verificado
Método de auditoria: Comando shell
shell
o=$(docker info --format '{{range .SecurityOptions}}{{.}} {{end}}') || exit 1; printf '%s\n' "$o" | grep -q 'name=userns' && echo compliant || echo missing- Saída esperada
compliant
Como é corrigido
Método de correção: Orientação ou patch de infraestrutura
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).
Propriedades
- Sistemas operacionais
- Qualquer
- Tags
- dockerdaemon
- Referência
- CIS Docker Benchmark v1.9.0 - 2.10 Enable user namespace support
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 --level 2