Skip to content

fix(security): use session-unique attestation nonce and raise on malformed report_data - #200

Merged
imran-siddique merged 2 commits into
mainfrom
fix/security-high-attestation-nonce
Jun 6, 2026
Merged

imran-siddique merged 2 commits into
mainfrom
fix/security-high-attestation-nonce

Conversation

@imran-siddique

Copy link
Copy Markdown
Member

Summary

Test plan

  • test_build_runtime_valid_report_data_produces_nonce — valid hex produces a nonce
  • test_build_runtime_malformed_report_data_raises — invalid hex raises ValueError with descriptive message
  • All 230 tests pass

🤖 Generated with Claude Code

imran-siddique and others added 2 commits June 6, 2026 13:34
…_data

Closes #152, #153.

CRYPTO-002: Replace SHA-256(public_key || b"startup") with
SHA-256(public_key || secrets.token_bytes(32)) so each gateway instance
produces a unique attestation nonce even when keypairs are shared during
blue-green deploys.

CRYPTO-003: _build_runtime() now raises ValueError on malformed
report_data instead of silently dropping the nonce. A missing nonce
removes the session binding from the TRACE Claim; a malformed
report_data indicates a broken or compromised TEE shim.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@imran-siddique
imran-siddique merged commit 7a5c60f into main Jun 6, 2026
7 checks passed
@imran-siddique
imran-siddique deleted the fix/security-high-attestation-nonce branch June 6, 2026 20:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant