File: internal/permission/mode.go
Lines: 100-108
Severity: High
Problem
browser and mobile_device are listed in IsReadOnlyTool() (line 102). But browser can execute arbitrary JavaScript (action="evaluate"), click, type, upload files. mobile_device can tap, type, install/uninstall apps. These are state-mutating operations. In Plan mode (config_policy.go:156-159), IsReadOnlyTool returns true → auto-allowed without confirmation. Plan mode's read-only guarantee is violated.
Trigger Scenario
- Agent is in Plan mode (supposed to be strictly read-only)
- Agent calls
browser(action="evaluate", expression="document.title='hacked'")
IsReadOnlyTool("browser") returns true → Plan mode returns Allow
- JavaScript executes — state modified in Plan mode
Expected vs Actual
- Expected: browser and mobile_device require confirmation in Plan mode (not read-only)
- Actual: Both auto-allowed in Plan mode — read-only guarantee violated
Fix
Remove browser and mobile_device from the IsReadOnlyTool() read-only list.
File:
internal/permission/mode.goLines: 100-108
Severity: High
Problem
browserandmobile_deviceare listed inIsReadOnlyTool()(line 102). But browser can execute arbitrary JavaScript (action="evaluate"), click, type, upload files. mobile_device can tap, type, install/uninstall apps. These are state-mutating operations. In Plan mode (config_policy.go:156-159),IsReadOnlyToolreturns true → auto-allowed without confirmation. Plan mode's read-only guarantee is violated.Trigger Scenario
browser(action="evaluate", expression="document.title='hacked'")IsReadOnlyTool("browser")returns true → Plan mode returnsAllowExpected vs Actual
Fix
Remove
browserandmobile_devicefrom theIsReadOnlyTool()read-only list.