[{"data":1,"prerenderedAt":85},["ShallowReactive",2],{"pattern-inspector-eventbridge-sfn-typescript-cdk":3,"pattern-group-inspector-eventbridge-sfn-typescript-cdk":6},{"id":4,"title":5,"architectureURL":6,"cleanup":7,"contributors":10,"deploy":12,"description":18,"extension":19,"framework":20,"gitHub":21,"highlight":6,"introBox":25,"language":31,"level":32,"meta":33,"patternArch":34,"patternGroup":6,"patternGroupLabel":6,"resources":69,"stem":80,"testing":81,"videoId":6,"__hash__":84},"patterns\u002Fpatterns\u002Finspector-eventbridge-sfn-typescript-cdk.json","Tag vulnerable Amazon ECR images",null,{"text":8},[9],"Delete the stack: \u003Ccode>npx cdk destroy\u003C\u002Fcode>.",[11],"content\u002Fcontributors\u002Fnithin-chandran-r.json",{"text":13},[14,15,16,17],"\u003Ccode>cd serverless-patterns\u002Finspector-eventbridge-sfn\u002Ftypescript\u002Fcdk\u003C\u002Fcode>","\u003Ccode>npm install\u003C\u002Fcode>","If this account and Region have never been used with the AWS CDK, run \u003Ccode>npx cdk bootstrap\u003C\u002Fcode> once","\u003Ccode>npx cdk deploy\u003C\u002Fcode>","An Amazon Inspector finding on a vulnerable Amazon ECR image triggers an AWS Step Functions workflow via Amazon EventBridge to tag the image and alert via Amazon SNS.","json","AWS CDK",{"template":22},{"patternPath":23,"templateFile":24},"inspector-eventbridge-sfn\u002Ftypescript\u002Fcdk","lib\u002Finspector-sfn-ecr-quarantine-stack.ts",{"headline":26,"text":27},"How it works",[28,29,30],"This pattern tags a vulnerable container image as soon as Amazon Inspector raises a HIGH or CRITICAL finding on it. The tag is a marker only: it doesn't stop anyone pulling or deploying the image.","An Amazon Inspector finding on an Amazon ECR container image is routed by an Amazon EventBridge rule (source aws.inspector2, detail-type Inspector2 Finding, filtered to ACTIVE HIGH\u002FCRITICAL findings on images in the demo repository) to an AWS Step Functions STANDARD workflow.","The workflow reads the image manifest by digest with `ecr:BatchGetImage` and writes the same manifest back under a per-image `quarantine-\u003Cdigest>` tag with `ecr:PutImage` - a pure control-plane re-tag that needs no AWS Lambda function - then publishes an Amazon SNS notification. Retry and Catch drive a failure-notification path, and repeat findings for an already tagged image end without another email.","TypeScript","300",{},{"icon1":35,"icon2":40,"icon3":43,"icon4":47,"icon5":52,"line1":56,"line2":60,"line3":63,"line4":66},{"x":36,"y":37,"service":38,"label":39},12,37,"inspector","Amazon Inspector\nScan finding",{"x":37,"y":37,"service":41,"label":42},"eventbridge-rule","Amazon EventBridge\nRule",{"x":44,"y":37,"service":45,"label":46},62,"sfn","AWS Step Functions\nWorkflow",{"x":48,"y":49,"service":50,"label":51},88,20,"sns","Amazon SNS\nNotification",{"x":48,"y":53,"service":54,"label":55},65,"ecr","Amazon ECR\nImage tag",{"from":57,"to":58,"label":59},"icon1","icon2","High,\n critical",{"from":58,"to":61,"label":62},"icon3","Start",{"from":61,"to":64,"label":65},"icon4","Publish",{"from":61,"to":67,"label":68},"icon5","Tag",{"bullets":70},[71,74,77],{"text":72,"link":73},"Amazon EventBridge event schema for Amazon Inspector events","https:\u002F\u002Fdocs.aws.amazon.com\u002Finspector\u002Flatest\u002Fuser\u002Feventbridge-integration.html",{"text":75,"link":76},"Call AWS SDK services from AWS Step Functions","https:\u002F\u002Fdocs.aws.amazon.com\u002Fstep-functions\u002Flatest\u002Fdg\u002Fsupported-services-awssdk.html",{"text":78,"link":79},"Amazon ECR PutImage API reference","https:\u002F\u002Fdocs.aws.amazon.com\u002FAmazonECR\u002Flatest\u002FAPIReference\u002FAPI_PutImage.html","patterns\u002Finspector-eventbridge-sfn-typescript-cdk",{"text":82},[83],"See the GitHub repo for detailed testing instructions.","zMEyfsAeztOD88rcU09QSQAAeWX4RcYOcrQJW4dTnJ8",1795084465502]