fix(security): make tool argument limits configurable #276
All Vouch review confidence checks passed
Residual risk 0.24 = Change Risk (0.60) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.60 · 236 lines diff across 2 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.327
Shallow Review Depth
shallow_review_depth
0.289
Sensitive Paths
sensitive_paths
0.060
Real PR Conversation Timeline
1 comments
"Review active on #276"
general
weight: 0.35
rozzilla
Problem
sanitizeToolParamsapplied hard-coded limits to every tool's arguments:Object.keys, so an array with more than 100 items was refused with "Object has too many properties (101 > 100)";Fix
maxArrayLengthlimit, unlimited by default.toolArgumentLimits: { maxStringLength, maxObjectProperties, maxArrayLength, maxDepth }, passed through tosanitizeToolParams.Infinitydisables a limit. TheToolArgumentLimitstype is exported.Tests (
test/tool-argument-limits.test.ts): a 101-item array is accepted by default; the default string and property limits still apply; raisedmaxStringLengthaccepts 10001 characters; raisedmaxObjectPropertiesaccepts more keys; lowered string, property, array and depth limits refuse arguments before the handler runs; strings inside objects and nested arrays within arrays are length-checked and stripped of control characters.Breaking change
None. Under the defaults, arrays with more than 100 items are now accepted, and strings nested in objects or arrays inside arrays are now sanitized (an over-long one is refused, as it already was outside arrays).
Fixes #256
🤖 Generated with Claude Code
https://claude.ai/code/session_01UF4S3w7iA83V9DVsasLJzM