Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def _get_build_info_artifact(self, file_path):
artifact = BuildInfoModuleArtifact()
# FIXME: Weak
artifact.type = "TGZ" if "tgz" in file_path else "TXT"
artifact.name = os.path.basename(file_path)
artifact.sha1 = sha1sum(file_path)
artifact.md5 = md5sum(file_path)
return artifact