Where is the event for ECR scan on push for container image with vulnerabilities

0

Security hub is enabled in one of the region, us-east-1 and all the resources are in the region. I am attempting to write a Lambda function which takes an event which occurs when an image is uploaded to ecr repo and scan on push is enabled. I have granted Lambda role over permissive actions for the sake of simplicity.

Lambda Role Permissions

My first question is, where or how can I find an event that shows the vulnerabilities in an uploaded image? I tried uploading an intentional vulnerable php image, in the console I can see that the image has vulnerabilities, but I don't see an event in cloudtrail under ecr.amazonaws.com which shows the detected vulnerabilities.

1 Antwort
1
Akzeptierte Antwort

Have you checked this Document?

https://docs.aws.amazon.com/AmazonECR/latest/userguide/ecr-eventbridge.html

I think you can catch the event by selecting AWS as the service provider, ECR as the service name, and ECR Image Scan as the event type in the Event Bridge rules.

The following questions may also be helpful.

https://repost.aws/ja/questions/QU0nS7C0mSQymHWTMd9OgoQw/ecr-enhanced-scanning-eventbridge

profile picture
EXPERTE
shibata
beantwortet vor 3 Monaten
profile picture
EXPERTE
überprüft vor 2 Monaten

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen