From 3a8b6c2d364401c1d0f2398431bf9d4ad550d34e Mon Sep 17 00:00:00 2001 From: Ben Bridts Date: Mon, 30 Sep 2024 21:02:59 +0200 Subject: [PATCH] Make all rules file build more repeatable Building from the same rules twice can would generate different files. By sorting the inputs we make sure that only content changes trigger output changes --- mappings/build.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mappings/build.py b/mappings/build.py index 6f1d67c..0e39db1 100644 --- a/mappings/build.py +++ b/mappings/build.py @@ -18,7 +18,7 @@ def create_guard_rules_registry_all_rules(dirName, version): controls = ["all rules in AWS Guard Rules Registry"] mappings = [] resource_list = download_resource_type_list() - for build_file in glob.iglob(aws_rules_directory, recursive=True): + for build_file in sorted(glob.iglob(aws_rules_directory, recursive=True)): reports_on = [] build_file_relative_path = os.path.relpath(build_file) for resource in resource_list: