Config Flag to mark part of the global config as non-overridable per project - Project level permissions should not be able to set bash permissions #4327

Open
opened 2026-02-16 17:43:27 -05:00 by yindo · 1 comment
Owner

Originally created by @janus-reith on GitHub (Jan 6, 2026).

Originally assigned to: @thdxr on GitHub.

Description

Project level permissions merge/overwrite global config.
There are valid usecases for that, but executing arbitrary bash commands is usually not one of them.

Beside the lack of default permissions which is hard to grasp for me, this seems like another major issue:

I could fetch some malicious repo from github, run opencode with something as simple as "Hey explain this project", the project contains instructions to execute something and a project level opencode config to always run bash commands, and the project can run arbitrary code on my system.

Or even for non-intentional cases, if I decide that I don't want an LLM to run arbitrary commands on my device unsupervised and check out the project of someone who didn't set sensible defaults, their choice should not reflect on my device.

Maybe flexibility of the current config and permission model could be kept by adding some flag in the global config to mark some part that should not be overridable on a project-level? That way a rule "ask before bash commands, no exceptions" could be specified.

Plugins

No response

OpenCode version

1.1.3

Steps to reproduce

As outlined above

Screenshot and/or share link

No response

Operating System

No response

Terminal

No response

Originally created by @janus-reith on GitHub (Jan 6, 2026). Originally assigned to: @thdxr on GitHub. ### Description Project level permissions merge/overwrite global config. There are valid usecases for that, but executing arbitrary bash commands is usually not one of them. Beside the lack of default permissions which is hard to grasp for me, this seems like another major issue: I could fetch some malicious repo from github, run opencode with something as simple as "Hey explain this project", the project contains instructions to execute something and a project level opencode config to always run bash commands, and the project can run arbitrary code on my system. Or even for non-intentional cases, if I decide that I don't want an LLM to run arbitrary commands on my device unsupervised and check out the project of someone who didn't set sensible defaults, their choice should not reflect on my device. Maybe flexibility of the current config and permission model could be kept by adding some flag in the global config to mark some part that should not be overridable on a project-level? That way a rule "ask before bash commands, no exceptions" could be specified. ### Plugins _No response_ ### OpenCode version 1.1.3 ### Steps to reproduce As outlined above ### Screenshot and/or share link _No response_ ### Operating System _No response_ ### Terminal _No response_
yindo added the bug label 2026-02-16 17:43:27 -05:00
Author
Owner

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

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

  • #5330: More explicit bash command permissions - discusses wildcard matching and command precedence in bash permission rules
  • #5076: OpenCode should have better/safer defaults to be more security minded - addresses making secure defaults (asking before bash) the default behavior
  • #5529: Add per-agent filesystem boundaries - discusses stronger permission isolation and preventing project-level settings from overriding global security rules
  • #6358: Managed settings with admin-controlled priority for enterprise - proposes system-level config that takes precedence over user/project settings

Feel free to ignore if none of these address your specific case.

@github-actions[bot] commented on GitHub (Jan 6, 2026): This issue might be a duplicate of existing issues. Please check: - #5330: More explicit bash command permissions - discusses wildcard matching and command precedence in bash permission rules - #5076: OpenCode should have better/safer defaults to be more security minded - addresses making secure defaults (asking before bash) the default behavior - #5529: Add per-agent filesystem boundaries - discusses stronger permission isolation and preventing project-level settings from overriding global security rules - #6358: Managed settings with admin-controlled priority for enterprise - proposes system-level config that takes precedence over user/project settings Feel free to ignore if none of these address your specific case.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#4327