Automatically perform validations / symlink cleanup when extracting files in Gitlab::ImportExport::CommandLineUtil
Import/Export and GitLab migration use the extract methods Gitlab::ImportExport::CommandLineUtil to decompress tar.gz and .gz files. And every time we decompress the files, we should delete any symlink file to prevent arbitrary files from being read.
Currently, each class that uses the extract method implements a method to delete the symlink.
We should improve the extract method to delete the symlinks files and make these methods secure by default