fix: Require any interface permission to use RPC methods#3864
Merged
FrederikBolding merged 3 commits intomainfrom Feb 20, 2026
Merged
fix: Require any interface permission to use RPC methods#3864FrederikBolding merged 3 commits intomainfrom
FrederikBolding merged 3 commits intomainfrom
Conversation
FrederikBolding
commented
Feb 19, 2026
Mrtenz
approved these changes
Feb 19, 2026
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3864 +/- ##
=======================================
Coverage 98.58% 98.58%
=======================================
Files 428 428
Lines 12372 12389 +17
Branches 1922 1927 +5
=======================================
+ Hits 12197 12214 +17
Misses 175 175 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Require Snaps to have at least one of the permissions required to display UI before allowing use of RPC methods.
https://consensyssoftware.atlassian.net/browse/WPC-500
Note
Medium Risk
Changes authorization behavior for multiple RPC entrypoints; risk is mainly compatibility/behavioral (previously-allowed calls now fail) and depends on correct
hasPermissionwiring and theUI_PERMISSIONSlist.Overview
Interface-management RPC methods now require the caller Snap to have at least one UI-capability permission before executing:
snap_createInterface,snap_updateInterface,snap_getInterfaceState,snap_getInterfaceContext, andsnap_resolveInterfaceshort-circuit withproviderErrors.unauthorizedwhenUI_PERMISSIONSchecks fail.This introduces a shared
UI_PERMISSIONSconstant inutils.ts, wires a newhasPermissionhook into each handler, and updates/expands Jest coverage to assert the unauthorized error behavior (plus minor coverage threshold adjustments).Written by Cursor Bugbot for commit ebc981a. This will update automatically on new commits. Configure here.