From 183aae602b053e6537b3c2e8da942280bd9c1d5e Mon Sep 17 00:00:00 2001 From: Andrew Krasichkov Date: Fri, 19 May 2017 19:47:02 +0300 Subject: [PATCH] Deal with severity issue overriding (#53) --- gixy/core/manager.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/gixy/core/manager.py b/gixy/core/manager.py index 0f4b1ed..c6d98d2 100644 --- a/gixy/core/manager.py +++ b/gixy/core/manager.py @@ -36,8 +36,11 @@ def results(self): def stats(self): stats = dict.fromkeys(gixy.severity.ALL, 0) for plugin in self.auditor.plugins: - if plugin.issues: - stats[plugin.severity] += len(plugin.issues) + base_severity = plugin.severity + for issue in plugin.issues: + # TODO(buglloc): encapsulate into Issue class? + severity = issue.severity if issue.severity else base_severity + stats[severity] += 1 return stats def _audit_recursive(self, tree):