Added fix for CWE 330: Use of Insufficiently Random Value (Cryptographically weak PRNG)
Change-Id: I927c9d22ca42b01f6ec1fe9fc41e4b962167b72f
Signed-off-by: selvi.j <selvi.j@tataelxsi.co.in>
self._init_paths_env(cluster_name=cluster_id, create_if_not_exist=True)
def get_random_number():
- r = random.randrange(start=1, stop=99999999)
+ r = random.SystemRandom().randint(1, 99999999)
s = str(r)
while len(s) < 10:
s = "0" + s
name += "-"
def get_random_number():
- r = random.randrange(start=1, stop=99999999)
+ r = random.SystemRandom().randint(1, 99999999)
s = str(r)
s = s.rjust(10, "0")
return s