TMAegis
Más reglas para docker

Docker

TMA-DOCKER-2.5

Ensure insecure registries are not used

AltaNivel 1Automatizadadocker

Descripción

Insecure registries are contacted without TLS verification, exposing image pulls to tampering. The audit lists the registry index configs that docker info reports as not secure (the default loopback CIDRs are not listed) and expects none.

Cómo se verifica

Método de auditoría: Comando de shell

shell
out=$(docker info --format '{{range .RegistryConfig.IndexConfigs}}{{if not .Secure}}{{.Name}}{{"\n"}}{{end}}{{end}}') || exit 1; n=$(printf '%s\n' "$out" | grep -c . || true); echo "$n"
Salida esperada
0

Cómo se corrige

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

Remove entries from "insecure-registries" in /etc/docker/daemon.json (and --insecure-registry start-up flags), configure TLS on the registries, and restart the Docker daemon.

Propiedades

Sistemas operativos
Cualquiera
Etiquetas
dockerdaemonregistry
Referencia
CIS Docker Benchmark v1.9.0 - 2.5 Ensure insecure registries are not used

Verificar este host

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

shell
tmaegis scan --target docker