HF RL Explorer

Create a command-line tool /app/extract that safely extracts a tar.xz archive.

Create a command-line tool /app/extract that safely extracts a tar.xz archive.: a task in TermGrade Environments: 1,004 executable Linux tasks (Harbor dataset). Input contract: - The tool receives exactly two arguments: the path to a .tar.xz archive and a destination directory. - The archive…

The task

**Input contract:** - The tool receives exactly two arguments: the path to a `.tar.xz` archive and a destination directory. - The archive contains files and directories with arbitrary names, including names with Unicode characters, leading/trailing spaces, and path traversal attempts (e.g., `../etc/passwd`). - File…

Part of ai-and/termgrade-environments.