Merge "Bump bandit version"

This commit is contained in:
Zuul 2020-07-28 16:25:34 +00:00 committed by Gerrit Code Review
commit 599c0b9d1f
2 changed files with 8 additions and 3 deletions

View File

@ -525,7 +525,10 @@ class Connection(object):
self._url += url.virtual_host
elif not url.hosts:
host = oslo_messaging.transport.TransportHost('')
self._url = self._transform_transport_url(
# NOTE(moguimar): default_password in this function's context is
# a fallback option, not a hardcoded password.
# username and password are read from host.
self._url = self._transform_transport_url( # nosec
url, host, default_username='guest', default_password='guest',
default_hostname='localhost')
@ -655,7 +658,9 @@ class Connection(object):
except KeyError:
raise RuntimeError("Invalid SSL version : %s" % version)
def _transform_transport_url(self, url, host, default_username='',
# NOTE(moguimar): default_password in this function's context is just
# a fallback option, not a hardcoded password.
def _transform_transport_url(self, url, host, default_username='', # nosec
default_password='', default_hostname=''):
transport = url.transport.replace('kombu+', '')
transport = transport.replace('rabbit', 'amqp')

View File

@ -25,7 +25,7 @@ coverage!=4.4,>=4.0 # Apache-2.0
pyngus>=2.2.0 # Apache-2.0
# Bandit security code scanner
bandit>=1.1.0,<1.6.0 # Apache-2.0
bandit>=1.6.0,<1.7.0 # Apache-2.0
eventlet!=0.18.3,!=0.20.1,>=0.18.2 # MIT
greenlet>=0.4.10 # MIT