All checks
High ECS · regional

ECS containers should run as non-privileged

Checks that no container in the task definition family's latest active revision sets privileged to true; older revisions a service may still run are not read. A privileged container gets elevated privileges on the host instance, similar to the root user.

service
ECS
severity
High
scope
evaluated in every region

How to fix it

  • Can break clients: A container that quietly depends on privileged access, such as to mount a device or load a kernel module, fails without it.

In the console

ECS → Task definitions → the family → the latest revision → Create new revision with JSON

privileged
Removed, or false, in the container this finding names
linuxParameters
If the container needs one kernel capability, add just that under capabilities.add instead
Task definition
The new revision, on each service's Update page and in each scheduled task; running tasks keep the old one

With Terraform

resource "aws_ecs_task_definition" "this" {
  family = "example"

  container_definitions = jsonencode([{
    name       = "app"
    image      = var.container_image
    privileged = false
  }])
}

See which of your accounts this check is failing on.

Book a live scan