Check ID:
Provider: Azure
Service:
Severity: HIGH
Categories:
Resource type:
containerregistry_uses_private_linkProvider: Azure
Service:
containerregistrySeverity: HIGH
Categories:
internet-exposed, trust-boundariesResource type:
microsoft.containerregistry/registriesWhat this check verifies
Azure Container Registry access via Private Endpoints (Azure Private Link). Registries withprivate endpoint connections use private IPs; others rely on the public endpoint.
Risk
Publicly reachable registries expand attack surface for credential stuffing, token abuse, and scanning. A compromise enables unauthorized pull/push, causing image data leakage and supply-chain tampering. Public routing weakens network isolation, impacting the confidentiality and integrity of images and metadata.Recommendation
Use Private Link with private endpoints and setPublic network access: Disabled.
- Restrict access to trusted VNets/subnets
- Prefer private endpoints over service endpoints
- Enforce least privilege on registry actions
- Configure private DNS for the registry FQDN
- Monitor access logs for defense in depth
Remediation
- CLI
- Terraform
- Native IaC
- Dashboard steps
az network private-endpoint create —resource-group <example_resource_name> —name <example_resource_name> —vnet-name <example_resource_name> —subnet <example_resource_name> —private-connection-resource-id <example_resource_id> —group-ids registry —connection-name <example_resource_name>
References
- https://learn.microsoft.com/en-us/azure/private-link/private-link-overview
- https://learn.microsoft.com/en-us/azure/container-registry/container-registry-vnet
- https://learn.microsoft.com/en-us/azure/container-registry/container-registry-private-link
Where this check fires
This check runs on every scheduled scan against your Azure account. Findings appear at Cloud Security → Findings filterable byCheck ID = containerregistry_uses_private_link. To re-evaluate after a fix, hit Run now on the account’s schedule under Cloud Security → Schedules — the next scan re-checks this control and marks the finding fixed or keeps it persistent.
← Back to Azure checks