OpenParable
Skip to content
← Back to skills

Cis Docker 5.31

DevOps & Security
cis-docker-5.31

Cis Docker 5.31 is an Agent Skill for devops & security published in the CyberStrikeus/CyberStrike repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.

Ensure that the host's user namespaces are not shared

View on GitHub ↗
QUICK START

How to use this skill

Bring this guide into your coding agent with a prompt tailored to the tool you use.

  1. Open your project in Codex.
  2. Copy and paste the prompt below.
  3. Review files and risks before approving any action.
Prompt to paste
Inspect the Agent Skill at https://github.com/CyberStrikeus/CyberStrike/blob/HEAD/.cyberstrike/skill/CIS_benchmarks/Server_Software/Docker/CIS_Docker_Benchmark_v1.8.0/cis-docker-5.31/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/cis-docker-5-31, but wait for my approval before writing files or running scripts.

Copying this prompt does not install or run the skill. Review third-party files before use.

5.31 Ensure that the host's user namespaces are not shared (Manual)

Profile Applicability

  • Level 1 - Docker - Linux

Description

You should not share the host's user namespaces with containers running on it.

Rationale

User namespaces ensure that a root process inside the container will be mapped to a non-root process outside the container. Sharing the user namespaces of the host with the container does not therefore isolate users on the host from users in the containers.

Impact

None

Audit Procedure

You should run the command below and ensure that it does not return any value for UsernsMode. If it returns a value of host, it means that the host user namespace is shared with its containers.

docker ps --quiet --all | xargs docker inspect --format '{{ .Id }}: UsernsMode={{ .HostConfig.UsernsMode }}'

Remediation

You should not share user namespaces between host and containers. For example, you should not run the command below:

docker run --rm -it --userns=host ubuntu bash

Default Value

By default, the host user namespace is shared with containers unless user namespace support is enabled.

References

  1. https://docs.docker.com/engine/security/userns-remap/
  2. https://docs.docker.com/engine/reference/commandline/run/#options

CIS Controls

Controls VersionControlIG 1IG 2IG 3
v83.12 Segment Data Processing and Storage Based on SensitivitySegment data processing and storage based on the sensitivity of the data. Do not process sensitive data on enterprise assets intended for lower sensitivity data.●●
v712 Boundary DefenseBoundary Defense
v714.1 Segment the Network Based on SensitivitySegment the network based on the label or classification level of the information stored on the servers, locate all sensitive information on separated Virtual Local Area Networks (VLANs).●●