Repository navigation
Conversation
Signed-off-by: Raghuvar Karthik Durga <177662415+drk-ram@users.noreply.github.com>
drk-ram
requested review from
a team,
carloshvp,
qubeena07,
rajnisht7 and
zohebk8s
as code owners
November 6, 2026 16:30
Contributor
|
🔴 Contributor Check: HIGH
Automated check by AgenTrust Contributor Check. |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Canonicalize TRACE claim signing inputs, claim digests, and tool catalog/definition SHA-256 hashes with RFC 8785 (JCS) instead of
json.dumps(..., ensure_ascii=True).Why
json.dumps(..., sort_keys=True, separators=(",", ":"))defaults toensure_ascii=True, escaping non-ASCII UTF-8 code points to\uXXXXand formatting floating-point values using Python's repr rather than RFC 8785 Section 3.2.2.3. That caused TRACE claims and catalog hashes containing non-ASCII or float values to diverge from JCS verifiers.Closes #837
Security impact
Restores RFC 8785 (JCS) canonicalization across
cmcp_runtime.audit.trace_claim,cmcp_runtime.catalog.loader,cmcp_runtime.session.manager, andcmcp_verify, preventing cross-verifier signature and digest mismatches on non-ASCII or numeric claims.Test plan
pytestpasses (pytest tests/unit/test_trace_claim.py tests/unit/test_catalog_jcs_hashes.py tests/unit/test_session_manager.py tests/unit/test_kill_switch.py tests/unit/test_verify.py— 165 passed)ruff checkpasses (ruff check src tests— passed)mypypasses (mypy src— passed)DCO sign-off
Signed-off-by:(git commit -s)