'Inspect the archive contents to ensure that there are no risky symlinks.
Returns True if a suspicious path is found.'

def validate_archive_paths(self, tar_archive):

    for member in tar_archive.getmembers():
        if (not (member.isdir() or member.isfile() or member.islnk())):
            return False
        elif (not safe_relpath(member.name)):
            return False
    return True
