Skip to content

inspector-sfn-ecr-quarantine-cdk: Auto-quarantine vulnerable ECR images - #3305

Open
NithinChandranR-AWS wants to merge 1 commit into
aws-samples:mainfrom
NithinChandranR-AWS:NithinChandranR-AWS-feature-inspector-sfn-ecr-quarantine-cdk
Open

NithinChandranR-AWS wants to merge 1 commit into
aws-samples:mainfrom
NithinChandranR-AWS:NithinChandranR-AWS-feature-inspector-sfn-ecr-quarantine-cdk

Conversation

@NithinChandranR-AWS

Copy link
Copy Markdown
Contributor

Description

An Amazon Inspector finding on a vulnerable Amazon ECR image triggers, via Amazon EventBridge, an AWS Step Functions workflow that re-tags the image as quarantined and notifies via Amazon SNS. No AWS Lambda functions.

Architecture

Amazon Inspector finding (HIGH/CRITICAL, AWS_ECR_CONTAINER_IMAGE) -> Amazon EventBridge rule -> AWS Step Functions workflow: BatchGetImage reads the image manifest by digest, PutImage writes the same manifest under a 'quarantine' tag, then Amazon SNS notifies. The EventBridge target has an Amazon SQS dead-letter queue; the SNS topic is encrypted with AWS KMS. The image re-tag is a pure Step Functions AWS SDK integration, so there are no AWS Lambda functions.

Deployed and Tested

Deployed in us-east-1 and tested end-to-end: pushed an image, drove the workflow with a HIGH-severity finding event, and confirmed the image gained the 'quarantine' tag; the execution completed with SUCCEEDED.

Checklist

  • IAM least-privilege (ECR/SNS/States scoped to resource ARNs)
  • CDK synth passes
  • Deployed and tested end-to-end
  • Zero Lambda; DLQ on async target; SNS encrypted at rest

…rable ECR images

An Amazon Inspector finding on a vulnerable Amazon ECR image triggers,
via Amazon EventBridge, an AWS Step Functions workflow that re-tags the
image as quarantined (BatchGetImage + PutImage) and notifies via Amazon
SNS. Zero AWS Lambda functions. EventBridge target has an Amazon SQS
dead-letter queue; the SNS topic is encrypted with AWS KMS.

Deployed and tested end-to-end in us-east-1.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants