cloud-custodian / cloud-custodian

Rules engine for cloud security, cost optimization, and governance, DSL in yaml for policies to query, filter, and take actions on resources
https://cloudcustodian.io
Apache License 2.0
5.37k stars 1.47k forks source link

ECR Public Repositories #7717

Open jb-discovery opened 2 years ago

jb-discovery commented 2 years ago

Describe the feature

It would be great to have support for AWS ECR public repositories just like with ECR private ones. The source is ecr-public.amazonaws.com.

For more information, please refer to the documentation: https://docs.aws.amazon.com/AmazonECRPublic/latest/APIReference/Welcome.html

Extra information or context

No response

thisisshi commented 2 years ago

Hm, I wonder if this would be a separate resource given that it's a separate client (https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/ecr-public.html), or if we can bolt something on via the query params in the policy

jb-discovery commented 2 years ago

hmm good question, it can go either way. The event names are the same, just a different source. In my opinion, probably best for it to be a separate resource like everything else just to be consistent and for better maintainability going forward. An example, is aws.ecs vs aws.ecs-task-definition.

kapilt commented 1 year ago

just to clarify on the goal here, its to find out if the current account / region has a listed public registry? or to query the default public registry?

jb-discovery commented 1 year ago

@kapilt the goal would be to query if the current account / region has a listed public registry and act accordingly, whether its just a notify or an action to delete the registry, etc.