pub struct PathGuard { /* private fields */ }Expand description
파일 접근 시 보안 검증 유틸.
Implementations§
Source§impl PathGuard
impl PathGuard
Sourcepub fn validate_traversal(
&self,
path: &Path,
) -> Result<PathBuf, PathSecurityError>
pub fn validate_traversal( &self, path: &Path, ) -> Result<PathBuf, PathSecurityError>
Check traversal only (no workspace boundary enforcement).
Use this for tools that may legitimately access paths outside the
workspace root (e.g. reading system config, writing to temp dirs).
Blocks .. components and canonicalizes existing paths but does
NOT reject absolute paths outside the workspace.
Auto Trait Implementations§
impl Freeze for PathGuard
impl RefUnwindSafe for PathGuard
impl Send for PathGuard
impl Sync for PathGuard
impl Unpin for PathGuard
impl UnsafeUnpin for PathGuard
impl UnwindSafe for PathGuard
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more