Expand description
Security checks for path containment and output file protection
Provides protection against path traversal attacks and detection of output files to prevent infinite loops during directory walking.
Structs§
- File
Identity - File identity for comparing if a file is the same as stdout
Functions§
- get_
stdout_ identity - Get the file identity for stdout
- is_
canonical_ within_ root - Check if a canonical path is within a canonical root directory
- is_
output_ file - Check if a file path refers to the same file as stdout
- is_
within_ root - Check if a path is within a given root directory
- output_
protection_ threshold - Threshold for shell redirection detection (configurable via env var)