fix(mcp): restrict device execution to user's own devices#1403
Conversation
📝 WalkthroughWalkthroughTool descriptions were updated to state an ownership requirement, and the device execution utility now verifies the device belongs to the current user before creating commands. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
No actionable comments were generated in the recent review. 🎉 Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Previously any authenticated user in an org could execute commands on any device in that org. Add userId ownership check in executeOnDevice() with an explicit error message when targeting another user's device.
0952109 to
1bea94a
Compare
🧹 Preview Cleanup CompleteThe following preview resources have been cleaned up:
Thank you for your contribution! 🎉 |
Summary
executeOnDevice()so users can only target their own devices, not any device in the orgstart_claude_sessionandstart_claude_subagenttool descriptions to note the ownership constraintTest plan
bun run typecheckpassesbun testpassesSummary by CodeRabbit
Bug Fixes
Documentation