Fix pythom yaml load to safe_load

Signed-off-by: DQ <dengq@vmware.com>
This commit is contained in:
DQ 2020-12-16 14:59:06 +08:00
parent 0a38ae1843
commit 234b29e170

View File

@ -81,7 +81,7 @@ def parse_versions():
if not versions_file_path.is_file(): if not versions_file_path.is_file():
return {} return {}
with open('versions') as f: with open('versions') as f:
versions = yaml.load(f) versions = yaml.safe_load(f)
return versions return versions
@ -92,7 +92,7 @@ def parse_yaml_config(config_file_path, with_notary, with_trivy, with_chartmuseu
''' '''
with open(config_file_path) as f: with open(config_file_path) as f:
configs = yaml.load(f) configs = yaml.safe_load(f)
config_dict = { config_dict = {
'portal_url': 'http://portal:8080', 'portal_url': 'http://portal:8080',