Repository navigation
fix(verify): require TDX quote version 4 and validate expected digest lengths in verify_tdx_quote and verify_sev_snp_report (#283) - #288
Conversation
|
🟡 Contributor Check: MEDIUM
Automated check by AgenTrust Contributor Check. |
carloshvp
left a comment
There was a problem hiding this comment.
Reviewed exact head fa6f446cc727712e51845434825c240927d4f606 in an isolated checkout.
The TDX verifier requires the supported v4 layout and validates expected measurement/report-data byte lengths before appraisal. SNP expectations and the platform-bits option receive the corresponding type checks. All nine focused input/version cases pass here and fail against the baseline verifier modules at the expected guard boundary. Existing valid v4/SNP controls remain passing; no blocking source finding.
Independent validation in a fresh repository-hash-locked Python 3.12.10 environment: 785 tests passed, 16 skipped; pip check, configured Ruff, mypy, Bandit and diff whitespace checks passed. Commit sign-offs are present. Hosted CI and applicable independent maintainer/security gates remain separate prerequisites to merge.
Reviewed with OpenAI Codex.
fa6f446 to
1889ce4
Compare
… lengths in verify_tdx_quote and verify_sev_snp_report (agentrust-io#283) Signed-off-by: Raghuvar Karthik Durga <177662415+drk-ram@users.noreply.github.com>
carloshvp
left a comment
There was a problem hiding this comment.
Reviewed current head aabdad3eb9dabf4a73f19526c21971f104a90037 in an isolated checkout.
The scoped input-hardening behavior passes source review and the full local unit/conformance suite (841 passed, 16 skipped). Ruff lint, mypy, configured Bandit and dependency consistency pass; the commit is signed off.
The required ruff format --check src/ tests/ job still fails on this head, while the same command passes on current main. Please run the pinned formatter on src/ca2a_verify/tdx.py and rerun the format gate. The formatting diff is mechanical; no additional behavioral repair is requested by this review. Hosted CI and the independent security-review requirements still apply.
Reviewed with OpenAI Codex.
|
The requested formatting correction is ready for author adoption: dinakarjs#8, commit |
What
Require
quote.version == 4inverify_tdx_quote, validateexpected_mrtd/expected_measurement(48 bytes) andexpected_report_data(64 bytes) inverify_tdx_quoteandverify_sev_snp_report, and validateisinstance(reject_unrecognized_platform_bits, bool)inverify_sev_snp_reportandsev_snp_verifier.Why
Closes #283.
Security impact
Prevents non-v4 TDX quotes from being parsed with DCAP v4 offsets during verification and prevents caller misconfiguration with wrong-length expected measurements or report_data bindings.
Test plan
pytestpasses (pytest tests/unit/test_tdx.py tests/unit/test_sev_snp.py -q:54 passed, 2 skipped)ruff checkpasses (ruff check src tests/unit/test_tdx.py tests/unit/test_sev_snp.py:All checks passed!)mypypassesDCO sign-off
Developer Certificate of Origin (https://developercertificate.org).