Coverity(phase2)-CWE 330: Use of Insufficiently Random Values
Added fix for CWE 330: Use of Insufficiently Random Value (Cryptographically weak PRNG)
Change-Id: Iddd9dc85a5be84371c8d6afb47d4571f67af3468
Signed-off-by: Adurti <adurti.v@tataelxsi.co.in>
diff --git a/attic/run_test.py b/attic/run_test.py
index b7768ba..2c247c5 100755
--- a/attic/run_test.py
+++ b/attic/run_test.py
@@ -24,7 +24,7 @@
# import json
# import tarfile
from time import sleep
-from random import randint
+import random
import os
from sys import stderr
from uuid import uuid4
@@ -2353,7 +2353,7 @@
headers = headers_yaml
else:
headers = headers_zip_yaml
- if randint(0, 1) == 0:
+ if random.SystemRandom().randint(0, 1) == 0:
# vnfd CREATE AND UPLOAD in one step:
engine.test(
"Onboard VNFD in one step",
@@ -2431,7 +2431,7 @@
else:
headers = headers_zip_yaml
- if randint(0, 1) == 0:
+ if random.SystemRandom().randint(0, 1) == 0:
# nsd CREATE AND UPLOAD in one step:
engine.test(
"Onboard NSD in one step",