-
Notifications
You must be signed in to change notification settings - Fork 5
Description
Thank you for this great project!
Currently, cage allows read access to all paths by default, but there is no way to explicitly restrict read access to specific paths.
I would like to request explicit read deny option support.
Motivation
Within cage's sandbox, all files are readable by default. When using tools like Claude Code, users may want to prevent access to sensitive files such as .env, private keys, or credential files.
Proposed Changes
New flag
-deny <path> Deny all access to specific paths (can be used multiple times)
Config file support
presets:
my-preset:
deny:
- $HOME/.ssh
- $HOME/.envPlatform implementation
macOS
Add deny rules to the sandbox profile using deny file-read* directive to restrict read access to denied paths.
Linux
The current Landlock-based implementation is whitelist-only, which makes it difficult to implement the deny option as-is. Implementing this feature may require switching the sandbox runtime to an alternative such as bubblewrap.