Resolves Bandit 104 errors

From Bandit's docs:
Binding to all network interfaces can potentially open up a service to
traffic on unintended interfaces, that may not be properly documented or
secured. This plugin test looks for a string pattern “0.0.0.0” that may
indicate a hardcoded binding to all network interfaces.

This change fixes B104 errors by removing an unused method and ignoring
a default line used for manifest generation.

Change-Id: Id9cf501829be0166dff933e013c7ac47088bb763
This commit is contained in:
Ian Pittwood 2019-04-11 09:55:17 -05:00
parent 7da3e51798
commit 1509ac5cd9
1 changed files with 1 additions and 13 deletions

View File

@ -86,18 +86,6 @@ class ProcessDataSource(object):
LOG.debug("Genesis Node Details:\n{}".format(
pprint.pformat(self.genesis_node)))
def _get_genesis_node_ip(self):
"""Returns the genesis node ip"""
ip = "0.0.0.0"
LOG.info("Getting Genesis Node IP")
if not self.genesis_node:
self._get_genesis_node_details()
ips = self.genesis_node.get("ip", "")
if ips:
ip = ips.get("oam", "0.0.0.0")
return ip
def _validate_intermediary_data(self, data):
"""Validates the intermediary data before generating manifests.
@ -312,7 +300,7 @@ class ProcessDataSource(object):
# OAM have default routes. Only for cruiser. TBD
if net_type == "oam":
routes = ["0.0.0.0/0"]
routes = ["0.0.0.0/0"] # nosec
else:
routes = []
vlan_network_data_[net_type]["routes"] = routes