From: Adurti Date: Thu, 28 Mar 2024 11:14:53 +0000 (+0000) Subject: Coverity(phase2)-CWE 330: Use of Insufficiently Random Values X-Git-Tag: v17.0.0~4 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=0593c0ec8f3a57f386a32b20fa90f8957e79fa08;p=osm%2FNBI.git 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 --- 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 yaml # 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 @@ class TestDeploy: 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 @@ class TestDeploy: 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",