You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
external_directory permission bypassed by bash wildcard rules #17497
The external_directory permission setting is bypassed when bash commands have wildcard rules like "ls*": "allow".
Expected Behavior
When external_directory: "ask" is set, accessing directories outside the working directory should prompt for approval, even for commands like ls or cat.
Actual Behavior
Bash wildcard rules like "ls*": "allow" match first and allow the command without checking if it accesses external directories.
Configuration
{
"permission": {
"bash": {
"*": "ask",
"ls*": "allow", // This bypasses external_directory check"cat*": "allow"// Same issue
},
"external_directory": "ask"
}
}
### Plugins
no plugins
### OpenCode version
1.2.26
### Steps to reproduce
1. Set external_directory: "ask" in config
2. Set "ls*": "allow" under bash permissions
3. Run ls /tmp or ls ~ - command executes without prompt
4. Expected: Should prompt because accessing external directory
### Screenshot and/or share link
_No response_
### Operating System
macOS 15.7.3
### Terminal
Apple_Terminal
Activity
github-actions commentedon Jul 7, 2026
To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.