Skip to main content

Module security

Module security 

Source

Functions§

safe_join
Joins a relative path to a project root, normalizes, and ensures it stays within the root. The project root must exist (canonicalized). The file path may not exist yet.
validate_path
Validates that an existing path is inside the project root and returns its canonical form.
validate_worktree_path
Validate a worktree path – ensures it’s under the configured worktrees directory.