ECS.1 Amazon ECS task definitions should have secure networking modes and user definitions.
Given that AWS Batch necessitates the network mode to be 'host' for task definitions, how can we ensure that our Amazon ECS configurations maintain secure networking modes and user definitions, especially considering the ecs.1 Security Hub finding?
What should we do to address the security concern here?
Per the official documentation on this AWS SecurityHub ECS control here:
So you need to make set or update the
privilegedanduserattributes of your task definition. You may have to make some changes to yourDockerfileand rebuild the image such that it can run as a non-root user.