Description
If the agent assigns the path of any disallowed pattern (i.e., a file) to a shell variable, it can access its contents by referencing the variable...
This bug seems to imply that the assignment operator (=) is somehow responsible.
The opencode.json file in use can by seen below...
{
"$schema": "https://opencode.ai/config.json",
"permission": {
"bash": {
"*.env*": "deny",
"*artisan*": "deny"
},
"read": {
"*.env*": "deny"
},
"edit": {
"*.env*": "deny"
},
"grep": {
"*.env*": "deny"
}
}
}
Plugins
n/a
OpenCode version
1.14.39
Steps to reproduce
- Make sure to use the aforementioned permissions.
- Have the agent execute the following bash command:
f=./.env && cat "$f"
Screenshot and/or share link
No response
Operating System
Arch Linux
Terminal
Kitty
Description
If the agent assigns the path of any disallowed pattern (i.e., a file) to a shell variable, it can access its contents by referencing the variable...
This bug seems to imply that the assignment operator (
=) is somehow responsible.The opencode.json file in use can by seen below...
{ "$schema": "https://opencode.ai/config.json", "permission": { "bash": { "*.env*": "deny", "*artisan*": "deny" }, "read": { "*.env*": "deny" }, "edit": { "*.env*": "deny" }, "grep": { "*.env*": "deny" } } }Plugins
n/a
OpenCode version
1.14.39
Steps to reproduce
f=./.env && cat "$f"Screenshot and/or share link
No response
Operating System
Arch Linux
Terminal
Kitty