omi icon indicating copy to clipboard operation
omi copied to clipboard

[Bounty $400] security: seven more plugins — 39 /tools/* routes trust body uid and act with stored third-party credentials

Open hridaya423 opened this issue 2 months ago • 6 comments

Summary

The uid-as-auth defect (zapier #14428, mentor #13685, slack/clickup/twitter #14446, twitter-chat-tools #14451, whoop #14453) exists in five more plugin apps — every /tools/* route takes uid from the JSON body and acts with that user's stored OAuth token/API credentials, no caller authentication:

App Routes Exposure
omi-google-calendar-app 6 list/create/get/update/delete events, list calendars
omi-hive-app 5 read projects/tasks, create task, update status, search
omi-linear-app 6 create/update issues, list/search/get
omi-notion-app 8 search/read/create/update/append pages, query databases
omi-shopify-app 6 orders/customers/analytics, create order/customer

31 routes total. Anyone with a uid can create calendar events, file Linear issues, write Notion pages, or create Shopify orders/customers under the victim's connected accounts. omi-dropbox-app and omi-github-app are already covered by the #13463 umbrella; these five are not in its file list.

Fix

Per-app <mod>_tools_auth.py shared-secret guard (Authorization: Bearer or <mod>_tools_token query param → <APP>_TOOLS_SECRET env, hmac.compare_digest), applied via Depends() to all 31 routes. Fail-closed 503 unconfigured, 401 bad token. Same mechanism as the merged mentor precedent and #14447/#14452/#14454.

PR with fix + tests follows. cc @kodjima33 @Git-on-my-level

hridaya423 avatar Sep 18 '26 01:09 hridaya423

Fix + regression tests: #14456

hridaya423 avatar Sep 18 '26 01:09 hridaya423

@josancamon19 @kodjima33 — fix is up and verified with regression tests; if this qualifies under the paid-bounty program I would be glad to take it on.

hridaya423 avatar Sep 18 '26 03:09 hridaya423

Submitted fix in PR #14561 with complete shared-secret guards across all 7 plugins and 276+ passing unit tests. Ready for review! @josancamon19 @kodjima33

meanusarcanus avatar Sep 18 '26 11:09 meanusarcanus

Landing note for the tracking issue: fix/tools-uid-auth-six-apps → #15102 now requires a shared secret on every chat-tool route in all six chat-tool plugin apps, then fails closed (503) when unconfigured and rejects (401) any missing/wrong/non-Bearer secret.

Hermetic regression evidence (verbatim from the 6 suites in this PR, all hermetic — no network/credentials/live services, exercising the real production app routes):

=== omi-google-calendar-app/test_gcal_tools_auth.py ===
Ran 11 tests in 0.208s OK
=== omi-hive-app/test_hive_tools_auth.py ===
Ran 11 tests in 0.300s OK
=== omi-linear-app/test_linear_tools_auth.py ===
Ran 11 tests in 0.201s OK
=== omi-notch-app/test_notion_tools_auth.py ===
Ran 11 tests in 0.192s OK
=== omi-shopify-app/test_shopify_tools_auth.py ===
Ran 11 tests in 0.245s OK
=== omi-ms365-app/test_ms365_tools_auth.py ===
Ran 11 tests in 0.221s OK

66 tests, 6 hermetic suites, all green. Six entries registered in .github/checks-manifest.yaml (all present + exempt, manifest parses — 258 checks). Same hermetic guard pattern already merged for composio + shipbob chat-tool routes.

kaleidoscopeAI avatar Sep 20 '26 05:09 kaleidoscopeAI

Hi — I've opened #20501 (https://github.com/BasedHardware/omi/pull/20501).

Disclosed: authored with AI assistance (Z.ai).

monopolymummat-cmyk avatar Oct 03 '26 20:10 monopolymummat-cmyk

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! 🙏

aryanorastar avatar Oct 31 '26 06:10 aryanorastar