omi icon indicating copy to clipboard operation
omi copied to clipboard

[Bounty proposal] fix(hacker-news): exception text leaks into chat tool responses across 3 endpoints ($50 proposed)

Open gewenbo888 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 hermetic tests are already submitted and verified in PR #15592.

Symptom

When network failures, timeouts, connection resets, or unexpected runtime exceptions occur in plugins/omi-hacker-news-app, the endpoints /tools/get_front_page, /tools/search_stories, and /tools/get_discussion catch httpx.HTTPError as exc and reflect {exc} verbatim into user-facing ChatToolResponse(error=...). This risks leaking internal hostnames, proxy configs, IP addresses, or underlying library details into LLM context. Unexpected runtime errors were also unhandled.

What changed

  1. Replaced unhandled/raw exception interpolation across all 3 chat tools with safe generic error responses.
  2. Preserved clean HTTP status codes ({exc.response.status_code}) while preventing internal exception leakage.
  3. Added plugins/omi-hacker-news-app/test_error_handling.py (9/9 passing under standard library python3) with simulated sensitive data and private IP injection.
  4. Updated plugins/omi-hacker-news-app/test_http.py and registered hacker-news-error-handling-tests in .github/checks-manifest.yaml. All 29 tests pass hermetically.

PR: #15592 Destination: Base / EVM (gewenbo.eth / 0x240C74A953Fc04Fe8cD713c68b53e94d9b449F8C)

gewenbo888 avatar Sep 22 '26 00:09 gewenbo888

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