Skip to main content

Module PathSecurity

Module PathSecurity 

Source
Expand description

ยงPath Security Utilities

Functions for validating filesystem access and enforcing workspace trust.

Functionsยง

ContainsLandEditorSegment ๐Ÿ”’
True when path contains a directory segment whose name starts with land.editor.. Used to tighten the Application-Support / XDG checks so we only trust directories that Land itself provisioned, not every file under $HOME/Library/Application Support.
ContainsPathSegments ๐Ÿ”’
True when every element of segments appears in order as consecutive path components of path. Used to match Sky / Dependency extension roots regardless of which relative-path prefix the scanner used.
IsPathAllowedForAccess
A critical security helper that checks if a given filesystem path is allowed for access.
IsTrustedSystemPath ๐Ÿ”’
Return true when PathToCheck falls under a directory that Land itself manages and the sandbox should not gate.