Skip to content

fix(logging): redact Telegram tokens across chunk boundaries#103861

Merged
vincentkoc merged 1 commit into
mainfrom
fix/telegram-token-redaction-boundary
Jul 10, 2026
Merged

fix(logging): redact Telegram tokens across chunk boundaries#103861
vincentkoc merged 1 commit into
mainfrom
fix/telegram-token-redaction-boundary

Conversation

@vincentkoc

Copy link
Copy Markdown
Member

What Problem This Solves

Fixes an issue where Telegram bot credentials could remain visible in large log or tool-error strings when the credential crossed the 16,384-character bounded-redaction split.

Why This Change Was Made

The shared redactor now treats the two built-in Telegram credential patterns as full-context patterns. Those two linear regexes run against the complete string, while every other default pattern keeps the existing bounded-replacement behavior.

A focused regression covers both the Bot API URL form and the bare credential form with synthetic inputs larger than 32 KiB.

User Impact

Telegram operators no longer risk exposing a bot credential solely because it straddled an internal redaction chunk boundary. Normal redaction output and the performance behavior of unrelated credential patterns are unchanged.

Evidence

  • Current main reproduction at 5aea34ad8c210ddba5a678d64c559da8414baea7:
    • 49 KiB synthetic Bot API form: raw credential remained unchanged.
    • 49 KiB synthetic bare form: raw credential remained unchanged.
  • Patched direct probe:
    • Bot API form: leaked=false, output changed.
    • Bare form: leaked=false, output changed.
  • Blacksmith Testbox tbx_01kx6h7my69dczc9yrfej5gabs:
    • corepack pnpm test:serial src/logging/redact.test.ts: 118/118 passed.
    • corepack pnpm check:changed: both tsgo lanes, core lint, and selected guards passed.
  • git diff --check passed.
  • Fresh structured autoreview: no accepted/actionable findings; correctness 0.86.

@vincentkoc vincentkoc self-assigned this Jul 10, 2026
@vincentkoc
vincentkoc marked this pull request as ready for review July 10, 2026 17:35
@openclaw-barnacle openclaw-barnacle Bot added size: XS maintainer Maintainer-authored PR labels Jul 10, 2026
@vincentkoc
vincentkoc requested a review from a team as a code owner July 10, 2026 17:45
@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation app: web-ui App: web-ui agents Agent runtime and tooling extensions: chutes size: XL scripts Repository scripts docker Docker and sandbox tooling gateway Gateway runtime cli CLI command changes plugin: file-transfer and removed size: XS labels Jul 10, 2026
@clawsweeper

clawsweeper Bot commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Codex review: stale review; fresh review needed.

Summary
The latest durable ClawSweeper review was for head 950686afb02413154bed48736c3fe6e33427e896, but the PR head is now 98f364e99ae2c335865c615109e089ab7b1b4816. Its old verdict and PR readiness labels are no longer current.

Next step
Run or wait for a fresh ClawSweeper review on the current PR head.

@vincentkoc
vincentkoc force-pushed the fix/telegram-token-redaction-boundary branch from e3abbc0 to 1e9a265 Compare July 10, 2026 18:18
@openclaw-barnacle openclaw-barnacle Bot added size: XS and removed docs Improvements or additions to documentation app: web-ui App: web-ui gateway Gateway runtime cli CLI command changes scripts Repository scripts docker Docker and sandbox tooling agents Agent runtime and tooling plugin: file-transfer extensions: chutes size: XL labels Jul 10, 2026
@vincentkoc
vincentkoc merged commit b56bad3 into main Jul 10, 2026
93 of 119 checks passed
@vincentkoc
vincentkoc deleted the fix/telegram-token-redaction-boundary branch July 10, 2026 18:20
@vincentkoc

Copy link
Copy Markdown
Member Author

Merged via squash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintainer Maintainer-authored PR size: XS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant