Skip to content

[BUG] opencode's folder permission control is not working #11272

Description

@mask-maker

Description

The permission control for folders in opencode is not working. I set up opencode.json in the project root directory like this:

{
  "$schema": "https://opencode.ai/config.json",
  "permission": {
    "edit": "ask",
    "bash": {
      "*": "ask",
      "env *": "deny",
      "env": "deny",
      "printenv *": "deny",
      "printenv": "deny",
      "export *": "deny",
      "echo *": "deny",
      "set *": "deny"
    },
    "read": {
      "*": "allow",
      "*.log": "deny",
      "APP-META/**": "deny",
      "logs/**": "deny",
      "app/config/**": "deny",
      "*.env": "deny",
      "*.env.*": "deny",
      ".env": "deny",
      ".env.*": "deny",
      "*.env.local": "deny",
      "*.env.example": "allow"
    }
  }
}

However, opencode can still directly read the contents of the APP-META folder.

Plugins

No response

OpenCode version

1.1.44

Steps to reproduce

No response

Screenshot and/or share link

Image

Operating System

macOS 26.2

Terminal

No response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions