Docker
TMA-DOCKER-1.1.15
Ensure auditing is configured for Docker files and directories - /usr/bin/containerd-shim
MediumLevel 2Automateddocker
Description
Auditing /usr/bin/containerd-shim 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 /usr/bin/containerd-shim. Not applicable when /usr/bin/containerd-shim is not present.
How it is checked
Audit method: Shell command
shell
out=$(auditctl -l 2>/dev/null) || exit 1; printf '%s\n' "$out" | grep -Eq -e '[ =]/usr/bin/containerd\-shim/?( |$)' && echo compliant || echo missing- Expected output
compliant
How it is fixed
Fix method: Guidance or infrastructure patch
Add '-w /usr/bin/containerd-shim -k docker' to /etc/audit/rules.d/docker.rules, then load it with 'augenrules --load' (or restart auditd).
Properties
- Operating systems
- Any
- Tags
- dockerauditdhost
- Reference
- CIS Docker Benchmark v1.9.0 - 1.1.15 Ensure auditing is configured for Docker files and directories - /usr/bin/containerd-shim
Check this host
Run this on a machine you are allowed to audit. The scan is read-only.
shell
tmaegis scan --target docker --level 2