Skip to main content

Module path_boundary

Module path_boundary 

Source
Expand description

PathBoundary<Marker> — the security perimeter for validated path operations.

A PathBoundary represents a trusted filesystem directory. All StrictPath values produced through it are guaranteed, at construction time, to resolve inside that directory. This guarantee is provided by canonicalize_and_enforce_restriction_boundary, which canonicalizes the candidate path (resolving symlinks and ..) and then verifies it starts with the canonicalized boundary. Any path that would escape is rejected with PathEscapesBoundary before any I/O occurs.

Structs§

BoundaryReadDir
Iterator over directory entries that yields validated StrictPath values.
PathBoundary
A path boundary that serves as the secure foundation for validated path operations.