turbot/docker_compliance

Control: 3.16 Ensure that the Docker sock file permissions are set to 660 or more restrictively

Description

You should verify that the Docker socket file has permissions of 660 or are configured more restrictively.

Only root and the members of the docker group should be allowed to read and write to the default Docker Unix socket. The Docker socket file should therefore have permissions of 660 or more restrictive permissions.

Remediation

The following command could be executed:

chmod 660 /var/run/docker.sock

This sets the file permissions of the Docker socket file to 660.

Default Value

By default, the permissions for the Docker socket file is correctly set to 660.

Usage

Run the control in your terminal:

powerpipe control run docker_compliance.control.cis_v160_3_16

Snapshot and share results via Turbot Pipes:

powerpipe login
powerpipe control run docker_compliance.control.cis_v160_3_16 --share

SQL

This control uses a named query:

exec_permissions_660_docker_sock

Tags