Cascade evaluates .envrc files as bash scripts, which can execute arbitrary code. To prevent unauthorized code execution, Cascade implements a three-tier authorization model:
| Tier | Scope | Persistence | Use Case |
|---|---|---|---|
| Allow | Single file by content hash | Re-approval required if file changes | Default for most .envrc files |
| Deny | Single file by path | Blocks file regardless of content | Permanently block untrusted files |
| Trust | Entire directory subtree | All .envrc files auto-allowed |
Trusted vendor directories, personal projects |
When checking authorization: Deny > Allow > Trust > Whitelist > Not Allowed
A denied file is never evaluated, even if it's in a trusted subtree.
Authorization data is stored as plaintext files in ~/.local/share/cascade/:
~/.local/share/cascade/
├── allow/ # SHA256(content) → path mapping
├── deny/ # SHA256(path) → path mapping
└── trust/ # SHA256(dir) → directory path
These files are readable by the user only. No secrets are stored—just content hashes and paths.
The source_env_if_exists function sources files without checking cascade authorization. This is intentional—it's designed for simple environment files like .env.local that contain only variable assignments.
Risk: If an attacker can write to a file that gets sourced via source_env_if_exists, they can execute arbitrary code.
Mitigation:
- Only use
source_env_if_existsfor files you control - Use
source_env(which checks authorization) for.envrcfiles from other directories - Ensure sourced files have appropriate filesystem permissions
The cascade trust <dir> command auto-allows all .envrc files under that directory, including:
- Files created in the future
- Files in deeply nested subdirectories
- Files created by other users (if they have write access)
Risk: If you trust a directory where others can create files (shared directories, vendor deps), they can execute code in your shell.
Mitigation:
- Only trust directories you fully control
- Prefer explicit
allowfor individual files in shared contexts - Review trusted subtrees periodically:
cascade statusshows all authorization sources
Authorization state is stored as plaintext files. Anyone with read access to ~/.local/share/cascade/ can see which files you've allowed and which directories you trust.
Risk: Leaks information about your project structure and trust decisions.
Mitigation: The directory is created with user-only permissions (0755). Ensure your home directory permissions are appropriate.
- Allow: Uses SHA256 of file content. If file changes, re-approval is required.
- Deny: Uses hash of file path. Blocks that path regardless of content.
- Trust: Uses hash of directory path. Applies to all files under that path.
This means:
- Moving an allowed file to a new path requires re-allowing
- Denying a path doesn't affect copies of that file elsewhere
- Symlinks are resolved before hashing
| Version | Supported |
|---|---|
| 0.1.x | Yes |
Please do not report security vulnerabilities through public GitHub issues.
Instead, please report security vulnerabilities by emailing:
Include:
- Description of the vulnerability
- Steps to reproduce
- Potential impact
- Any suggested fixes (optional)
- Acknowledgment: Within 48 hours
- Initial Assessment: Within 7 days
- Resolution Timeline: Depends on severity, typically 30-90 days
We will:
- Confirm receipt of your report
- Investigate and validate the issue
- Develop a fix and coordinate disclosure timing with you
- Credit you in the security advisory (unless you prefer anonymity)
In scope:
- Authorization bypass vulnerabilities
- Code execution outside the cascade security model
- Information disclosure from cascade's internal state
- Privilege escalation via cascade
Out of scope:
- Vulnerabilities in
.envrcfiles you've explicitly allowed - Issues requiring local shell access (cascade runs in your shell by design)
- Denial of service via malformed
.envrcfiles - Social engineering attacks
- Review before allowing: Always inspect
.envrccontent before runningcascade allow - Prefer allow over trust: Use
trustsparingly, only for directories you fully control - Use deny for untrusted paths: Explicitly deny
.envrcfiles in untrusted vendor directories - Keep cascade updated: Security fixes are released as patch versions
- Check status regularly: Run
cascade statusto review your authorization decisions