Ensures ECS containers have read-only access to their root filesystems, minimizing the risk of accidental or malicious changes to the system.
Rule | ECS containers should be limited to read-only access to root filesystems |
Framework | AWS Foundational Security Best Practices |
Severity | ✔ High |
Rule Description:
AWS Foundational Security Best Practices recommend limiting ECS containers to read-only access to root filesystems to enhance security posture. By restricting write access to the root filesystem, the impact of any potential security breaches or misconfigurations is minimized, thereby reducing the risk of unauthorized modifications or data exfiltration.
Troubleshooting Steps:
If ECS containers are not configured for read-only access to root filesystems, follow these troubleshooting steps:
readonlyRootFilesystem
parameter is set to true
.Necessary Codes:
To enforce read-only access to root filesystems in ECS task definitions, include the following code snippet:
{
"containerDefinitions": [
{
"name": "sample-container",
"image": "sample-image",
"readonlyRootFilesystem": true
}
]
}
Remediation Steps:
Follow these step-by-step instructions to restrict ECS containers to read-only access to root filesystems:
"readonlyRootFilesystem": true
.By following these steps, you can ensure that ECS containers are limited to read-only access to root filesystems in alignment with AWS Foundational Security Best Practices.