TMAegis
Plus de règles pour docker

TMA-DOCKER-2.10

Enable user namespace support

MoyenneNiveau 2Automatiséedocker

Description

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.

Méthode de vérification

Méthode d'audit: Commande shell

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

Méthode de correction

Méthode de correction: Recommandation ou correctif d'infrastructure

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).

Propriétés

Systèmes d'exploitation
Tous
Étiquettes
dockerdaemon
Référence
CIS Docker Benchmark v1.9.0 - 2.10 Enable user namespace support

Vérifier cet hôte

Exécutez cette commande sur une machine que vous êtes autorisé à auditer. L'analyse est en lecture seule.

shell
tmaegis scan --target docker --level 2