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
Currently, restricting access to sensitive directories requires denying specific commands (e.g., ls /sensitive/path, cat /sensitive/path) for every tool and path, which is extremely verbose and error-prone. This leads to incomplete coverage and security gaps.
Proposal
Introduce a new config option like "exclude_patterns": ["**/.env*", "**/.ssh/**", "**/journal/**"] that applies globally across all tools, preventing access to matching paths without needing per-command denials.
Benefits
Simplifies security configuration
Reduces verbosity in opencode.json
Prevents accidental exposure of sensitive files
Avoids need for containerization or over-reliance on system prompts for security
This issue might be a duplicate of existing issues. Please check:
Exclude files from being used #3164: Similar request for excluding files from being used, asking about regex patterns to prevent access to passwords and secret files
Activity
github-actions commentedon Oct 30, 2025
This issue might be a duplicate of existing issues. Please check:
exectool as more secure alternative to bash tool #2206: Related security enhancement proposing an exec tool as more secure alternative to bash tool, addressing similar security concerns about file access controlsFeel free to ignore if none of these address your specific case.