From a231ff5b66c67c4546bdf2f6b6cee20480e90065 Mon Sep 17 00:00:00 2001 From: nenad_petrovic <nenad.petrovic@xlab.si> Date: Sat, 10 Sep 2022 16:00:13 +0200 Subject: [PATCH] Result summarization fixes --- src/iac_scan_runner/compatibility.py | 2 +- src/iac_scan_runner/results_summary.py | 16 ++++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/src/iac_scan_runner/compatibility.py b/src/iac_scan_runner/compatibility.py index 8202ecf..1b818f0 100644 --- a/src/iac_scan_runner/compatibility.py +++ b/src/iac_scan_runner/compatibility.py @@ -13,7 +13,7 @@ class Compatibility: "js": ["es-lint", "ts-lint"], "html": ["htmlhint"], "docker": ["hadolint"], - "other": [], + "other": ["git-leaks", "git-secrets"], } def __init__(self): diff --git a/src/iac_scan_runner/results_summary.py b/src/iac_scan_runner/results_summary.py index ba71ffd..686a845 100644 --- a/src/iac_scan_runner/results_summary.py +++ b/src/iac_scan_runner/results_summary.py @@ -87,6 +87,14 @@ class ResultsSummary: self.outcomes[check]["status"] = "Problems" return "Problems" + elif check == "shellcheck": + if outcome == "": + self.outcomes[check]["status"] = "Passed" + return "Passed" + else: + self.outcomes[check]["status"] = "Problems" + return "Problems" + elif check == "es-lint": if outcome.find("wrong")>-1: self.outcomes[check]["status"] = "Problems" @@ -111,6 +119,14 @@ class ResultsSummary: self.outcomes[check]["status"] = "Problems" return "Problems" + elif check == "bandit": + if outcome.find("No issues identified.")>-1: + self.outcomes[check]["status"] = "Passed" + return "Passed" + else: + self.outcomes[check]["status"] = "Problems" + return "Problems" + elif check == "hadolint": if outcome=="": self.outcomes[check]["status"] = "Passed" -- GitLab