TMAegisBêta
Plus de règles pour docker

Docker

TMA-DOCKER-1.1.5

Ensure auditing is configured for Docker files and directories - /var/lib/docker

MoyenneNiveau 1Automatiséedocker

Description

Auditing /var/lib/docker records changes to and use of a security-relevant Docker/containerd component, supporting incident investigation. The audit lists the loaded kernel audit rules (auditctl -l, needs root) and looks for a watch or path rule on /var/lib/docker. Not applicable when /var/lib/docker is not present. If data-root points elsewhere, audit that directory instead (this check looks for /var/lib/docker).

Méthode de vérification

Méthode d'audit: Commande shell

shell
out=$(auditctl -l 2>/dev/null) || exit 1; printf '%s\n' "$out" | grep -Eq -e '[ =]/var/lib/docker/?( |$)' && echo compliant || echo missing
Sortie attendue
compliant

Méthode de correction

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

Add '-w /var/lib/docker -k docker' to /etc/audit/rules.d/docker.rules, then load it with 'augenrules --load' (or restart auditd).

Propriétés

Systèmes d'exploitation
Tous
Étiquettes
dockerauditdhost
Référence
CIS Docker Benchmark v1.9.0 - 1.1.5 Ensure auditing is configured for Docker files and directories - /var/lib/docker

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