Support client hellos fragmented across multiple TLS records #8
All Vouch review confidence checks passed
Residual risk 0.33 = Change Risk (0.62) × (1 − Review Confidence (0.47)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.62 · 242 lines diff across 3 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 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
Shallow Review Depth
shallow_review_depth
0.344
Diff Size
diff_size
0.329
Sensitive Paths
sensitive_paths
0.062
Real PR Conversation Timeline
1 comments
"Review active on #8"
general
weight: 0.35
pimterry
Fixes #7.
extractTlsHelloonly read the first0x16record, so a ClientHello that was fragmented across several handshake records (allowed by RFC 8446 section 5.1) failed withUnexpected client hello length, andtrackClientHelloslefttlsClientHelloundefined even though Node's TLS server completes the handshake normally.Changes:
extractTlsHellonow keeps reading consecutive handshake records until the full handshake message (4-byte header + the 3-byte length it declares) has arrived. It returns both the raw bytes (still unshifted back into the stream unchanged, so the real TLS session is unaffected) and the reassembled handshake data thatreadTlsClientHelloparses.CLIENT_HELLO_MAX_LENGTH. Without a cap, a client could make the parser buffer up to 16MB before Node's TLS stack sees anything. Happy to drop or change this if you'd prefer a different limit.Tests:
trackClientHellosTLS server, and checks that the handshake completes withtlsClientHellopopulated.Both new tests fail on
mainand pass with this change.npm test: 38 passing, 1 pending on Node 22.23.5 and 24.22.1. On a Node 20 build linked against system OpenSSL 3.5.7, the same 4 fingerprint-value tests fail with and without this change, because they expect the bundled-OpenSSL fingerprints.