Skip to content

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 #7136

@janus-reith

Description

@janus-reith

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

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