Skip to content

feat(verify): TPM attestation measurement verification - #133

Merged
imran-siddique merged 1 commit into
mainfrom
worktree-agent-a1f0282180a795a8d
Jun 6, 2026
Merged

imran-siddique merged 1 commit into
mainfrom
worktree-agent-a1f0282180a795a8d

Conversation

@imran-siddique

Copy link
Copy Markdown
Member

Summary

  • Adds src/cmcp_verify/tpm.py with verify_tpm_measurement() implementing issue [verify] TPM attestation verification in cmcp-verify #62: validates the sha256:<64-hex> measurement format and parses TPM2B_ATTEST blobs (magic check, qualifying_data extraction and SHA-256 verification against tee_public_key_hex || session_id)
  • Wires tpm2 platform into verify_trace_claim() replacing the stub; software-only mode and other platforms are unaffected
  • EK cert chain is always marked unverified (Phase 1 scope; requires manufacturer CA lookup)
  • Adds src/cmcp_verify to mypy files list in pyproject.toml
  • 17 new tests in tests/unit/test_tpm_verify.py; all 195 tests pass

Closes #62

Test plan

  • python -m ruff check src/ tests/ — clean
  • python -m bandit -r src/ -c pyproject.toml — no issues
  • python -m mypy src/cmcp_gateway/ src/cmcp_verify/ — no issues
  • python -m pytest tests/ — 195 passed

🤖 Generated with Claude Code

Implement measurement-format validation and TPM2B_ATTEST parsing in
cmcp_verify.tpm, wire into verify_trace_claim for the tpm2 platform
path, and add mypy coverage for src/cmcp_verify.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@imran-siddique
imran-siddique merged commit cc3c456 into main Jun 6, 2026
7 checks passed
@imran-siddique
imran-siddique deleted the worktree-agent-a1f0282180a795a8d branch June 6, 2026 19:20
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.

[verify] TPM attestation verification in cmcp-verify

1 participant