SV-260930r966147_rule
V-260930
SRG-APP-000148-CTR-000345
CNTR-MK-000680
CAT II
10
When using Kubernetes orchestration, this check is Not Applicable.
Using Swarm orchestration, review and remove nonsystem containers previously created by these users utilizing shared namespaces or with a PidMode=host using the following:
docker container rm [container]
When using Kubernetes orchestration, this check is Not Applicable.
When using Swarm orchestration, to ensure the host's process namespace is not shared, log in via CLI:
Execute the following using the MKE client bundle:
container_ids=$(docker ps --quiet --filter=label=com.docker.ucp.version)
for container_id in $container_ids
do
container_name=$(docker inspect -f '{{.Name}}' $container_id | cut -c2-)
pid_mode=$(docker inspect -f '{{.HostConfig.PidMode}}' $container_id)
echo "Container Name: $container_name, ID: $container_id, PidMode: $pid_mode"
done
If PidMode = "host", this is a finding.
V-260930
False
CNTR-MK-000680
When using Kubernetes orchestration, this check is Not Applicable.
When using Swarm orchestration, to ensure the host's process namespace is not shared, log in via CLI:
Execute the following using the MKE client bundle:
container_ids=$(docker ps --quiet --filter=label=com.docker.ucp.version)
for container_id in $container_ids
do
container_name=$(docker inspect -f '{{.Name}}' $container_id | cut -c2-)
pid_mode=$(docker inspect -f '{{.HostConfig.PidMode}}' $container_id)
echo "Container Name: $container_name, ID: $container_id, PidMode: $pid_mode"
done
If PidMode = "host", this is a finding.
M
5595