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
E11: Secret redaction — scrub secrets from transcript before provider calls #23
Redact secrets (env values matching secret-looking patterns, API keys, tokens) from the transcript before it is sent to any provider, so leaked secrets never leave the host.
Why
Adopted from oh-my-pi's SecretObfuscator + obfuscateToolArguments pattern (see research notes). Tole sends the full durable transcript to providers on every step (drive(): s.entries().to_vec()). As soon as tools can read environment or files (E7 file read, gh CLI), tool results can carry secrets into the transcript, and every subsequent provider call re-sends them. Cheap, deterministic, security-relevant.
Design sketch
New module tole-core/src/redact.rs: pattern list (AWS key, GitHub token, generic sk-, high-entropy base64/hex strings ≥ some length), replace with [REDACTED:<kind>]
Pure function over entries → entries, applied in drive() before p.complete()
No new deps — regex-free where possible (prefix/charset scan), entropy check where needed
Tier A tests with synthetic secrets
Acceptance criteria
Known token shapes (ghp_, github_pat_, AKIA, sk-, xoxb-) redacted
Long high-entropy strings (≥32 chars, mixed-case alnum) redacted
Normal prose and code identifiers untouched
Redaction applied on every provider call path (run + resume)
both run_turn and resume_turn drive paths
Unit tests over entry payloads (user text, tool results, errors)
Activity
fix: cora full-scan majors — torn header, incumbent escapes, redactio…
fix: scan-3 regressions — mcp global flags, chat flag scope, hook env…
fix: scan-3 security/spec surfaces — hook env scrub, cora_search dash…
fix: scan-3 security/spec surfaces — hook env scrub, cora_search dash…