fix(permission): default opencli web tools to allow, matching browser and edits#1330
Conversation
… and edits The opencli_read / opencli_write permission keys defaulted to "ask", so every OpenCLI web-adapter call prompted the user — on every action, and again after restart since "always" grants are not persisted. Meanwhile the browser_* tools already default to allow by deliberate design (browser design §9: the embedded browser is local and fully visible, which is the safety net), and file editing defaults to allow too. The OpenCLI adapters were the lone inconsistency. Drop the two "ask" defaults so the adapters inherit the "*": "allow" baseline, making web automation consistent with browser_* and with edits. The permission mechanism is unchanged: a user can still tighten any target via permission rules (default-open, not absent), and the per-URL re-judge safety for browser tools is untouched. Verification: opencode typecheck (tsgo) clean; targeted tests pass (permission/, permission-agent, opencli-tools, browser-tools, registry — 169 tests).
|
Warning Review limit reached
More reviews will be available in 10 minutes and 15 seconds. Learn how PR review limits work. Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file). ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
There was a problem hiding this comment.
Code Review
This pull request changes the default permissions for opencli_read and opencli_write from "ask" to "allow", allowing them to inherit the default-allow baseline for web automation. However, a security review identified an inconsistency: opencli_ tools are mapped to the "browser" permission key when checking if they are disabled, but are evaluated as "opencli_read" or "opencli_write" during execution. This discrepancy means user-configured "browser" rules will not apply to these tools, causing them to fall back to the default-allow baseline and potentially bypassing user restrictions.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
Codex review (PR #1330) noted the prior comment justified the default-allow only by the visible embedded browser, which does not cover non-browser read adapters (browser: false, access: read) that run hidden HTTP reads. Decision is unchanged — non-browser write adapters are blocked outright, and a non-browser read is read-only HTTP, no riskier than webfetch (also default-allow). Reword the rationale to cover both cases so the durable note is accurate. Comment-only; no behavior change.
Summary
Drop the
opencli_read/opencli_write"ask" permission defaults so the OpenCLI web adapters inherit the"*": "allow"baseline. Web automation now behaves the same as thebrowser_*tools and as file editing — all default-allow, no per-action prompt.Why
The OpenCLI adapters were the lone web tools defaulting to
ask, so every adapter call prompted the user — on every action, and again after each restart (the "always" grant is held only in memory and never written back to the DB). Meanwhile thebrowser_*tools already default to allow by a deliberate, documented design ruling (browser design §9: the embedded browser is local and fully visible to the user, which is the safety net), and file edits default to allow too. This change removes that one inconsistency.The permission mechanism is unchanged: a user can still tighten any target via
permission.opencli_read/permission.opencli_write/permission.browserrules (the gate is default-open, not absent), and the per-URL deny / redirect / page-move re-judge safety for the browser tools is left fully intact.Related Issue
None.
Human Review Status
Pending
Review Focus
permission.opencli_read/permission.opencli_writenow resolve toallowby default instead ofask. Confirm that policy is intended — web automation default-open, gated only by the visible embedded browser + stop button, configurable per target.ask(onlypawwork-defaults.test.tsasserted it; updated here).Risk Notes
Permissions/behavior change. OpenCLI web adapters — including write-access adapters that can act on third-party sites with the user's logged-in session — no longer prompt before running. The safety surface is now the visible embedded browser and the stop button, consistent with
browser_*. A user can re-gate viapermission.opencli_read/permission.opencli_write/permission.browserrules. No persistence, schema, migration, or platform surface was touched; this is agent-side permission policy inpackages/opencode.Skipped conditional checklist items: visible-UI item (no UI or copy changed — agent-side default only); platform item (no Electron / packaging / updater / signing / paths / OS-permission surface touched).
How To Verify
Screenshots or Recordings
None — no visible UI or copy changed (agent-side permission default only).
Checklist
bug,enhancement,task,documentation. Type labels are author-added; the labeler bot does NOT assign them. Add the label in the GitHub UI, then tick this.app,ui,platform,harness,ci. The labeler bot assigns these on PR open based on changed paths. Confirm the bot's choice (or override if wrong), then tick this.P0,P1,P2,P3. The priority-triage bot suggests one on PR open. Confirm or override, then tick this.Pending,Approved by @<reviewer>, orNot required: <reason>(default isPending; "not required" is restricted to bot-authored low-risk PRs).dev, and my PR title and commit messages use Conventional Commits in English.