Azure confidential VMs¶
This guide takes you from no setup to a full scan of an Azure confidential VM. The scan covers the VM's size and security type, Secure Boot and vTPM, confidential OS-disk encryption, the Secure Key Release policy on the key, and the Microsoft Azure Attestation provider that policy trusts.
Checks: see the Azure confidential VMs check list.
Before you begin¶
- Install the CLI with the Azure extra:
python -m pip install "./untrust-<version>-py3-none-any.whl[azure]". The scanner then signs in withDefaultAzureCredential. Without the extra, it asks the Azure CLI for a token, so runaz loginfirst. - To check the guest's attestation, capture a Microsoft Azure Attestation token from inside the VM.
1. Try the demo¶
untrust scan --platform azure-cvm --demo
[PASS] AZ-SKU-01 Configured as required.
[FAIL] AZ-BOOT-01 Secure Boot is off.
[FAIL] AZ-DISK-01 OS disk confidential encryption is 'VMGuestStateOnly' (guest state only).
[FAIL] AZ-SKR-01 branch 0: does not require azure-compliant-cvm (or debug off).
[FAIL] AZ-MAA-01 untrustdemo.eus2.attest.azure.net uses the 'AAD' trust model: anyone with RBAC write on the provider can replace its attestation policy.
[FAIL] AZ-DBG-01 the SEV-SNP guest is debuggable; Secure Boot is off.
5 of 6 checks failed.
Recorded results: 1 PASS, 5 FAIL, 0 SKIP, 0 ERROR. Skipped checks and errors remain unassessed.
2. Grant read access¶
The scan only reads. Required permissions › Azure confidential VMs
lists every action it uses and includes a custom role definition. Reading a key's release
policy is a Key Vault data-plane action, so it goes under DataActions. Assign the role
at the resource group that holds the VM, the vault and the attestation provider.
3. Run your first scan¶
untrust scan --platform azure-cvm \
--azure-subscription <subscription-id> \
--azure-resource-group <resource-group> \
--azure-vm <vm> \
--azure-key-vault <vault> --azure-key <key> \
--azure-attestation-provider <maa-provider> \
--azure-attestation-token maa.jwt \
--output report.json
If the release policy trusts attestation providers other than Microsoft's shared ones and
the one you name, list them with --azure-approved-attestation-authority. See
Scan inputs.
4. Read the results¶
FAIL: open the check's page from the check list for what a failure enables and how to fix it.SKIP: the check was not given its input.ERROR: a read was denied or a resource was not found.
SKIP and ERROR are never counted as a pass. See Output and exit codes.
5. Keep it running¶
- Upload the report to the console, or connect the subscription through a cloud connection.
- Schedule
untrust detect --platform azure-cvmto read the Activity Log and Key Vault audit events. See Runtime detections.