Skip to content

Commit

Permalink
delete duplicate output, clarify labels
Browse files Browse the repository at this point in the history
  • Loading branch information
tkishel committed Jan 22, 2021
1 parent 5b35665 commit bcacbe6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 13 deletions.
9 changes: 3 additions & 6 deletions example.tab
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

13 changes: 6 additions & 7 deletions inspect.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@
'network': 0,
}

# Duplication between the above and below intended for future error checking.

alert_counts = {
'open': 0,
'resolved': 0,
Expand Down Expand Up @@ -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'])
Expand All @@ -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

0 comments on commit bcacbe6

Please sign in to comment.