diff --git a/bin/dib-lint b/bin/dib-lint index 53b7336a..bc94a255 100755 --- a/bin/dib-lint +++ b/bin/dib-lint @@ -237,7 +237,7 @@ for i in $(find elements -type f -name '*.yaml'); do import yaml import sys try: - objs = yaml.load(open('$i')) + objs = yaml.safe_load(open('$i')) except yaml.parser.ParserError: sys.exit(1) " diff --git a/elements/package-installs/bin/package-installs-squash b/elements/package-installs/bin/package-installs-squash index eafdd9f4..949a8ae8 100755 --- a/elements/package-installs/bin/package-installs-squash +++ b/elements/package-installs/bin/package-installs-squash @@ -59,7 +59,7 @@ def collect_data(data, filename, element_name): try: objs = json.load(open(filename)) except ValueError: - objs = yaml.load(open(filename)) + objs = yaml.safe_load(open(filename)) for pkg_name, params in objs.items(): if not params: params = {} diff --git a/elements/svc-map/bin/svc-map b/elements/svc-map/bin/svc-map index 034c1fca..2df6ba91 100755 --- a/elements/svc-map/bin/svc-map +++ b/elements/svc-map/bin/svc-map @@ -24,7 +24,7 @@ def load_service_mapping(filepath="/usr/share/svc-map/services"): if not os.path.isfile(filepath): return {} with open(filepath, 'r') as data_file: - return yaml.load(data_file.read()) + return yaml.safe_load(data_file.read()) def main(): diff --git a/elements/svc-map/extra-data.d/10-merge-svc-map-files b/elements/svc-map/extra-data.d/10-merge-svc-map-files index c8b0e034..35697685 100755 --- a/elements/svc-map/extra-data.d/10-merge-svc-map-files +++ b/elements/svc-map/extra-data.d/10-merge-svc-map-files @@ -70,7 +70,7 @@ def main(): data_path = os.path.join(element_path, element, "svc-map") if os.path.exists(data_path): with open(data_path, 'r') as dataFile: - data = yaml.load(dataFile.read()) + data = yaml.safe_load(dataFile.read()) try: service_names = merge_data( data,