HIGH
Source
Trivy
ID
AVD-AWS-0030

ECR repository has image scans disabled.

Repository image scans should be enabled to ensure vulnerable software can be discovered and remediated as soon as possible.

Impact

Follow the appropriate remediation steps below to resolve the issue.

Enable ECR image scanning

1
2
3
4
5
6
7
Resources:
  GoodExample:
    Type: AWS::ECR::Repository
    Properties:
      ImageScanningConfiguration:
        ScanOnPush: true
      RepositoryName: test-repository

Enable ECR image scanning

1
2
3
4
5
6
resource "aws_ecr_repository" "good_example" {
  name = "bar"
  image_scanning_configuration {
    scan_on_push = true
  }
}