Releases: tenuo-ai/path_jail
Releases · tenuo-ai/path_jail
v0.2.0
Breaking Changes
JailErroris now#[non_exhaustive]- add a catch-all arm to matches- MSRV bumped from 1.70 to 1.80
Security
- Reject null bytes in paths (prevents C string terminator attacks)
- Reject filesystem roots (
/,C:\) at construction
Added
InvalidRooterror variant with context-aware messages- Comprehensive edge case tests (38 total)
- Framework examples (Axum, Actix-web)
- CHANGELOG.md
See CHANGELOG.md for full details.
v0.1.0
v0.1.0
Initial release of path_jail - a zero-dependency filesystem sandbox for Rust.
Features
Jail::new()- Create a sandbox rooted at a directoryJail::join()- Safely join relative paths (works for non-existent files)Jail::contains()- Verify an absolute path is inside the jailJail::relative()- Extract relative path for database storagepath_jail::join()- One-shot convenience function
Security
Blocks:
- Path traversal (
../../etc/passwd) - Symlink escapes (symlinks pointing outside the jail)
- Symlink chains (
a -> b -> /etc) - Broken symlinks (cannot verify target)
- Absolute path injection
Notes
- Zero runtime dependencies
#[must_use]onjoin()andcontains()to prevent confused deputy bugs- See DESIGN.md for security model and limitations (TOCTOU)