From 219b733e1be2beb2f714088d3916fdb065f9abdc Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Tue, 29 Jan 2019 10:50:03 +0100 Subject: [PATCH] Use yaml.safe_load (#298) Ref: https://github.com/Kuniwak/vint/issues/279#issuecomment-458106093 --- vint/linting/config/config_file_source.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/vint/linting/config/config_file_source.py b/vint/linting/config/config_file_source.py index 210932c8..989e123a 100644 --- a/vint/linting/config/config_file_source.py +++ b/vint/linting/config/config_file_source.py @@ -13,7 +13,8 @@ def __init__(self, env): config_file_path = self.get_file_path(env) with config_file_path.open() as file_obj: - self._config_dict = self.convert_config_dict(yaml.load(file_obj)) + config_yaml = yaml.safe_load(file_obj) + self._config_dict = self.convert_config_dict(config_yaml) def convert_config_dict(self, yaml_dict):