Skip to content

cmcp_verify.nv_certify / nv_policy: verify_gateway_measurement accepts duplicate JSON keys, boolean/float version, non-base64 chars, and non-canonical gateway_digest hex #810

Open

Description

@drk-ram

Summary

  1. verify_gateway_measurement in src/cmcp_verify/nv_certify.py parses envelope with bare json.loads(envelope) (accepting duplicate JSON keys and NaN/Infinity), checks int(payload.get("v", 0)) != ENVELOPE_VERSION (accepting "v": true, "v": 1.9, and "v": "1"), decodes pre_attest/pre_signature/post_attest/post_signature with base64.b64decode(...) without validate=True or isinstance(..., str) (silently stripping non-base64 characters), and decodes gateway_digest via bytes.fromhex(...) without requiring canonical 64-char lowercase hex.
  2. measurement_nv_public_bytes in src/cmcp_verify/nv_policy.py does not validate type(index) is int or isinstance(written, bool).

Activity

  1. github-actions commented on Oct 25, 2026

    @github-actions
    Contributor

    🟡 Contributor Check: MEDIUM

    Check Result
    Profile MEDIUM
    Credential LOW
    Overall MEDIUM

    Automated check by AgenTrust Contributor Check.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions