diff --git a/ci-scripts/linters/lint-browbeat-config.py b/ci-scripts/linters/lint-browbeat-config.py index 95138bdbb..ed08fbc2f 100644 --- a/ci-scripts/linters/lint-browbeat-config.py +++ b/ci-scripts/linters/lint-browbeat-config.py @@ -16,7 +16,7 @@ import sys from pykwalify import core as pykwalify_core from pykwalify import errors as pykwalify_errors stream = open(sys.argv[1], 'r') -schema = yaml.load(stream) +schema = yaml.safe_load(stream) check = pykwalify_core.Core(sys.argv[2], schema_data=schema) try: check.validate(raise_exception=True) diff --git a/lib/Shaker.py b/lib/Shaker.py index 3c6b4db02..4da4273a3 100644 --- a/lib/Shaker.py +++ b/lib/Shaker.py @@ -244,7 +244,7 @@ class Shaker(WorkloadBase.WorkloadBase): def set_scenario(self, scenario, fname, default_time): stream = open(fname, 'r') - data = yaml.load(stream) + data = yaml.safe_load(stream) stream.close() default_density = 1 default_compute = 1 diff --git a/lib/Tools.py b/lib/Tools.py index d3f660896..69befbb1e 100644 --- a/lib/Tools.py +++ b/lib/Tools.py @@ -93,7 +93,7 @@ class Tools(object): self.logger.error( "Configuration file {} passed is missing".format(path)) exit(1) - config = yaml.load(stream) + config = yaml.safe_load(stream) stream.close() self.config = config if validate: @@ -104,7 +104,7 @@ class Tools(object): self.logger.info( "Validating the configuration file passed by the user") stream = open("lib/validate.yaml", 'r') - schema = yaml.load(stream) + schema = yaml.safe_load(stream) check = pykwalify_core.Core( source_data=self.config, schema_data=schema) try: