Skip to content

fix(mount): add path validation, allowlist, and writable warnings#1252

Merged
chaliy merged 6 commits intomainfrom
fix/issue-1169-mount-path-validation
Apr 13, 2026
Merged

fix(mount): add path validation, allowlist, and writable warnings#1252
chaliy merged 6 commits intomainfrom
fix/issue-1169-mount-path-validation

Conversation

@chaliy
Copy link
Copy Markdown
Contributor

@chaliy chaliy commented Apr 13, 2026

Summary

  • Add optional mount path allowlist via allowed_mount_paths() builder method
  • Block sensitive host paths by default (/etc/shadow, /etc/sudoers, /proc, /sys)
  • Warn on stderr when writable mounts are created (Rust builder + JS bindings)
  • Python bindings inherit validation through the Rust builder

Test plan

  • Allowlist blocks unlisted mount paths
  • Sensitive path /proc is blocked by default
  • All existing realfs tests pass
  • cargo clippy clean

Closes #1169

@chaliy chaliy force-pushed the fix/issue-1169-mount-path-validation branch 2 times, most recently from 792afdb to 9495fd8 Compare April 13, 2026 17:03
chaliy added 5 commits April 13, 2026 19:08
- Add optional mount path allowlist via allowed_mount_paths() builder
- Block sensitive host paths by default (/etc/shadow, /proc, /sys, etc.)
- Warn on stderr when writable mounts are created (Rust, JS bindings)
- Python bindings inherit validation through the Rust builder

Closes #1169
@chaliy chaliy force-pushed the fix/issue-1169-mount-path-validation branch from 9495fd8 to e9a9e32 Compare April 13, 2026 19:12
@chaliy chaliy merged commit 48b9b3a into main Apr 13, 2026
27 checks passed
@chaliy chaliy deleted the fix/issue-1169-mount-path-validation branch April 13, 2026 19:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

sec(js): mount() API accepts arbitrary host paths without validation or warning

1 participant