Skip to content

Fetch method in codemode can access the host #50771

Closed

Description

@rcwalter24

Description

Fetch method in codemode can access the host. I think it should be blocked because require, process import() in sandbox are all blocked.

Plugins

none

OpenCode version

2.0.14

Steps to reproduce

  1. open a MCP server with codemode open
  2. set { "permissions": [{ "action": "read", "resource": "*", "effect": "deny" }] } in opencode.jsonc
  3. let model to run return (await (await fetch('file:///etc/hosts')).text()).slice(0, 60) in excute

Screenshot and/or share link

No response

Operating System

macos 27.0

Terminal

Mac default Terminal

Activity

  1. benceferdinandy-signifyd commented on Oct 9, 2026

    @benceferdinandy-signifyd

    yeah, codemode should really not be a bypass to read anything

  2. added 2 commits that reference this issue on Oct 10, 2026
    67855ea
    0f1a409
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions