Check ID:
Provider: AWS
Service:
Severity: HIGH
Categories:
Resource type:
ecs_task_definitions_containers_readonly_accessProvider: AWS
Service:
ecsSeverity: HIGH
Categories:
container-securityResource type:
AwsEcsTaskDefinitionWhat this check verifies
Amazon ECS task definitions specify whether container root filesystems are read-only viareadonlyRootFilesystem. Containers where this setting is absent or set to false effectively have write access to the root filesystem.
Risk
A writable root filesystem enables runtime tampering and persistence. Attackers can modify binaries or configs, drop implants, or delete critical files, degrading integrity and availability. Access to writable paths can also expose secrets and logs, eroding confidentiality and complicating incident response.Recommendation
EnforcereadonlyRootFilesystem: true for containers.
- Grant write access only via specific volumes required by the app
- Apply least privilege and defense in depth: run as non-root, drop unnecessary capabilities, and keep images immutable so runtime writes aren’t needed
Remediation
- CLI
- Terraform
- Native IaC
- Dashboard steps
References
- https://docs.aws.amazon.com/config/latest/developerguide/ecs-containers-readonly-access.html
- https://docs.aws.amazon.com/AmazonECS/latest/userguide/task_definition_parameters.html#container_definition_readonly
- https://docs.aws.amazon.com/securityhub/latest/userguide/ecs-controls.html#ecs-5
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_containers_readonly_access. 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