Change use of random to random.SystemRandom
There's no reason to use random directly unless the code really requires a pseudo-random number generator. This is for security hardening and identified by the security static analysis project called Bandit. SecImpact Change-Id: I6b5fdd8ab17ec6ed2cb8c195bee1fb5da0e90e9f
This commit is contained in:
parent
e0a9124634
commit
14339755ce
@ -14,7 +14,7 @@
|
||||
|
||||
import logging
|
||||
import posixpath
|
||||
import random
|
||||
import random as _random
|
||||
|
||||
import six.moves.http_client as httplib
|
||||
import six.moves.urllib.parse as urlparse
|
||||
@ -25,6 +25,7 @@ from oslo_vmware import exceptions
|
||||
from oslo_vmware import vim_util
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
random = _random.SystemRandom()
|
||||
|
||||
|
||||
class Datastore(object):
|
||||
|
Loading…
Reference in New Issue
Block a user