B93: range-check PasswordRecord.iterations when decoding #76
All Vouch review confidence checks passed
Residual risk 0.13 = Change Risk (0.29) × (1 − Review Confidence (0.54)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.29 · 36 lines diff across 4 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.216
Real PR Conversation Timeline
2 items
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.
copilot-pull-request-reviewer[bot]
Timdebruijn
Problem
A hand-edited
PasswordRecord.iterationsof 0, a negative count or one aboveUInt32.maxtrapped inRoleAuth.pbkdf2(UInt32(iterations)) at the next login orverifyof that role; a huge count in range stalled its logins.Fix
PasswordRecordgets a decoder that accepts only 1...maxIterations(10 000 000: about 16x the default 600 000 and about 1.6 s per PBKDF2 run, measured on this Mac). A record outside it throws, soMachineSettingsmarkspasswordsunreadable, the same path as any other record that does not decode (B82): logged as a field problem at start, and a running engine keeps its copy in memory when a write re-reads the file.UInt32.max + 1,maxIterations + 1.Verified
scripts/test.sh --filter RoleAuth: 13 tests passed (the new one with 4 cases).scripts/test.sh: 274 engine tests in 39 suites and 231 in 32 suites passed. The first full run had one failure inSyncReceiverTests.aSendersClockArrives(packetsIn2, expected 1) at load average ~21, which this change does not touch; the re-run was green.Note: as for any undecodable record, unreadable
passwordsat engine start means the engine starts with no role passwords (every role open, with an error in the log); this change does not alter that.