Reject invalid EC and OKP JWK key data with DataError #8770
All Vouch review confidence checks passed
Residual risk 0.14 = Change Risk (0.32) × (1 − Review Confidence (0.57)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.32 · 137 lines diff across 1 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.295
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #8770"
general
weight: 0.35
npaun
Web Crypto rejects an imported JWK whose key data is invalid with a
DataError. workerd rejected an EC JWK whosexandyare not a point on the curve, such as a shortenedxor P-521 coordinates imported as P-256, with anOperationErrorfromEC_POINT_set_affine_coordinates_GFp. An Ed25519 or X25519 JWK whosecrvnames the other curve was rejected with aNotSupportedError.In this patch these imports reject with a
DataError, as does an EC private key whosedis rejected byEC_KEY_set_private_key. Only the error type changes, and no import that succeeds today starts to fail. Code that checks the error's name seesDataErrorinstead, and we accept that without a compatibility flag because these imports already fail and the new name matches the spec. The WPT expectations forec_importKey_failures_{ECDH,ECDSA}andokp_importKey_failures_{Ed25519,X25519}shrink to the cases that still import: an EC JWK with a missing or mismatchedcrv, and an OKP private JWK whosexdoes not matchd.//src/wpt:WebCryptoAPI@passed 100 of 100 runs with--runs_per_test=100.