Skip to content

feat(release-policy): Add trustee policy flow - #43

Merged
shariqahmed-cohere merged 6 commits into
shariq/add-platform-layerfrom
shariq/add-trustee
Sep 17, 2026
Merged

shariqahmed-cohere merged 6 commits into
shariq/add-platform-layerfrom
shariq/add-trustee

Conversation

@shariqahmed-cohere

@shariqahmed-cohere shariqahmed-cohere commented Aug 26, 2026

Copy link
Copy Markdown
Collaborator

This PR adds everything required to get this repo to generate and release trustee-compatible policies for Azure SEV-SNP nodes.


Note

High Risk
Changes attestation policy generation, release signing subjects, and GPU/SEV-SNP admission rules—security-critical paths where mistakes could admit wrong nodes or break releases.

Overview
Adds Trustee as a second policy type in generate-policy, producing trustee_policy_cpu.rego and trustee_policy_gpu.rego for Azure SEV-SNP (az-snp-vtpm) targets via cvm-measure azure-snp PCR prediction, while ITA continues on the TDX path.

The release-policy workflow now requests ita trustee, extends Sigstore attestation to all three policy files plus the manifest, ships Trustee assets on GitHub releases, and records trustee_policies digests in the signed predicate. The action gains Trustee outputs (trustee-cpu-policy-file, trustee-gpu-policy-file, trustee-policy-dir, counts) and bumps the pinned cvm-measure ref in the Docker image.

ITA GPU rules are tightened with dbgstat == "disabled" and OCSP “good” checks on device and RIM certificate chains (mirrored in new Trustee GPU template). CI adds an ITA-only guard (no Azure measurement when Trustee is not requested), dual-target test manifest, and appraisal-focused Trustee unit tests with live claim fixtures.

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

Comment thread .github/workflows/release-policy.yaml

@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.

Stale Bugbot comment from a previous run.

Comment thread attestation-policy/policy-manifest.yaml Outdated

@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.

Stale comment

Agentic security review of this Trustee policy PR found one net-new HIGH issue: diagnostic print() of full Kata agent request input in the new Azure SNP initdata, which can leak secret-bearing OCI env to host-visible logs. Other issues already covered on this PR (test targets in the production manifest; release path filter omitting trustee.py) were not re-posted.

Open in Web View Automation 

Sent by Cursor Security Agent: Security Reviewer

Comment thread .github/actions/generate-policy/generate_policy/ita-template.rego
Comment thread .github/workflows/release-policy.yaml
yousef-cohere
yousef-cohere previously approved these changes Sep 16, 2026
@shariqahmed-cohere
shariqahmed-cohere dismissed yousef-cohere’s stale review September 16, 2026 15:05

The merge-base changed after approval.

@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 2 potential issues.

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 afb5996. Configure here.

raise ValueError(
f"unknown machine type '{machine_type}' -- update machine-types.yaml"
)
return machine

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Duplicate machine-type helper functions

Low Severity

load_machine_types and resolve_machine are defined twice in the same module with identical bodies. Python keeps only the second copy, so the first pair is dead code that can drift if one definition is edited later.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit afb5996. Configure here.

- "attestation-policy/initdata/**"
- ".github/actions/generate-policy/generate_policy/ita-template.rego"
- ".github/actions/generate-policy/generate_policy/trustee-cpu-template.rego"
- ".github/actions/generate-policy/generate_policy/trustee-gpu-template.rego"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Release path filter misses toolchain

Medium Severity

The release workflow now watches the Trustee templates, but not Dockerfile, measure.py, or trustee.py. Bumping CVM_MEASURE_REF or changing PCR mapping and block generation would rewrite every Trustee (and ITA) reference value without starting a release, so production would keep attesting against stale pins.

Additional Locations (2)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit afb5996. Configure here.

@shariqahmed-cohere
shariqahmed-cohere merged commit 19fb3eb into main Sep 17, 2026
11 checks passed
@shariqahmed-cohere
shariqahmed-cohere deleted the shariq/add-trustee branch September 17, 2026 14:29
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