Amazon Elastic Container Registry (Amazon ECR) repositories can be configured to scan images when they are pushed to the repository. This helps identify vulnerabilities that may be within the images before they are used to create containers in a container environment. For more information, see the AWS ECR documentation.
References:
https://docs.aws.amazon.com/AmazonECR/latest/userguide/image-scanning.html
In AWS Console -
In Terraform -
References:
https://docs.aws.amazon.com/AmazonECR/latest/userguide/image-scanning.html
https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/ecr_repository