Repository navigation
fix(mothership): require approval before browser tools act on a page - #9581
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
[Medium impact] The PR appears safe to merge; no actionable new issues were found. SummaryBrowser actions now require approval when tool permissions are enabled. Browser reads remain ungated.
No actionable new issues were found. The previous-review merge bases differed, so the full PR was reviewed. No previous findings were supplied.
|
Browser tools that act on a page (navigate, click, type, submit, upload, ...) run as the user in a browser carrying their signed-in sessions, but the approval gate read only the catalog flag, which no browser tool declares, so none of them ever prompted. toolRequiresApproval now gates every browser tool that BROWSER_TOOL_OBSERVES_ONLY does not mark observe-only, so a browser tool added later is gated by default, and both the dispatch gate and the in-band lane read the same answer. "Don't ask again" answers for browser tools are stored under one shared key, so a single answer covers the browser instead of one prompt per kind of action.
waleedlatif1
force-pushed
the
fix/browser-tool-approval-gate
branch
from
November 2, 2026 20:54
21ce1f1 to
6c6c83c
Compare
Collaborator
Author
Collaborator
Author
|
@cubic-dev-ai review this PR |
Contributor
@waleedlatif1 I have started the AI code review. It will take a few minutes to complete. |
This branch was previously deployed
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.
Summary
requiresApprovalflag, which nobrowser_*tool declares, so browser actions that act on a page (navigate, click, type, fill and submit forms, upload files) ran as the user in their signed-in browser without an approval card, even with tool permissions enabledtoolRequiresApprovalnow gates every browser tool thatBROWSER_TOOL_OBSERVES_ONLYdoes not mark observe-only; reads (snapshot, read_text, screenshot, find, list_*, wait_for) stay ungated, the same act/observe split the terminal gate makes betweenrunandreadbrowser_*), so one answer covers the browser instead of one prompt per kind of action; the card's menu says "Browser actions in this chat" / "in every chat" for browser toolsCOPILOT_TOOL_PERMISSIONS_ENABLEDis off: the gate returns before reading any of thisType of Change
Testing
desktop-tool-authorization.integration.ts(real Postgres + Redis, production pre-persist, authorize, and tool-permission routes): new browser cases; the gating case fails on the pre-fix code (desktop claimsbrowser_clickwith no approval) and passes after; 16/16 passing locallypermission.test.ts: new allow-for-this-chat case fails when the shared key is neutralized, passes afterhandlers,permission,router,run, tool-permission route, and tools/execute route suites: 256/256 passingbun run lintclean;check:file-names,check:test-patterns,check:boundaries,check:source-conventions,check:comment-hygiene,check:explicit-any,check:utilspassingChecklist
test-auditauthoring gate)