Skip to content

Security fixes from the whole-project review - #36

Merged
ggapp1 merged 5 commits into
mainfrom
fix/security-review-items
Oct 29, 2026
Merged

ggapp1 merged 5 commits into
mainfrom
fix/security-review-items

Conversation

@ggapp1

@ggapp1 ggapp1 commented Oct 29, 2026

Copy link
Copy Markdown
Owner

Five findings from the whole-project review's security lens. One commit each, each with a regression test that fails on main.

  • Cross-user confirmation DoS (Telegram). resolve_confirmation refused a foreign resolver only in prose, so _on_callback treated the refusal as a resolution and edited the prompt with reply_markup=None — stripping the requester's ✅/❌ off a still-pending confirmation. Needs allow_groups = true and two allow-listed users. ChatReply now carries refused; a refused tap gets an alert and the message is left untouched, mirroring what _ActionTokens.consume already does for action buttons.
  • Markdown/title/error sanitization diverged between surfaces. A markdown card can carry card-level actions, so an unstripped U+202E in its body drew on the web directly under a live button while Telegram stripped it. New UNSAFE_MARKDOWN_CHARS (the display class minus \n/\t, pinned by a full-codepoint sweep) and clean_markdown; widget titles and error strings are cleaned once in widgets.py, the producer both surfaces read.
  • MCP error text leaked URL tokens to the log. The label was redacted but the exception beside it was not, and httpx.HTTPStatusError.__str__ embeds the full URL. _redact_exception reduces every URL in exception text with the existing label redactor; applied at all five sites (mount, reconnect, stop, teardown, and the error handed to the model). The URL match runs to whitespace/quotes only, so IPv6 hosts and brackets/parentheses in a query cannot end the match early.
  • token rotate now says it does not revoke a running instance until restart, with the restart commands for the shipped deploy units; README and scaffold README say the same.
  • Telegram action-failure alert strips the display class from the exception text.

Fast suite: 1120 passed locally; ruff check and format --check clean.

@ggapp1
ggapp1 merged commit ea81484 into main Oct 29, 2026
6 checks passed
@ggapp1
ggapp1 deleted the fix/security-review-items branch October 29, 2026 12:45
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