Skip to content

ci(podvm): add universal cc-nvidia SEV-SNP image build#52

Draft
alhassankhedr-cohere wants to merge 1 commit into
coherefrom
alhassankhedr/podvm-sev-snp
Draft

ci(podvm): add universal cc-nvidia SEV-SNP image build#52
alhassankhedr-cohere wants to merge 1 commit into
coherefrom
alhassankhedr/podvm-sev-snp

Conversation

@alhassankhedr-cohere

@alhassankhedr-cohere alhassankhedr-cohere commented Jun 30, 2026

Copy link
Copy Markdown

Summary

Adds an opt-in cc-nvidia podvm image variant so a single image serves GCP-TDX, GCP-SNP (RTX 6000 PRO) and Azure-SNP (H100). The mkosi rootfs is already TEE-agnostic (generic HWE kernel handles TDX+SNP, tpm2-tools present, nvidia-580-open covers Hopper+Blackwell); the only TEE-specific bit is the prebuilt AA artifact pulled by TEE_PLATFORM, now available as the universal cc-nvidia variant (companion guest-components PR).

The live tdx-nvidia push/tag path and its enforced TDX baselines are unchanged.

Changes

  • build-podvm-cohere.yaml: TEE_PLATFORM workflow_dispatch input (default tdx-nvidia); TDX-only measurement/baseline/smoke steps guarded; metadata-only measurements.json for cc-nvidia (no rtmr2 — baselines deferred to Phase 2); opt-in deploy_azure job.
  • deploy-gcp-cohere.yaml: derive guest-os-features from the image tee_platform (cc-nvidia -> TDX_CAPABLE,SEV_SNP_CAPABLE).
  • deploy-azure-cohere.yaml (new): reusable workflow publishing a ConfidentialVmSupported Azure Compute Gallery image version; gated on the Azure CC infra (secrets/vars documented in the file).
  • versions.yaml: pin guest-components to the cc-nvidia AA build (66aa03f).

Test plan

  • guest-components cc-nvidia AA publish run green.
  • Dispatch build-podvm-cohere (tee_platform=cc-nvidia, deploy_gcp=true); image builds + deploys to GCP.
  • Boot an RTX 6000 PRO (SEV-SNP) peer pod on the image; AA collects CPU+GPU evidence.

Warning

Do NOT merge to cohere yet. The versions.yaml pin (66aa03f) is ahead of the live pin and rebuilds the tdx-nvidia AA, which would change the live TDX measurements. Merge only after the TDX baselines are regenerated (Phase 2).


Note

High Risk
Touches confidential VM image pipeline, attestation metadata, and a guest-components pin that would change live TDX AA if merged without baseline regeneration; Azure/GCP publish paths add production image surface area.

Overview
Adds an opt-in cc-nvidia PodVM build path alongside the unchanged default tdx-nvidia push/tag flow, so one image can target GCP TDX/SNP and Azure SEV-SNP while deferring attestation baselines for the universal variant (Phase 2).

build-podvm-cohere.yaml gains workflow_dispatch inputs for tee_platform and deploy_azure; TEE_PLATFORM drives which AA OCI artifact make binaries pulls. TDX measurement, baseline updates, smoke artifacts, and GCP TDX smoke run only when tee_platform is tdx-nvidia. For cc-nvidia, the workflow writes metadata-only measurements.json (no rtmr2/mrtd), makes com.cohere.rtmr2 optional on GHCR push, and can chain a new deploy-azure job.

deploy-gcp-cohere.yaml reads tee_platform from measurements and sets guest-os-features accordingly (cc-nvidiaTDX_CAPABLE,SEV_SNP_CAPABLE).

deploy-azure-cohere.yaml (new reusable workflow) verifies GHCR attestation, converts the disk to fixed VHD, and publishes a ConfidentialVmSupported Azure Compute Gallery image version.

versions.yaml pins guest-components to 66aa03f for the universal AA build, with an explicit note not to merge to cohere until TDX baselines are regenerated.

Reviewed by Cursor Bugbot for commit 4610711. Bugbot is set up for automated code reviews on this repo. Configure here.

Add an opt-in cc-nvidia podvm variant (TDX + SEV-SNP + Azure SNP-vTPM +
NVIDIA in one AA) so a single image serves GCP-TDX, GCP-SNP (RTX 6000 PRO)
and Azure-SNP (H100). The live tdx-nvidia push/tag path is unchanged.

- build-podvm-cohere: TEE_PLATFORM workflow_dispatch input; TDX-only
  measurement/baseline/smoke steps guarded; metadata-only measurements for
  cc-nvidia (baselines deferred to Phase 2); opt-in deploy_azure job.
- deploy-gcp-cohere: derive guest-os-features from the image tee_platform
  (cc-nvidia -> TDX_CAPABLE,SEV_SNP_CAPABLE).
- deploy-azure-cohere: new reusable workflow publishing a
  ConfidentialVmSupported Compute Gallery image (gated on Azure CC infra).
- versions.yaml: pin guest-components to the cc-nvidia AA build (66aa03f);
  branch-scoped, do not merge to cohere until TDX re-baseline (Phase 2).
type: string

permissions:
id-token: write # Azure login via OIDC federated credentials
name: Azure
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
oras version

- name: Login to GHCR
uses: docker/login-action@4907a6ddec9925e35a0a9e82d7399ccc52663121 # v4
Comment on lines +12 to +32
on:
workflow_call:
inputs:
image_tag:
description: "OCI artifact tag in GHCR to deploy"
required: true
type: string
secrets:
AZURE_CLIENT_ID:
required: true
AZURE_TENANT_ID:
required: true
AZURE_SUBSCRIPTION_ID:
required: true

workflow_dispatch:
inputs:
image_tag:
description: "OCI artifact tag in GHCR to deploy"
required: true
type: string
--location "$LOCATION" \
--os-vhd-storage-account "$STORAGE_ACCOUNT" \
--os-vhd-uri "$BLOB_URI" \
--tags "tee=${TEE_PLATFORM}" "image_name=${IMAGE_NAME}" "caa_commit=${{ steps.pull.outputs.caa_commit }}"

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 4610711. Configure here.

needs.deploy-gcp.result == 'success' &&
(github.event_name == 'push' ||
(github.event_name == 'workflow_dispatch' && inputs.deploy_gcp))
(github.event_name == 'workflow_dispatch' && inputs.deploy_gcp && inputs.tee_platform == 'tdx-nvidia'))

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Smoke gate ignores tee default

Medium Severity

The smoke-gcp-tdx job only runs on manual dispatch when inputs.tee_platform == 'tdx-nvidia', but workflow TEE_PLATFORM uses inputs.tee_platform || 'tdx-nvidia'. API dispatches that omit tee_platform still build and deploy TDX images yet skip the smoke job, unlike UI runs with the same intent.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 4610711. Configure here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants