From bcacbe6049c7fc38deb0249b2bb7d45258d41201 Mon Sep 17 00:00:00 2001 From: tkishel Date: Fri, 22 Jan 2021 12:45:24 -0800 Subject: [PATCH] delete duplicate output, clarify labels --- example.tab | 9 +++------ inspect.py | 13 ++++++------- 2 files changed, 9 insertions(+), 13 deletions(-) diff --git a/example.tab b/example.tab index 4dd634b..82f8064 100644 --- a/example.tab +++ b/example.tab @@ -181,12 +181,6 @@ Unusual user activity high anomaly False False 146 "GDPR,HIPAA,MITRE ATT&CK [Bet Compliance Standard with Alerts: Total 22 Policies with Alerts: Total 141 -Policies with Alerts: High-Severity 1429 -Policies with Alerts: Medium-Severity 35143 -Policies with Alerts: Low-Severity 3531 -Policies with Alerts: Anomaly 161 -Policies with Alerts: Config 38908 -Policies with Alerts: Network 1034 Alerts: Total 40103 Alerts: Open 34028 @@ -196,6 +190,9 @@ Alerts: Resolved by Update 1759 Alerts: High-Severity 1429 Alerts: Medium-Severity 35143 Alerts: Low-Severity 3531 +Alerts: Anomaly 161 +Alerts: Config 38908 +Alerts: Network 1034 Alerts: with IaC 1086 Alerts: with Remediation 596 diff --git a/inspect.py b/inspect.py index cfbc009..3de51b7 100755 --- a/inspect.py +++ b/inspect.py @@ -75,6 +75,8 @@ 'network': 0, } +# Duplication between the above and below intended for future error checking. + alert_counts = { 'open': 0, 'resolved': 0, @@ -226,13 +228,6 @@ print("Compliance Standard with Alerts: Total\t%s" % len(alerts_by_compliance_standard)) print print("Policies with Alerts: Total\t%s" % len(alerts_by_policy)) -print("Policies with Alerts: High-Severity\t%s" % policy_counts['high']) -print("Policies with Alerts: Medium-Severity\t%s" % policy_counts['medium']) -print("Policies with Alerts: Low-Severity\t%s" % policy_counts['low']) -print("Policies with Alerts: Anomaly\t%s" % policy_counts['anomaly']) -print("Policies with Alerts: Config\t%s" % policy_counts['config']) -print("Policies with Alerts: Network\t%s" % policy_counts['network']) -# print("Policies with Alerts: Audit\t%s" % policy_counts['audit_event']) # See Note above. print print("Alerts: Total\t%s" % len(alert_list)) print("Alerts: Open\t%s" % alert_counts['open']) @@ -242,6 +237,10 @@ print("Alerts: High-Severity\t%s" % alert_counts['resolved_high']) print("Alerts: Medium-Severity\t%s" % alert_counts['resolved_medium']) print("Alerts: Low-Severity\t%s" % alert_counts['resolved_low']) +print("Alerts: Anomaly\t%s" % policy_counts['anomaly']) +print("Alerts: Config\t%s" % policy_counts['config']) +print("Alerts: Network\t%s" % policy_counts['network']) +# print("Alerts: Audit\t%s" % policy_counts['audit_event']) # See Note above. print("Alerts: with IaC\t%s" % alert_counts['shiftable']) print("Alerts: with Remediation\t%s" % alert_counts['remediable']) print