Skip to content

Permission control does not seem to be working. #7554

Closed

Description

@frDevByq

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

Activity

  1. github-actions commented on Jan 10, 2026

    @github-actions
    Contributor

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

    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.

  2. pschiel commented on Jan 11, 2026

    @pschiel
    Contributor

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

  3. HicaroD commented on Jan 11, 2026

    @HicaroD

    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.

  4. rekram1-node commented on Jan 11, 2026

    @rekram1-node
    Contributor

    @HicaroD mind sharing output of:

    opencode debug config

  5. frDevByq commented on Jan 12, 2026

    @frDevByq
    Author

    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"
      },
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 workingwindows

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions