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.
feat(registry): uninstall, update, update-check handlers + admin lifecycle #1114
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uh oh!
There was an error while loading. Please reload this page.
feat(registry): uninstall, update, update-check handlers + admin lifecycle #1114
Changes from 3 commits
2ac7e090b2fe1d7d594a68b046e3e367f5aFile filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BUG: dialog consents to route-visibility escalation the user was never shown
Category: Security / UX
Severity: HIGH
handleUpdateConfirmsetsconfirmCapabilityChanges: trueandconfirmRouteVisibilityChanges: truein the same call, regardless of which escalation the user actually saw. Combined with the server's gate ordering, this means a plugin update with both new capabilities and new public routes silently slips the public-route diff past the user.Walk the flow for a plugin where
v2adds a new capability and a new public route:handleUpdateClick->mutate({}). No confirm flags.handleRegistryUpdate(registry.ts:1424-1435) checks capability escalation first. It returnsCAPABILITY_ESCALATIONwithdetails: { capabilityChanges }-- only the capability diff, because the early return at 1434 happens beforediffRouteVisibilityis even called at 1437.parseEscalationextractscapabilityChanges,routeVisibilityChangesisundefined.newCapabilities = capabilityChanges.addedandnewlyPublicRoutes = []. User sees only the capability change.handleUpdateConfirm->mutate({ confirmCapabilityChanges: true, confirmRouteVisibilityChanges: true }).The commit message claims iterative escalation re-opens the dialog with the new diff, but iteration never actually happens because the second confirm flag is pre-set on the first user confirmation. This is the same architectural bypass the PR description called out as inherited-from-marketplace and out of scope -- registry was supposed to no longer inherit it, and the body of the fix-commit message claims as much. It still does.
Trigger: any registry update where the new manifest both declares a new capability and flips a route to
public: true. The route-exposure diff is whatROUTE_VISIBILITY_ESCALATIONexists to surface; this code path silently auto-confirms it.Fix: either (a)
handleUpdateConfirmsets only the flag for the escalation the dialog actually displayed -- e.g.confirmCapabilityChanges: truewhenregistryEscalation?.code === 'CAPABILITY_ESCALATION'-- and relies on the next server roundtrip to surface the route diff, lettingonErrorre-open the dialog (this matches the "iterative escalations re-open the dialog" promise in the commit message); or (b) the server'sCAPABILITY_ESCALATIONbranch atregistry.ts:1432eagerly computesdiffRouteVisibilityand includes it indetailsso the first dialog can show both at once. Option (a) is the smaller change and is what the existingonErrorplumbing already supports.Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.