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_comment
Sanitizes user input for safe inclusion in generated code comments
validate_expression
Validates an ELO expression for syntax and safety
validate_file_path
Validates a file path to prevent directory traversal attacks
validate_regex_pattern
Validates a regex pattern to prevent ReDoS attacks