omi icon indicating copy to clipboard operation
omi copied to clipboard

[Bounty proposal] fix(whoop-app): exception text leaks into HTTP & chat tool responses across 9 endpoints ($50 proposed)

Open Evos09 opened this issue 2 months ago • 2 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 #15476.

Symptom

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

  • /auth/whoop had unhandled storage execution that could raise unhandled 500 exceptions
  • /auth/whoop/callback reflected raw unescaped Authentication error: {str(e)} directly in HTML responses at line 1278
  • whoop_api_request returned {"error": str(e)} on network or unexpected exceptions, bubbling connection socket paths and sensitive URLs up to callers
  • 7 Chat tool endpoints (/tools/get_recovery, /tools/get_strain, /tools/get_sleep, /tools/get_workouts, /tools/get_weekly_summary, /tools/get_body_measurements, /tools/get_profile) returned raw str(e) in ChatToolResponse(error=f"Failed to get ...: {str(e)}")

Whatever internal redis 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.
  • Wrapped state retrieval, deletion, and token exchange inside a unified try-except block in whoop_callback, rendering a safe dark-themed error card.
  • Sanitized whoop_api_request to return generic {"error": "Whoop API request failed"}.
  • Added comprehensive hermetic unit tests in test_error_handling.py (10/10 passing) verifying no sensitive trace or exception text leaks into responses across all 9 endpoints/methods.
  • Registered whoop-error-handling-tests in .github/checks-manifest.yaml.

Precedent

Same failure class as the recent Slack app (#15469 / #15471), ClickUp app (#15361 / #15360), and GitHub app (#13912) exception leakage hardening.

PR: #15476


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

Evos09 avatar Sep 21 '26 14:09 Evos09

Already implemented, hermetically tested (10/10 passing), and open for review in PR #15476 by @Evos09. Registered whoop-error-handling-tests in .github/checks-manifest.yaml (53/53 checks passing). Ready for maintainer review!

Evos09 avatar Sep 21 '26 15:09 Evos09

We aren't doing bounties at the moment, so we're closing the bounty proposal issues for now. The fix already landed in #15484 — thanks for the fix! 🙏

undivisible avatar Oct 22 '26 11:10 undivisible