You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
sign,trust-record-verify: reject private JWK members (d, p, q, dp, dq, qi, oth, k) in _pubkey_from_jwk, jwk_thumbprint, importEd25519, and jwkThumbprint #567
On main (e1560f3), while schema/trace-claim.json and models.py reject private JWK parameters on record["cnf"]["jwk"] (per GHSA-vc4p-h84j-7qxj), the core JWK primitives in both the Python SDK (src/agentrust_trace/sign.py) and the TypeScript SDK (trust-record-verify/src/crypto.ts, trust-record-verify/src/jwk.ts) accept JWK objects carrying private or symmetric key material (d, p, q, dp, dq, qi, oth, k):
sign._pubkey_from_jwk and sign.jwk_thumbprint (src/agentrust_trace/sign.py):
_pubkey_from_jwk(jwk) checks kty == "OKP", crv == "Ed25519", and x, but ignores private JWK members (d, p, q, dp, dq, qi, oth, k).
Consequently, passing an unredacted private key JWK to:
sign.jwk_thumbprint(jwk_with_d)
silently succeeds instead of failing closed.
importEd25519 and jwkThumbprint (trust-record-verify/src/crypto.ts, trust-record-verify/src/jwk.ts):
importEd25519(jwk, role) and jwkThumbprint(jwk) inspect only kty, crv, and x (or e/n / x/y), accepting JWKs that carry private parameters (d, p, q, dp, dq, qi, oth, k) on trustedKey, trustedBundleKeys, or jwkThumbprint.
sign._pubkey_from_jwk and sign.jwk_thumbprint should reject any JWK containing RFC 7517 / RFC 7518 / RFC 8037 private or symmetric key parameters (d, p, q, dp, dq, qi, oth, k) with ValueError, naming only the parameter key(s) and never echoing the secret value.
trust-record-verifyimportEd25519 and jwkThumbprint should likewise reject any JWK with own properties in {"d", "p", "q", "dp", "dq", "qi", "oth", "k"} (malformed for importEd25519, jwk_invalid for jwkThumbprint), naming only the parameter key(s).
Impact
Prevents unredacted private key JWKs from being accepted as verification keys or thumbprinted across sign.verify_record, revocation.check_bundle, intent_bridge.verify_bridge, intent_bridge.verify_successor_artifact, and trust-record-verify.
Activity
sign,trust-record-verify: reject private JWK members in thumbprint an…