fix(observe): close secret-redaction leaks + non-blocking Tau observe (#253)#254
Conversation
…cking (#253) Second adversarial review of #252 found two BLOCKING issues (confirmed empirically) that shipped in #251: 1. Secret leak: the inline key=value pattern required a leading \b, so the most common shapes leaked into events.jsonl — DB_PASSWORD=, API_TOKEN=, AWS_SECRET_ACCESS_KEY=, and space-separated Bearer/Authorization tokens. Reworked the patterns (keyword as a substring of the key token; dedicated bearer/authorization matcher). Redaction still runs before truncation. 2. Tau observe awaited the subprocess inside the tool_call/tool_result hooks, so a slow write could add latency to every Tau tool call. Now fire-and-forget (asyncio background task, referenced so it isn't GC'd) with a 5s hard timeout. Also: cap observe stdin at 1MB (DoS hardening). +2 tests covering every leak shape and the no-over-redaction guarantee. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Qodo reviews are paused for this user.Troubleshooting steps vary by plan Learn more → On a Teams plan? Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center? |
|
Warning Review limit reached
Next review available in: 50 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Closes #253. Fast follow-up to #252 — a SECOND adversarial review found two BLOCKING issues that the first review missed and that shipped in #251. Both confirmed empirically before fixing.
Fixed
key=valueredaction required a leading\b, so the most common secret shapes leaked intoevents.jsonl:export DB_PASSWORD=hunter2,export API_TOKEN=abc123(keyword preceded by_→ no word boundary)AWS_SECRET_ACCESS_KEY=...(same),Authorization: Bearer <token>(space-separated, no[:=])Reworked to match the secret keyword as a substring of the key token + a dedicated bearer/authorization matcher. Redaction still runs before truncation. Verified: all 6 leak shapes redacted, zero over-redaction of ordinary prose ("authenticate the user", "token bucket", "reset password by email" untouched).
await _emit_observation(...)awaited the subprocess inside thetool_call/tool_resulthooks; a slow/contended write added latency to every Tau tool call. Now fire-and-forget (asynciobackground task, referenced so it can't be GC'd mid-flight) with a 5s hard timeout — fully off the tool-call critical path. Guard stays awaited (it's the gate).observenow caps stdin at 1MB so an accidental huge pipe can't grow memory.Tests (+2, 850 total)
Every leak shape asserted redacted + the specific secret string asserted absent; a no-over-redaction test for normal prose.
Gates: typecheck, 850/850 tests, lint, validate (196), security-audit, diff-check, Tau AST — all green.
Process note
I merged #252 on the first adversarial review's "no blockers" verdict before the second, deeper review completed — that was too eager. The second review caught real leaks. Going forward: wait for all in-flight reviews on a session-embedded / secret-handling PR before merging.
🤖 Generated with Claude Code