Control: 1.1.8 Ensure auditing is configured for Docker files and directories - containerd.sock
Description
Audit the containerd.sock
if applicable. As well as auditing the normal Linux file system and system calls, you should also audit the Docker daemon. Because this daemon runs with root privileges, it is very important
to audit its activities and usage. Its behavior depends on some key files and directories with containerd.sock
being one such file, and as this holds various parameters for the Docker daemon, it should be audited.
Remediation
If the file exists, a rule for it should be added.
For example,
Add the line as below to the /etc/audit/audit.rules
file:
-w /run/containerd/containerd.sock -k docker
Then, restart the audit daemon using the following command
systemctl restart auditd
Default Value
By default, Docker related files and directories are not audited. The file containerd.sock
may not be present, but if it is, it should be audited.
Usage
Run the control in your terminal:
powerpipe control run docker_compliance.control.cis_v160_1_1_8
Snapshot and share results via Turbot Pipes:
powerpipe loginpowerpipe control run docker_compliance.control.cis_v160_1_1_8 --share
SQL
This control uses a named query:
exec_auditing_configured_containerd_sock