sec_interp.core.validation.path_validator module

Validation logic for filesystem paths and workspace settings.

sec_interp.core.validation.path_validator.validate_output_path(path: str) tuple[bool, str, Path | None]

Validate that an output path is a valid directory and currently writable.

This is a convenience wrapper around validate_safe_output_path() for general directory validation.

Parameters:

path – The path string to validate.

Returns:

(is_valid, error_message, resolved_path)
  • is_valid: True if the directory is valid and writable.

  • error_message: Error details if validation fails.

  • resolved_path: Absolute Path object if valid, else None.

Return type:

tuple

sec_interp.core.validation.path_validator.validate_safe_output_path(path: str, base_dir: Path | None = None, must_exist: bool = False, create_if_missing: bool = False) tuple[bool, str, Path | None]

Validate an output path string with security and path traversal protection.