From: Morgan Richomme Date: Tue, 13 Sep 2016 06:46:56 +0000 (+0000) Subject: Merge "Implements use of yaml.safe_load as per sec audit" X-Git-Tag: colorado.1.0~42 X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=commitdiff_plain;h=bc6b02a4f9298d8b97a6c5e2c7394c4c6d7f2d95;hp=9b908a6c0f4d7b02e04b2dc85aea7543928c4c33;p=releng.git Merge "Implements use of yaml.safe_load as per sec audit" --- diff --git a/utils/lab-reconfiguration/reconfigUcsNet.py b/utils/lab-reconfiguration/reconfigUcsNet.py index 45a72a398..4c08f3dc9 100755 --- a/utils/lab-reconfiguration/reconfigUcsNet.py +++ b/utils/lab-reconfiguration/reconfigUcsNet.py @@ -157,7 +157,7 @@ def read_yaml_file(yamlFile): """ # TODO: add check if vnic templates specified in file exist on UCS with open(yamlFile, 'r') as stream: - return yaml.load(stream) + return yaml.safe_load(stream) def set_network(handle=None, yamlFile=None): diff --git a/utils/test/reporting/functest/reporting-status.py b/utils/test/reporting/functest/reporting-status.py index e9e167d16..0b80fe49a 100755 --- a/utils/test/reporting/functest/reporting-status.py +++ b/utils/test/reporting/functest/reporting-status.py @@ -34,7 +34,7 @@ tempest = tc.TestCase("tempest_smoke_serial", "functest", -1) cf = conf.TEST_CONF response = requests.get(cf) -functest_yaml_config = yaml.load(response.text) +functest_yaml_config = yaml.safe_load(response.text) logger.info("*******************************************") logger.info("* Generating reporting scenario status *")