Merge "Avoid false positives of Jinja2 in Bandit scan"
This commit is contained in:
commit
48cb13e501
@ -87,7 +87,8 @@ class XVPConsoleProxy(object):
|
||||
conf_data = {'multiplex_port': CONF.xvp.console_xvp_multiplex_port,
|
||||
'pools': pools}
|
||||
tmpl_path, tmpl_file = os.path.split(CONF.injected_network_template)
|
||||
env = jinja2.Environment(loader=jinja2.FileSystemLoader(tmpl_path))
|
||||
env = jinja2.Environment( # nosec
|
||||
loader=jinja2.FileSystemLoader(tmpl_path)) # nosec
|
||||
env.filters['pass_encode'] = self.fix_console_password
|
||||
template = env.get_template(tmpl_file)
|
||||
self._write_conf(template.render(conf_data))
|
||||
|
@ -155,8 +155,9 @@ def get_injected_network_template(network_info, template=None,
|
||||
return
|
||||
|
||||
tmpl_path, tmpl_file = os.path.split(template)
|
||||
env = jinja2.Environment(loader=jinja2.FileSystemLoader(tmpl_path),
|
||||
trim_blocks=True)
|
||||
env = jinja2.Environment( # nosec
|
||||
loader=jinja2.FileSystemLoader(tmpl_path), # nosec
|
||||
trim_blocks=True)
|
||||
template = env.get_template(tmpl_file)
|
||||
return template.render({'interfaces': nets,
|
||||
'use_ipv6': ipv6_is_available,
|
||||
|
Loading…
x
Reference in New Issue
Block a user