Skip to content

fix(tui): redact Telegram bot tokens in doctor reports#682

Open
9s5bz2jvd2-lang wants to merge 3 commits into
Lingtai-AI:mainfrom
9s5bz2jvd2-lang:luna/doctor-telegram-token-redaction
Open

fix(tui): redact Telegram bot tokens in doctor reports#682
9s5bz2jvd2-lang wants to merge 3 commits into
Lingtai-AI:mainfrom
9s5bz2jvd2-lang:luna/doctor-telegram-token-redaction

Conversation

@9s5bz2jvd2-lang

@9s5bz2jvd2-lang 9s5bz2jvd2-lang commented Jul 18, 2026

Copy link
Copy Markdown
Contributor

Summary

  • redact high-confidence Telegram bot-token shapes before TUI doctor-report artifacts are saved
  • record the new redaction rule in redaction.json
  • cover all three saved artifacts, adjacent tokens, the redaction marker, near misses, and existing behavior
  • explicitly cover 13–16 digit near misses plus tokens at string start, after a quote, and after a newline

The rule is intentionally conservative: 6–12 decimal digits, a colon, and at least 30 ASCII characters from [A-Za-z0-9_-]. It matches the existing LingTai kernel trajectory-redaction heuristic; it is a high-confidence redaction boundary, not a claim that 12 digits is Telegram's protocol maximum. The 13–16 digit cases are therefore locked as preserved near misses.

Validation

  • go test ./internal/doctorreport -count=1
  • go test ./internal/tui -count=1
  • go test ./... -count=1
  • go vet ./...
  • git diff --check

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant