Create a command-line tool /root/extractor.py that safely extracts a tar archive to a specified output…
Create a command-line tool /root/extractor.py that safely extracts a tar archive to a specified output…: a task in TermGrade Environments: 1,004 executable Linux tasks (Harbor dataset). Goal : Given a path to a tar file and a destination directory, extract the contents safely without…
The task
**Goal**: Given a path to a tar file and a destination directory, extract the contents safely without path-traversal vulnerabilities, preserving symlinks and permissions exactly as in the archive (except where safety rules override).
Part of ai-and/termgrade-environments.