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
Found in the #594 security audit. Severity: medium. Status: confirmed (failing test).
Affected code
crates/tole-core/src/turn.rs:1004 and :1029: o.tool_finished(&tool, ok, &short_preview(&out)); short_preview (turn.rs:502) is the first 200 chars of the RAW tool output or error, before any redaction. tool_started(&tool, &input) (turn.rs:992) is also raw.
Forwarded as is by crates/tole-cli/src/events.rs:245 (serve SSE tool_finished frame, GET /sessions/{id}/events), crates/tole-cli/src/acp.rs:460 (tool_call_update to the editor) and crates/tole-tui/src/lib.rs:388.
Problem
#596 redacts the entry at commit, so the durable SSE entry frames are clean, but the ephemeral frames of the same tool call carry the raw value. tole serve is the remote/mobile surface (plain HTTP, --bind for other networks), so this is text leaving the process unredacted, contrary to "every egress sink redacts".
Scenario
A remote client follows a session over /events. The agent runs cat config/app.yml (or gh auth status -t, or reads a file holding the provider key); the tool_finished preview ships the secret to the client and to any proxy/log in between, while the log shows «NAME».
Reproduction
Scratch test crates/tole-core/tests/audit_594.rs::the_tool_finished_preview_is_redacted: a ReadOnly tool returns GITHUB_TOKEN=<value>, storage redacts with a set holding it. The log file has no value; the observer preview is {"stdout":"GITHUB_TOKEN=<value>"} (assertion fails).
Suggested fix
Redact in turn.rs before calling the observer (preview of secrets.redact_value(&out), input via redact_value), using the same set the storage uses (process_secrets() or the storage's set), so every observer gets the redacted form. Redact before the 200-char cut so a cap cannot leave a partial value. Test at the observer boundary.
Activity