TMAegis
Más reglas para docker

TMA-DOCKER-3.7

Ensure that registry certificate file ownership is set to root:root

AltaNivel 1Automatizadadocker

Descripción

Registry certificate files under /etc/docker/certs.d must be owned by root:root so that they cannot be replaced by unprivileged users. The audit lists files under /etc/docker/certs.d not owned by root:root; not applicable when /etc/docker/certs.d does not exist.

Cómo se verifica

Método de auditoría: Comando de shell

shell
out=$(find /etc/docker/certs.d -type f \( ! -user root -o ! -group root \) 2>/dev/null) || exit 1; [ -z "$out" ] && echo compliant || printf '%s\n' "$out"
Salida esperada
compliant

Cómo se corrige

Método de corrección: Comando de shell

shell
find /etc/docker/certs.d -type f -exec chown root:root {} +

Propiedades

Sistemas operativos
Cualquiera
Etiquetas
dockerpermissionstls
Referencia
CIS Docker Benchmark v1.9.0 - 3.7 Ensure that registry certificate file ownership is set to root:root

Verificar este host

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

shell
tmaegis scan --target docker