> For the complete documentation index, see [llms.txt](https://cortex-docs.paloaltonetworks.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cortex-docs.paloaltonetworks.com/posture-rules/cloud-saas-active-directory-posture-rules/cortex-posture-query-based-rules/detection-rules-by-name/aws-ecs-task-definition-is-not-configured-with-read-only-access-to-container-root-filesystems.md). Agents can also search and read this documentation through its [MCP server](https://cortex-docs.paloaltonetworks.com/~gitbook/mcp).

# AWS ECS task definition is not configured with read-only access to container root filesystems

### Synopsis

| Field               | Value                                                                                         |
| ------------------- | --------------------------------------------------------------------------------------------- |
| Rule Type           | Detection                                                                                     |
| Finding Type        | AWS ECS task definition is not configured with read-only access to container root filesystems |
| Finding ID          | 60001451                                                                                      |
| Generates a Finding | This detection rule also generates a finding                                                  |
| Severity            | Informational                                                                                 |
| Category            | CONFIGURATION                                                                                 |
| Cloud Providers     | AWS                                                                                           |
| Platform Module     | CSPM                                                                                          |
| Asset Types         | ECS\_TASK\_DEFINITION                                                                         |
| ATT\&CK Tactic      | TA0112 (TA0112)                                                                               |
| ATT\&CK Technique   | T1685 (T1685)                                                                                 |

### Description

AWS Elastic Container Service (ECS) task definitions lacking the 'readonlyRootFilesystem' parameter set to true represent a significant security misconfiguration. Containers without this setting allow modification of the root filesystem, potentially escalating a compromise.

The 'readonlyRootFilesystem' parameter within an ECS task definition controls whether containers have read-only or read-write access to their root filesystem. A read-write root filesystem enables an attacker who compromises a container to modify its base files, potentially gaining persistence or extending the attack across the entire host. This could lead to data breaches, service disruptions, and complete system compromise.

Impact from this misconfiguration includes unauthorized data modification, lateral movement within the environment, and persistent malware infections. Maintaining a read-only root filesystem for containers significantly limits the damage an attacker can inflict, even if a container is compromised. This is a crucial security best practice for containing attacks within isolated environments.

To mitigate this, ensure all ECS task definitions explicitly set the 'readonlyRootFilesystem' parameter to 'true' for every container definition. Regularly audit existing task definitions to identify and remediate any that lack this setting or have it set to 'false'. Implement automated checks as part of your CI/CD pipeline to enforce this configuration.

### Remediation

**Manual steps:**

ECS Task Definition - Manual remediation steps:

To limit ECS task definitions to read-only access to root filesystems, perform the following actions:

1. Sign into the AWS console and navigate to the Amazon ECS console
2. In the navigation pane, choose 'Task definitions'
3. Choose the task definition that is reported
4. Select 'Create new revision', and then click on 'Create new revision'
5. On the 'Create new task definition revision' page, select the container with Read-only root file system disabled
6. Under the 'Read-only root file system' section, enable 'Read only'
7. Specify the remaining configuration as per the requirements
8. Choose 'Create'


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://cortex-docs.paloaltonetworks.com/posture-rules/cloud-saas-active-directory-posture-rules/cortex-posture-query-based-rules/detection-rules-by-name/aws-ecs-task-definition-is-not-configured-with-read-only-access-to-container-root-filesystems.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
