Skip to content
Snippets Groups Projects
Commit edb1a65e authored by nenad.petrovic@xlab.si's avatar nenad.petrovic@xlab.si Committed by Mati(ja)c Cankar
Browse files

Compatibility check fix

parent 0f383950
No related branches found
No related tags found
No related merge requests found
...@@ -54,13 +54,11 @@ class Compatibility: ...@@ -54,13 +54,11 @@ class Compatibility:
try: try:
for root, folders, names in os.walk(iac_directory): for root, folders, names in os.walk(iac_directory):
for f in names: for f in names:
print(f)
if (f.find(".tf") > -1) or (f.find(".tftpl") > -1): if (f.find(".tf") > -1) or (f.find(".tftpl") > -1):
types.append("terraform") types.append("terraform")
scanned_terraform.append(f) scanned_terraform.append(f)
elif (f.find(".yaml") > -1) or (f.find(".yml") > -1): elif (f.find(".yaml") > -1) or (f.find(".yml") > -1):
print(f)
types.append("yaml") types.append("yaml")
scanned_yaml.append(f) scanned_yaml.append(f)
......
...@@ -40,7 +40,6 @@ class ResultsSummary: ...@@ -40,7 +40,6 @@ class ResultsSummary:
file_list = "" file_list = ""
for t in compatibility_matrix: for t in compatibility_matrix:
if check in compatibility_matrix[t]: if check in compatibility_matrix[t]:
print(compatibility_matrix[t])
file_list = str(scanned_files[t]) file_list = str(scanned_files[t])
self.outcomes[check]["files"] = file_list self.outcomes[check]["files"] = file_list
......
...@@ -143,7 +143,6 @@ class ScanRunner: ...@@ -143,7 +143,6 @@ class ScanRunner:
self.results_summary.outcomes = dict() self.results_summary.outcomes = dict()
self.compatibility_matrix.scanned_files = dict() self.compatibility_matrix.scanned_files = dict()
compatible_checks = self.compatibility_matrix.get_all_compatible_checks(self.iac_dir) compatible_checks = self.compatibility_matrix.get_all_compatible_checks(self.iac_dir)
non_compatible_checks = [] non_compatible_checks = []
scan_output = {} scan_output = {}
...@@ -151,10 +150,7 @@ class ScanRunner: ...@@ -151,10 +150,7 @@ class ScanRunner:
if selected_checks: if selected_checks:
for selected_check in selected_checks: for selected_check in selected_checks:
check = self.iac_checks[selected_check] check = self.iac_checks[selected_check]
print(selected_check)
if check.enabled: if check.enabled:
print("enabled")
print(compatible_checks)
if selected_check in compatible_checks: if selected_check in compatible_checks:
check_output = check.run(self.iac_dir) check_output = check.run(self.iac_dir)
scan_output[selected_check] = check_output.to_dict() scan_output[selected_check] = check_output.to_dict()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment