Skip to main content
Verify that your CVM runs unmodified code on genuine TEE hardware, from fetching the attestation quote to integrating verification into your CI/CD pipeline. This guide ties together the attestation workflow end-to-end with working code examples. If you’re new to attestation, start with the Quickstart to understand the basics through the dashboard. This guide assumes you want programmatic verification.

The verification flow

Every CVM attestation verification follows three steps: get a quote from your running CVM, verify the quote’s hardware signature, and check that the measurements match your expected application. The entire process runs in seconds from anywhere outside the CVM.

Step 1: Get the attestation quote

Your CVM must expose attestation endpoints. If you haven’t set this up yet, see Get Attestation for the dstack SDK setup. Fetch the quote with a fresh challenge nonce to prevent replay attacks.
Always generate a fresh nonce per verification request. Without it, an attacker could replay an old valid quote from compromised hardware.

Step 2: Verify the hardware signature

The TDX quote is signed by Intel hardware. Verify this signature to confirm the quote came from a genuine TEE. You have two options: use Phala’s verification API for convenience, or verify locally for trustless verification.

Option A: Phala Cloud verification API

The fastest approach. Sends your quote to Phala’s service which checks it against Intel’s root certificates.

Option B: Local verification with dcap-qvl

For trustless verification without relying on Phala’s API, use the open-source dcap-qvl verifier. This checks Intel’s signature chain locally.
You can also paste your quote into the TEE Attestation Explorer for an interactive visual breakdown of all quote fields.

Step 3: Verify your application code

Hardware verification proves the TEE is genuine. Now verify that your specific application is running inside it. The compose-hash in RTMR3 is a SHA256 hash of your entire Docker Compose configuration.

Step 4: Verify the nonce binding

Confirm that the quote contains your original nonce. This proves the attestation was freshly generated for your request.

Complete verification script

Here’s everything combined into a single script you can drop into your project.

Integrate verification into CI/CD

Attestation verification fits naturally into deployment pipelines. Run it after every deployment to confirm your CVM booted correctly with the expected code.

GitHub Actions example

Continuous monitoring

For production systems, run verification checks on a schedule. Here’s a lightweight monitoring approach:
Attestation verification must always run outside the CVM. Verification running inside the CVM provides no security guarantees because a compromised CVM could fake its own results.

What each check proves

Here’s a quick reference for what you’re verifying at each step and what attack it prevents. For advanced verification including RTMR3 event log replay, Docker digest pinning, on-chain governance, and source code provenance, see the Complete Chain of Trust.

Next steps

Verify Your Application

Advanced verification including RTMR3 replay and image digest checks

Verify the Platform

Verify OS, KMS, and infrastructure without trust assumptions

Field Reference

Understand every field in the attestation quote

GPU TEE Attestation

Verify GPU-specific attestation for Confidential AI workloads