Skip to content

Files

Latest commit

 

History

History
37 lines (26 loc) · 738 Bytes

aws-ecr-enable-image-scans.md

File metadata and controls

37 lines (26 loc) · 738 Bytes

Pattern: Disabled image scans for AWS ECR

Issue: -

Description

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

Resolution: Enable ECR image scanning.

Examples

Example of incorrect code:

resource "aws_ecr_repository" "bad_example" {
  name                 = "bar"
  image_tag_mutability = "MUTABLE"

  image_scanning_configuration {
    scan_on_push = false
  }
}

Example of correct code:

resource "aws_ecr_repository" "good_example" {
  name                 = "bar"
  image_tag_mutability = "MUTABLE"

  image_scanning_configuration {
    scan_on_push = true
  }
}