Skip to main content

Module security

Module security 

Source
Expand description

Security validation module for user input and file operations

Functionsยง

escape_for_rust_string
Escapes user input for safe inclusion in Rust string literals
read_file_with_limit
Reads a file with size limits to prevent memory exhaustion
read_stdin_with_limit
Reads from stdin with size limits to prevent memory exhaustion
sanitize_for_commentDeprecated
DEPRECATED AND UNSAFE: Do not use for user input in comments
validate_expression
Validates an ELO expression for syntax and safety
validate_file_path
Validates a file path to prevent directory traversal attacks
validate_file_path_with_context
Validates a file path and stores the CWD for later use-time validation
validate_regex_pattern
Validates a regex pattern to prevent ReDoS attacks
verify_path_still_valid
Verifies that a previously validated path is still valid