omi icon indicating copy to clipboard operation
omi copied to clipboard

[Bounty proposal] fix(twitter-chat-tools): exception text leaks into HTTP & chat tool responses across 10 endpoints ($50 proposed)

Open Evos09 opened this issue 2 months ago • 1 comments

Following the contribution guide's invitation to propose paid work — @kodjima33, @josancamon19, would a US$50 bounty be appropriate for this? Proposed amount, not an existing award. Fix and tests are already up as PR #15517.

Symptom

Multiple HTTP handlers and chat tool endpoints in plugins/omi-twitter-chat-tools-app return or raise raw exception strings (str(e)) directly to client callers and the LLM context:

  • twitter_api_request returned raw {"error": str(e)} on network or unexpected exceptions, bubbling connection socket paths and sensitive URLs up to callers
  • /auth/twitter/callback reflected raw unescaped Authentication error: {str(e)} directly in HTML responses at line 1221, and had unhandled database state lookups outside the try block
  • 10 Chat tool endpoints (/tools/post_tweet, /tools/get_timeline, /tools/get_my_tweets, /tools/get_mentions, /tools/search_tweets, /tools/like_tweet, /tools/unlike_tweet, /tools/retweet, /tools/delete_tweet, /tools/get_user_profile) returned raw str(e) in ChatToolResponse(error=f"Failed to ...: {str(e)}")

Whatever internal database error, file path, socket failure, or credential trace occurred in these paths was leaked back to the HTTP client or LLM context.

Fix

  • All endpoints now log exceptions server-side while returning fixed, generic error messages to clients.
  • Sanitized twitter_api_request to return generic {"error": "Twitter API request failed"}.
  • Wrapped state verification and token exchange inside a unified try-except block in twitter_callback, rendering a safe error page.
  • Added comprehensive hermetic unit tests in test_error_handling.py (13/13 passing) verifying no sensitive trace or exception text leaks into responses across all endpoints/methods.
  • Registered twitter-chat-tools-error-handling-tests in .github/checks-manifest.yaml.

Precedent

Same failure class as Slack app (#15469 - merged), Whoop app (#15476), Google Calendar app (#15493), Dropbox app (#15497), ClickUp app (#15361 / #15360), and GitHub app (#13912) exception leakage hardening.

PR: #15517


Proposed Bounty Reward: $50.00 USD
Bounty Payout Destination (Base Mainnet / EVM): 0x7badCdA295Dd7113f374aEA1008e7d5870D48556

Evos09 avatar Sep 21 '26 17:09 Evos09

Thanks for putting this together. We aren't doing bounties at the moment, so we're closing the bounty proposal issues for now — thanks for the fix! 🙏

undivisible avatar Oct 22 '26 11:10 undivisible