You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit c4e4f16
Browse filesBrowse the repository at this point in the historyBrowse files
Instinct Agent
committed
fix(core): mediate CodeMode fetch through the webfetch permission action
CodeMode executions previously called global fetch directly, bypassing
permission rules. The execute tool now provides a per-execution guard
built from the calling session permission service: interactive approval
for the initial URL and a non-interactive check per redirect hop
(manual following, 10-hop cap). Executions without a guard fail closed.
The registry captures the permission service at layer construction like
plugin tools do, and docs/openhands-integration.md records the state.
Copy file name to clipboardExpand all lines: docs/openhands-integration.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -98,7 +98,7 @@ Full caller ordering was inspected, not just permission call names:
98
98
| Schedules | Registry/CodeMode forwards to schedule leaf. Mutation leaf now asserts create/pause/resume/delete after enabled/ownership checks, before service mutation | Focused direct+CodeMode deny/pending/cancel regression tested. Real scheduler recovery/background execution and authenticated UI still need acceptance |
99
99
| Session rename/move and worktree create | Local follow-up adds leaf Permission.assert before host effects, with caller session and exact operation input | Focused real-registry/CodeMode deny regressions pass; baseline fails without checks. Permission is not filesystem containment or cross-session authorization |
100
100
| Browser | Catalog visibility uses `browser` permission; execution selects desktop connection/tab and sends RPC | Visibility is not execution approval. Final per-action/URL review layer not established by this work; do not activate |
101
-
| CodeMode fetch |CodeModeWeb calls global fetch with timeout; registry catalog filtering is not per-request authorization | Strict marker is not universal egress control. Must disable or mediate before guarded connection activation|
101
+
| CodeMode fetch |Local follow-up mediates CodeModeWeb fetch per request through the webfetch permission action: interactive approval for the initial URL, non-interactive check per redirect hop (manual following, 10-hop cap); executions without a guard fail closed | Unit tests cover deny-before-egress, per-hop checks, fail-closed default, and a real-registry deny through the execute tool. Authenticated UI prompt flow, DNS/IP pinning and response size limits beyond the 30s timeout remain open|
102
102
| Main LLM/title/compaction/plugin hooks | Model request preparation and plugin hooks have their own effect paths | Tool approval is not spending permission. No real provider was called; provider choice/budget and plugin trust require separate verified controls |
103
103
104
104
A default-deny launch profile is not offered until these caller paths, authenticated UI presence/disconnect, cancellation/recovery, workspace binding and the actual pinned Canvas/SDK workflow are tested together. No new generic registry authorization was added: the repository's tool architecture leaves resolution and side-effect ordering with leaves. Root marker lifecycle is not yet immutable, although an already-pending guarded request remains one-time even if metadata changes before its reply.
Copy file name to clipboardExpand all lines: packages/core/src/codemode/tool.ts
+10-1Lines changed: 10 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -77,9 +77,13 @@ const description = [
77
77
"Await every call whose completion matters; pending calls are interrupted when execution ends. Run independent calls concurrently with `Promise.allSettled`.",
78
78
].join("\n")
79
79
80
+
constunavailable=()=>
81
+
Effect.fail(newglobalThis.Error("fetch is unavailable: no permission guard for this execution"))
returnyield*Effect.fail(newError("Redirect target must use http:// or https://"))
64
+
yield*(yield*Guard).check(target.href)
65
+
// 301/302/303 downgrade to GET without a body; 307/308 preserve method and body.
0 commit comments