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
{{ message }}
Repository navigation
code_execution: sensitive-data detection has a script-specific coverage gap #1265
Found by the cross-model review of #1264 (code_execution on by default). Pre-existing; not a regression of that PR.
Two places where secrets can pass through code_execution without reaching the sensitive-data detector, even though the same bytes through call_tool_* would be scanned:
Sub-call records truncate the detection text.upstreamToolCaller.emitSubCallActivity (internal/server/mcp_code_execution.go, subCallActivityResponseLimit = 8 KiB) emits the truncated response text and supplies no separate full detection text, so internal/runtime/activity_service.go scans only the first 8 KiB of each sub-call's response. handleCallToolVariant hands the detector the full raw response.
The parent code_execution record never invokes detection. It is emitted via handleInternalToolCall, which stores arguments/result but does not call the detector, so secrets present only in script input or in the script's generated output are never scanned.
Suggested fix: pass a full-length detectionText for sub-calls (as emitActivityToolCallCompleted already accepts) capped by the detector's own configured limit rather than the activity display limit, and run detection on the parent record's arguments/result the way the direct path does.
Activity