Skip to content

Commit

Permalink
use proper fix for non-security use of SHA1
Browse files Browse the repository at this point in the history
  • Loading branch information
fmigneault committed Dec 14, 2024
1 parent c995ea2 commit 1c6c7a8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion weaver/provenance.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ def sha1_uuid(document, identifier):
Generate a prefixed SHA1 hash from the identifier value.
"""
sha1_ns = document._namespaces[cwl_prov_const.DATA]
sha1_id = f"{sha1_ns.prefix}:{hashlib.sha1(identifier.encode()).hexdigest()}" # nosec: B324
sha1_id = f"{sha1_ns.prefix}:{hashlib.sha1(identifier.encode(), usedforsecurity=False).hexdigest()}"
return sha1_id

def initialize_provenance(self, full_name, host_provenance, user_provenance, orcid, fsaccess, run_uuid=None):
Expand Down

0 comments on commit 1c6c7a8

Please sign in to comment.