anomalyco / anomalyco/opencode
bash permission escape via `--` double hyphen
Open
@rekram1-node is already working on this.
Since Jul 31, 2026.
- Dominant language
- TypeScript
- Stars
- 209k
- Forks
- 27.5k
- PR merge metrics
- PR metrics pending
Description
Description
Bash commands containing -- bypass "bash": "ask" bash permission.
Plugins
No
OpenCode version
1.18.10
Steps to reproduce
- create a new empty folder
- create
./opencode.jsonconfiguration file with the following content
{
"$schema": "https://opencode.ai/config.json",
"permission": {
"*": "ask",
"bash": "ask"
}
}
- start opencode
- ask a model to run
git diff - a "Permission required" displayed as expected
- reject it
- ask the model to run
git diff -- - the model will run it without asking permission
Screenshot and/or share link
Operating System
Windows 11
Terminal
Windows Terminal
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.