HF RL Explorer

Write a command-line tool safe-extract that extracts a tar archive safely, preventing path-traversal…

Write a command-line tool safe-extract that extracts a tar archive safely, preventing path-traversal…: a task in TermGrade Environments: 1,004 executable Linux tasks (Harbor dataset). Exact contract: - Extraction root: treat the given output directory as the root; ALL extracted content must land…

The task

Exact contract: - Extraction root: treat the given output directory as the root; ALL extracted content must land inside it. - Path sanitization: reject any member whose resolved (realpath) extracted path would escape the output root. This includes members with absolute paths, `..` components, or symlinks inside the…

Part of ai-and/termgrade-environments.