Check ID: vm_ensure_using_approved_images
Provider: Azure
Service: vm
Severity: HIGH
Categories: software-supply-chain
Resource type: microsoft.compute/virtualmachines

What this check verifies

Azure VMs are evaluated for use of an approved custom image by inspecting the VM image reference. The expected format is a subscription-scoped ID like /subscriptions/.../providers/Microsoft.Compute/images/<image>, not marketplace, gallery, or community sources.

Risk

Using unapproved images undermines integrity and confidentiality by introducing unknown packages, misconfigurations, or malware. Attackers can implant backdoors, weaken hardening, and bypass baselines, enabling data exfiltration and lateral movement, and harming availability with unpatched software.

Recommendation

Standardize on golden images maintained in an Azure Compute Gallery or managed images.
  • Harden and patch each release; scan for vulnerabilities
  • Restrict who can create/publish images (least privilege)
  • Enforce deployments only from approved images via policy
  • Version, sign, and retire images regularly

Remediation

az vm create —resource-group <RESOURCE_GROUP> —name <VM_NAME> —image /subscriptions/<SUBSCRIPTION_ID>/resourceGroups/<RESOURCE_GROUP>/providers/Microsoft.Compute/images/<IMAGE_NAME> —admin-username azureuser —generate-ssh-keys

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 = vm_ensure_using_approved_images. 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