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
fix(tools): stop guard errors echoing the rejected value, and close the last swallow
Three fixes from the latest review round.
cubic found the whitespace guard copied the rejected value into its message.
These parameters are user-or-llm and the error returns as a tool result the
model reads, so quoting the input echoes attacker-chosen text — U+2028/U+2029
included — straight into the model's context. The parameter name is the
actionable part; the value is dropped.
The box_sign suite's head comment still said signRequestId goes through
safeUrlPathSegment. It goes through strictUrlPathSegment, and that distinction
is precisely what the whitespace pins exist for, since the plain guard trims.
Found while auditing the remaining catch sites rather than waiting for it: the
per-parameter discovery probe swallowed a throw with no assertion behind it, so
a parameter that failed on every branch dropped out of coverage while its
siblings kept the tool covered. Only the count floor would have noticed, and
that degrades as tools are added. Discovery now reports a parameter that never
produced a URL at all, distinguished from one that built fine without the
sentinel in its path, and each suite pins that set empty.
0 commit comments