Permission control does not seem to be working. #4570

Closed
opened 2026-02-16 17:44:38 -05:00 by yindo · 5 comments
Owner

Originally created by @frDevByq on GitHub (Jan 9, 2026).

Originally assigned to: @rekram1-node on GitHub.

Description

I configured the system to forbid reading application.yml, but it is still being read.

  "permission": {
    "read": {
      "application.yml": "deny",
      "application-*.yml": "deny",
      "*application.yml": "deny",
      "*application-*.yml": "deny",
      "*": "allow"
    },
    "*": "allow",
    "bash": {
      "*": "allow",
      "rm *": "ask"
    },
    "edit": "allow"
  }
Image

Plugins

No response

OpenCode version

1.1.7

Steps to reproduce

No response

Screenshot and/or share link

No response

Operating System

windows

Terminal

powershell

Originally created by @frDevByq on GitHub (Jan 9, 2026). Originally assigned to: @rekram1-node on GitHub. ### Description I configured the system to forbid reading application.yml, but it is still being read. ```yml "permission": { "read": { "application.yml": "deny", "application-*.yml": "deny", "*application.yml": "deny", "*application-*.yml": "deny", "*": "allow" }, "*": "allow", "bash": { "*": "allow", "rm *": "ask" }, "edit": "allow" } ``` <img width="1069" height="361" alt="Image" src="https://github.com/user-attachments/assets/b92675a4-4cfb-483f-b39b-09527b97356f" /> ### Plugins _No response_ ### OpenCode version 1.1.7 ### Steps to reproduce _No response_ ### Screenshot and/or share link _No response_ ### Operating System windows ### Terminal powershell
yindo added the windowsbug labels 2026-02-16 17:44:38 -05:00
yindo closed this issue 2026-02-16 17:44:38 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Jan 9, 2026):

This issue might be a duplicate of existing issues. Please check:

  • #7474: Subagent permissions not enforced - configured restrictions ignored
  • #7063: Permission denied, yet command is executed regardless
  • #6892: MCP tool permissions not working after migration from tools to permissions
  • #6527: Plan mode restrictions bypassed when spawning sub-agents
  • #6020: Permission selection not respected

All of these issues indicate a systematic problem with the permission system not properly evaluating or enforcing configured deny rules. This appears to be related to a core issue with the permission configuration system.

Feel free to ignore if your specific case differs from these.

@github-actions[bot] commented on GitHub (Jan 9, 2026): This issue might be a duplicate of existing issues. Please check: - #7474: Subagent permissions not enforced - configured restrictions ignored - #7063: Permission denied, yet command is executed regardless - #6892: MCP tool permissions not working after migration from tools to permissions - #6527: Plan mode restrictions bypassed when spawning sub-agents - #6020: Permission selection not respected All of these issues indicate a systematic problem with the permission system not properly evaluating or enforcing configured deny rules. This appears to be related to a core issue with the permission configuration system. Feel free to ignore if your specific case differs from these.
Author
Owner

@pschiel commented on GitHub (Jan 11, 2026):

your order is wrong. last rule that matches gets applied - in your case the "*": "allow" overrides the previous yaml read patterns

@pschiel commented on GitHub (Jan 11, 2026): your order is wrong. last rule that matches gets applied - in your case the `"*": "allow"` overrides the previous yaml read patterns
Author
Owner

@HicaroD commented on GitHub (Jan 11, 2026):

I am having a similar issue:

  "permission": {
    "*": "allow",
    "edit": "ask"
  }

Expected behavior: everything is allowed, except for "edit". "edit" should be asked.
Actual behavior: "edit" behaves like "allowed", almost as if the second line of "permission" object is ignored.

@HicaroD commented on GitHub (Jan 11, 2026): I am having a similar issue: ```json "permission": { "*": "allow", "edit": "ask" } ``` Expected behavior: everything is allowed, except for "edit". "edit" should be asked. Actual behavior: "edit" behaves like "allowed", almost as if the second line of "permission" object is ignored.
Author
Owner

@rekram1-node commented on GitHub (Jan 11, 2026):

@HicaroD mind sharing output of:

opencode debug config

@rekram1-node commented on GitHub (Jan 11, 2026): @HicaroD mind sharing output of: opencode debug config
Author
Owner

@frDevByq commented on GitHub (Jan 11, 2026):

This configuration works, but I’m still very puzzled why a * has to be added before the matching pattern for it to work.

  "permission": {
    "read": {
      "application.yml": "deny",
      "application-*.yml": "deny",
      "*application.yml": "deny",
      "*application-*.yml": "deny"
    },
    "bash": {
      "*": "allow",
      "rm *": "ask"
    },
    "edit": "allow"
  },
@frDevByq commented on GitHub (Jan 11, 2026): This configuration works, but I’m still very puzzled why a `*` has to be added before the matching pattern for it to work. ```yml "permission": { "read": { "application.yml": "deny", "application-*.yml": "deny", "*application.yml": "deny", "*application-*.yml": "deny" }, "bash": { "*": "allow", "rm *": "ask" }, "edit": "allow" }, ```
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#4570