TMAegisBeta
Thêm quy tắc cho docker

Docker

TMA-DOCKER-7.5

Ensure that swarm manager is run in auto-lock mode

Trung bìnhCấp 1Tự độngdocker

Mô tả

Auto-lock protects the swarm raft keys at rest so a stolen manager disk cannot be used without the unlock key. On an active swarm manager the cluster spec must have AutoLockManagers true; compliant on non-swarm hosts and workers.

Cách kiểm tra

Phương pháp kiểm tra: Lệnh shell

shell
st=$(docker info --format '{{.Swarm.LocalNodeState}}') || exit 1; [ "$st" = active ] || { echo compliant; exit 0; }; m=$(docker info --format '{{.Swarm.ControlAvailable}}') || exit 1; [ "$m" = true ] || { echo compliant; exit 0; }; v=$(docker info --format '{{.Swarm.Cluster.Spec.EncryptionConfig.AutoLockManagers}}') || exit 1; [ "$v" = true ] && echo compliant || echo "autolock $v"
Đầu ra mong đợi
compliant

Cách khắc phục

Phương pháp khắc phục: Hướng dẫn hoặc bản vá hạ tầng

docker swarm update --autolock=true on a manager and store the unlock key securely.

Thuộc tính

Hệ điều hành
Bất kỳ
Thẻ
dockerswarm
Tham chiếu
CIS Docker Benchmark v1.9.0 - 7.5 Ensure that swarm manager is run in auto-lock mode

Kiểm tra máy này

Chạy lệnh này trên máy bạn được phép kiểm tra. Lần quét chỉ ở chế độ đọc.

shell
tmaegis scan --target docker