Check ID: containerregistry_uses_private_link
Provider: Azure
Service: containerregistry
Severity: HIGH
Categories: internet-exposed, trust-boundaries
Resource type: microsoft.containerregistry/registries

What this check verifies

Azure Container Registry access via Private Endpoints (Azure Private Link). Registries with private 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 set Public 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

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

Where this check fires

This check runs on every scheduled scan against your Azure account. Findings appear at Cloud Security → Findings filterable by Check 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