Adds usedforsecurity=False to HPE 3PAR driver

To appease Bandit since SHA1 angers
the beast, usedforsecurity=False will be
bolted to the hash function

Change-Id: I33bbb7070ada5509ca05c90d7a38077d38f54a1f
This commit is contained in:
Ubuntu 2024-04-09 05:01:11 +00:00
parent 36549c8b97
commit e47c6c2611
1 changed files with 1 additions and 1 deletions

View File

@ -357,7 +357,7 @@ class HPE3ParShareDriver(driver.ShareDriver):
source_file = inspect.getsourcefile(clazz)
file_size = os.path.getsize(source_file)
sha1 = hashlib.sha1()
sha1 = hashlib.sha1(usedforsecurity=False)
sha1.update(("blob %u\0" % file_size).encode('utf-8'))
with open(source_file, 'rb') as f: