Repository navigation
fix(config,tdx): reject bool max_delegation_depth, non-mapping attestation config, and trailing/empty TDX quote containers (#273) - #278
Conversation
|
🟡 Contributor Check: MEDIUM
Automated check by AgenTrust Contributor Check. |
carloshvp
left a comment
There was a problem hiding this comment.
Reviewed exact head 55f845dbcfb88a2b497d7a0a2bf1a629120e0294 in an isolated checkout.
Configuration and PeerNode bounds exclude booleans/non-positive values, attestation configuration requires a mapping, and TDX parsing now distinguishes permitted outer zero padding from nonzero trailing data and invalid nested container sizes. The nested/trailing-data regression passes here and fails with the actual merge-base TDX module restored in process; valid quote controls pass in the full suite.
Fresh hash-locked Python 3.12.10 validation: 791 unit tests passed, 16 skipped; pip check, Ruff, mypy and Bandit passed, with sign-offs present. git diff --check notes extra blank lines at two test-file EOFs; please trim as cleanup. No blocking source finding; hosted CI and required security-maintainer approvals remain separate.
Reviewed with OpenAI Codex.
|
Hosted CI follow-up at head This is separate from the reviewed configuration/TDX changes, which passed the local suite and focused before/after control. The protected TDX path also still needs a second independent maintainer approval of this head; my approval supplies one, not both. |
55f845d to
1889ce4
Compare
|
@carloshvp Rebased onto |
carloshvp
left a comment
There was a problem hiding this comment.
Reviewed current head 0084bed78bd1e3850d1266ab05ffd255de4cdb9a in an isolated checkout.
The scoped input-hardening behavior passes source review and the full local unit/conformance suite (847 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 tests/unit/test_config.py, tests/unit/test_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#6, commit |
|
@carloshvp Amended and force-pushed |
0084bed to
8eb696d
Compare
There was a problem hiding this comment.
Reviewed commit 8eb696da6a5f8ea0de8781795207505834bb5b8e.
The requested formatting repair is complete. I compared the changed Python files with the revision from my prior review: their parsed ASTs are identical. The pinned repository formatter, Ruff, mypy and configured Bandit pass on this head. Focused tests: 71 passed, 1 hardware-dependent skip.
This resolves my formatting change request. The existing security impact and independent maintainer/CI requirements remain applicable.
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
…ation config, and trailing/empty TDX quote containers (agentrust-io#273) - Reject boolean max_delegation_depth and non-mapping attestation sections in Ca2aConfig.from_dict, and validate max_depth and challenge_ttl_seconds in PeerNode.__init__. - Reject non-zero trailing bytes after TDX quotes, trailing slack inside the TDX signature section and QE certification data container, and empty PCK certificate chains in TdxQuote.parse. Closes agentrust-io#273 Signed-off-by: Raghuvar Karthik Durga <177662415+drk-ram@users.noreply.github.com>
8eb696d to
6a6bd2b
Compare
zohebk8s
left a comment
There was a problem hiding this comment.
Thanks for these hardening changes. The configuration checks reject invalid depth and TTL values, and the TDX parser rejects unexpected trailing data and empty certificate chains while preserving allowed zero padding. The regression coverage looks good, and technical CI passes. Approved.
carloshvp
left a comment
There was a problem hiding this comment.
The rebase preserves the configuration and TDX changes from my previous review. The added tests distinguish permitted padding from trailing data in the parsed quote. I ran the configuration and TDX modules on this head, with 71 passes and one skip for a physical quote fixture.
What
Reject boolean
max_delegation_depthand non-mappingattestationconfig inCa2aConfig.from_dictandPeerNode.__init__, and reject non-zero trailing bytes, nested container slack, and empty PCK chains inTdxQuote.parse.Why
Closes #273.
Security impact
Closes a Python
isinstance(True, int)bypass onmax_delegation_depthandPeerNode(max_depth=..., challenge_ttl_seconds=...), prevents unhandledAttributeErroron non-mappingattestationconfig, and rejects unauthenticated trailing bytes inside or after Intel TDX DCAP v4 quote containers while preserving zero-paddedconfigfs-tsmcaptures.Test plan
pytestpasses (pytest tests/unit/test_config.py tests/unit/test_tdx.py tests/unit/test_snp_tdx_attest.py -q:102 passed, 1 skipped)ruff checkpasses (ruff check src/ca2a_runtime/config.py src/ca2a_runtime/node.py src/ca2a_runtime/tee/tdx.py tests/unit/test_config.py tests/unit/test_tdx.py:All checks passed!)mypypasses (mypy --strict src/ca2a_runtime/config.py src/ca2a_runtime/node.py src/ca2a_runtime/tee/tdx.py:Success)DCO sign-off
Developer Certificate of Origin (https://developercertificate.org).