Check ID:
Provider: AWS
Service:
Severity: HIGH
Categories:
Resource type:
ecs_task_definitions_host_namespace_not_sharedProvider: AWS
Service:
ecsSeverity: HIGH
Categories:
container-securityResource type:
AwsEcsTaskDefinitionWhat this check verifies
ECS task definitions wherepidMode is host are configured to share the host’s process namespace with containers, rather than using isolated task or private namespaces.
Risk
Host PID sharing lets containers view and interact with host processes, eroding isolation.- Confidentiality: process enumeration and metadata leakage
- Integrity/Availability: signal or
ptracetampering, killing services
Recommendation
Prefer isolated PID namespaces: setpidMode=task or use the default per-container namespace. Avoid host PID sharing except for tightly controlled diagnostics.
Apply least privilege: non-root users, minimal capabilities, read-only filesystems; and defense in depth with network and runtime controls.
Remediation
- CLI
- Terraform
- Native IaC
- Dashboard steps
References
- https://docs.aws.amazon.com/securityhub/latest/userguide/ecs-controls.html#ecs-3
- https://docs.aws.amazon.com/config/latest/developerguide/ecs-task-definition-pid-mode-check.html
- https://docs.aws.amazon.com/AmazonECS/latest/userguide/task_definition_parameters.html#container_definition_pid_mode
Where this check fires
This check runs on every scheduled scan against your AWS account. Findings appear at Cloud Security → Findings filterable byCheck ID = ecs_task_definitions_host_namespace_not_shared. To re-evaluate after a fix, hit Run now on the account’s schedule under Cloud Security → Schedules — the next scan re-checks this control and marks the finding fixed or keeps it persistent.
← Back to AWS checks