Skip to content

fix(signature): enforce strict JSON/profile and producer key binding across envelopes and claims (#157) - #162

Open
drk-ram wants to merge 1 commit into
agentrust-io:mainfrom
drk-ram:drk-ram-fix-signature-157
Open

drk-ram wants to merge 1 commit into
agentrust-io:mainfrom
drk-ram:drk-ram-fix-signature-157

Conversation

@drk-ram

@drk-ram drk-ram commented Oct 25, 2026

Copy link
Copy Markdown

Closes #157

Summary

  • Reject non-finite JSON constants (NaN, Infinity, -Infinity) in loads_unique and enforce anchor_profile_violation across parsed inner claims and envelopes in verify_claim_signature.
  • Validate producer and signature types in _verify_detached_envelope and _verify_embedded_claim before consulting _TRUSTED_PRODUCERS, and reject cnf when it is not a JSON object.
  • When public_key is omitted on an embedded claim with a registered producer, enforce that cnf.jwk.x matches _TRUSTED_PRODUCERS[producer] so a self-chosen JWK cannot spoof a trusted producer identity.
  • Add subTest-isolated unit and boundary regressions in tests/test_signature.py.

Validation

  • pytest tests/test_signature.py tests/test_trace_verify_pkg.py -q — passed (73 passed, 1 skipped, 30 subtests passed)

@drk-ram
drk-ram requested review from a team, lywinged and rajnisht7 as code owners October 25, 2026 05:46
…across envelopes and claims (agentrust-io#157)

Signed-off-by: Raghuvar Karthik Durga <177662415+drk-ram@users.noreply.github.com>
@drk-ram
drk-ram force-pushed the drk-ram-fix-signature-157 branch from 7c2b370 to 4661e8b Compare October 29, 2026 17:14

This branch has not been deployed

No deployments
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.

fix(trace_verify/_signature): enforce canonical base64url, reject private JWK members, and use strict JSON in load_producer_key

1 participant