Enhancement: Add Azure ACR support to DescribeRepositories
Overview
Currently, the DescribeRepositories mapping in core/pkg/resourcehandler/k8sresourcesutils.go only supports container.googleapis.com/v1 and eks.amazonaws.com/v1. There is a TODO comment in the codebase to add Azure ACR support once the ensure-image-scanning-enabled-cloud rule supports ACR.
Problem
Azure Container Registry (ACR) repositories are not currently being described or supported by the DescribeRepositories mapping. This limits the cloud provider support for image scanning configuration validation on Azure environments.
Reference:
core/pkg/resourcehandler/k8sresourcesutils.go#L51
DescribeRepositories: {"container.googleapis.com/v1", "eks.amazonaws.com/v1"}, //TODO - add azure when ensure-image-scanning-enabled-cloud supports ACRSolution
- Verify if the
ensure-image-scanning-enabled-cloudpolicy rule now supports Azure ACR (if not, add the support in theregolibrary). - Update
core/pkg/resourcehandler/k8sresourcesutils.goto include"management.azure.com/v1"in theDescribeRepositoriesslice underMapResourceToApiGroupCloud. - Test the integration with an ACR test environment to ensure repositories are properly described.
Alternatives
We could continue to omit ACR support, but this leaves Azure users without parity for image scanning configuration validation compared to GCP and AWS users.
Additional context
- This enhancement will bring Azure parity with AWS and GCP for repository description capabilities in Kubescape.
Source: kubescape/kubescape