Added #nosec to sahara.service.coordinator package

The sahara.service.coordinator module uses an MD5 hash to identify
object instances that it knows about. These object identifiers are
not exposed outside the application, and as such have a low
likelihood of generating hash collisions produced by an attacker.
The usage should be marked with nosec as per the bandit documentation.

Change-Id: I995ae9eedc35f387c2259d62c25e5d73252de683
Closes-Bug: #1552476
This commit is contained in:
Tin Lam 2016-03-02 23:27:33 -06:00
parent 67816de1f5
commit fdb217b795
1 changed files with 1 additions and 1 deletions

View File

@ -102,7 +102,7 @@ class HashRing(Coordinator):
@staticmethod
def _hash(key):
return int(hashlib.md5(str(key)).hexdigest(), 16)
return int(hashlib.md5(str(key)).hexdigest(), 16) # nosec
def _build_ring(self):
ring = {}