ECS task definitions should configure non-root users in Linux container definitions
Flags Amazon ECS Linux task definitions whose container definitions do not set an explicit non-root user. Running containers as root grants the workload unnecessary privileges.
- service
- ECS
- severity
- Medium
- scope
- evaluated in every region
How to fix it
Set a non-root user on every Linux container in every ECS task definition.
- Identify the affected task definition's Dockerfile and add a USER directive (or set the user field in the container definition).
- Create a new revision of the task definition with the non-root user populated.
- Deploy the new revision.
See which of your accounts this check is failing on.
Book a demo