Azure Security center giving high alerts "trusted registries only allowed for container images"

Viewed 2301

We have AKS and using images from our private acr and dockerhub images. Could see that default security policies applied to the subscription and which giving high security vulnerabilities recommendations for the trusted images. Upon checking noticed that allowed container images regex pointing to default regex ^(.+){0}$.

This will be the reason for this alerts?. How can we make certain acr and docker hub images only secure by modifying the regex

2 Answers

This seems to work for multiple registries:

^(docker\.io|quay\.io|k8s\.gcr\.io|.+azurecr\.io).*$

I had the same issue and applied the following regex: ^.+nameofACR.azurecr.io/.+$ That applied correctly for the one ACR, but I haven't figured out how to apply it to the other ACR's that is used as well.

Related