이 제품은 선택한 Datadog 사이트에서 지원되지 않습니다. ().
이 페이지는 아직 한국어로 제공되지 않습니다. 번역 작업 중입니다.
현재 번역 프로젝트에 대한 질문이나 피드백이 있으신 경우 언제든지 연락주시기 바랍니다.

Metadata

Id: dockercompose-shared-host-user-namespace

Platform: DockerCompose

Severity: Medium

Category: Resource Management

Learn More

Description

Setting userns_mode: host disables user namespace remapping for a service, causing container user IDs—including root (UID 0)—to map directly to the same UIDs on the host. A container process running as root inside the container therefore has root-level privileges on the host, significantly increasing the impact of a container compromise. Services should omit userns_mode or use a remapped namespace to maintain user isolation.

Compliant Code Examples

services:
  private:
    image: alpine
    userns_mode: private
  default:
    image: alpine

Non-Compliant Code Examples

services:
  risky:
    image: alpine
    userns_mode: host