From 60a8dc6245d71a2a553183f506d53915dccf33eb Mon Sep 17 00:00:00 2001 From: Imran Siddique Date: Tue, 21 Jul 2026 11:35:23 -0700 Subject: [PATCH] feat: accept azure-cvm-sev-snp platform in conformance suite Azure confidential VMs run SEV-SNP behind a Hyper-V paravisor (vTPM-rooted); the platform value azure-cvm-sev-snp was added to agentrust-trace 0.4.0. Add it to the bundled trace-claim schema enum and the TR-RTE valid-platform set so a valid Azure TRACE record passes conformance instead of failing TR-RTE-001. Co-Authored-By: Claude Opus 4.8 (1M context) --- CHANGELOG.md | 4 ++++ schemas/trace-claim.json | 2 +- src/trace_tests/modules/tr_rte.py | 2 ++ tests/test_level0.py | 2 +- tests/unit/test_tr_rte.py | 7 +++++++ 5 files changed, 15 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 552dba5..cba2c56 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## Unreleased + +- `azure-cvm-sev-snp` platform accepted (`runtime.platform`): Azure confidential VMs run SEV-SNP behind a Hyper-V paravisor (vTPM-rooted). Added to the bundled schema enum and the TR-RTE valid-platform set so Azure TRACE records pass conformance. Matches `agentrust-trace>=0.4`. + ## v0.2.0 — 2026-06-19 - DID subject support: `subject` now accepts `did:` URIs in addition to `spiffe://`. diff --git a/schemas/trace-claim.json b/schemas/trace-claim.json index c86244a..61259e6 100644 --- a/schemas/trace-claim.json +++ b/schemas/trace-claim.json @@ -28,7 +28,7 @@ "type": "object", "required": ["platform", "measurement"], "properties": { - "platform": {"type": "string", "enum": ["intel-tdx", "amd-sev-snp", "nvidia-h100", "nvidia-blackwell", "aws-nitro", "arm-cca", "google-confidential-space", "tpm2", "software-only"]}, + "platform": {"type": "string", "enum": ["intel-tdx", "amd-sev-snp", "azure-cvm-sev-snp", "nvidia-h100", "nvidia-blackwell", "aws-nitro", "arm-cca", "google-confidential-space", "tpm2", "software-only"]}, "measurement": {"type": "string", "pattern": "^sha(256:[0-9a-f]{64}|384:[0-9a-f]{96})$"}, "rim_uri": {"type": "string", "format": "uri"}, "nonce": {"type": "string"}, diff --git a/src/trace_tests/modules/tr_rte.py b/src/trace_tests/modules/tr_rte.py index 9686982..6184235 100644 --- a/src/trace_tests/modules/tr_rte.py +++ b/src/trace_tests/modules/tr_rte.py @@ -11,6 +11,8 @@ _VALID_PLATFORMS = frozenset({ "intel-tdx", "amd-sev-snp", + # Azure confidential VM: SEV-SNP behind a Hyper-V paravisor (vTPM-rooted). + "azure-cvm-sev-snp", "nvidia-h100", "nvidia-blackwell", "aws-nitro", diff --git a/tests/test_level0.py b/tests/test_level0.py index 3778ab2..f3c3def 100644 --- a/tests/test_level0.py +++ b/tests/test_level0.py @@ -5,7 +5,7 @@ SUBJECT_RE = re.compile(r"^(spiffe://|did:)") DIGEST_RE = re.compile(r"^sha(256:[0-9a-f]{64}|384:[0-9a-f]{96})$") VALID_PLATFORMS = { - "intel-tdx", "amd-sev-snp", "nvidia-h100", "nvidia-blackwell", + "intel-tdx", "amd-sev-snp", "azure-cvm-sev-snp", "nvidia-h100", "nvidia-blackwell", "aws-nitro", "arm-cca", "google-confidential-space", "tpm2", } VALID_ENFORCEMENT = {"enforce", "advisory", "silent"} diff --git a/tests/unit/test_tr_rte.py b/tests/unit/test_tr_rte.py index 5283680..16754a1 100644 --- a/tests/unit/test_tr_rte.py +++ b/tests/unit/test_tr_rte.py @@ -17,6 +17,13 @@ def test_valid_runtime_passes(): assert all(not f.failed() for f in findings), findings +def test_azure_cvm_platform_passes(): + """azure-cvm-sev-snp is a recognized hardware platform (vTPM-rooted SEV-SNP).""" + trace = {"runtime": {"platform": "azure-cvm-sev-snp", "measurement": "sha384:" + "a" * 96}} + findings = check(trace, level=2) + assert all(not f.failed() for f in findings), findings + + def test_invalid_platform_fails(): trace = {"runtime": {**_VALID["runtime"], "platform": "unknown-tee"}} codes = {f.code for f in check(trace) if f.failed()}