Repository navigation
feat(permission): auto-approve web search and fetch in edit mode - #1412
Conversation
|
No changes needed from you. A maintainer will review this pull request. |
TheGreatAxios
left a comment
There was a problem hiding this comment.
Review · Comment
Adds web_fetch and web_search to the unconditional read-allow set and retargets ask-tier denial tests onto write_file. Per-URL and per-query buildRequests branches are unchanged.
Findings
No findings. bun test src/agent/tool-classification.test.ts src/permission/permission.test.ts src/exec/runner.test.ts src/permission/denial-memory.test.ts — 251 pass, 0 fail.
TheGreatAxios
left a comment
There was a problem hiding this comment.
Review · Request changes
Puts web_fetch and web_search on the unconditional read-allow tier. That is not how network egress was classified, and it is not limited to auto/edit mode. Native SSRF checks still run after the gate.
Findings
src/agent/tool-classification.ts:45—AUTO_ALLOW_READ_TOOLSnow keepsweb_fetchandweb_search.classifyToolreturns allow with no mode check, anddecidereturns allow beforeauto, beforebuildRequests, and before any prompt (src/permission/gate.ts:759). A headless gate withautounset allowsweb_fetchof an external URL andweb_searchof a query that may carry workspace text. On main, that headlessweb_fetchwas denied.run_shellcurl -dstill asks in every mode vianetwork-upload.--no-autoonly restores ask-on-write, so it does not gate these tools. The tests atsrc/permission/permission.test.ts:625lock in the wider allow. Per-URL grant keying is now dead for these tools because the short-circuit always wins, which also makes the comment atsrc/agent/tool-classification.ts:39(a future restriction still scopes grants) untrue.
Suggest gating the allow on edit/auto mode, or keeping these tools on the ask path outside that mode, and adding a regression that fails if headless or auto: false allows them while curl -d still asks.
Summary
Verification
bun test src/agent/tool-classification.test.ts src/permission/permission.test.ts src/exec/runner.test.tspasses (243 pass, 0 fail)bunx tsc --noEmitpassesCloses CL-10556
https://linear.app/abklabs/issue/CL-10556/auto-approve-web-search-and-web-fetch-in-edit-mode