Skip to main content

Module sandbox

Module sandbox 

Source
Expand description

Sandboxed command execution with timeouts and environment isolation.

Structs§

LintIssue
Parsed lint issue from an external tool.
TestResult
Parse pytest output to extract pass/fail counts.
ToolResult
Result of running an external tool.

Functions§

parse_pytest_output
parse_ruff_output
Parse ruff output into structured lint issues.
run_tool
Run a command in a sandboxed environment.
run_tool_sandboxed
Run a tool with network access denied (macOS sandbox-exec). Falls back to normal execution on non-macOS or if sandbox-exec unavailable.
run_tool_with_timeout
tool_exists
Check if a tool is available (in PATH or as absolute path). Cross-platform: uses which on Unix, where on Windows.
validate_path_within
Validate that a relative path stays within root.