Class: Zwischen::Finding::Aggregator
- Inherits:
-
Object
- Object
- Zwischen::Finding::Aggregator
- Defined in:
- lib/zwischen/finding/aggregator.rb
Constant Summary collapse
- SEVERITY_ORDER =
{ "critical" => 0, "high" => 1, "medium" => 2, "low" => 3, "info" => 4 }.freeze
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.aggregate(findings) ⇒ Object
10 11 12 |
# File 'lib/zwischen/finding/aggregator.rb', line 10 def self.aggregate(findings) new.aggregate(findings) end |
Instance Method Details
#aggregate(findings) ⇒ Object
14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/zwischen/finding/aggregator.rb', line 14 def aggregate(findings) normalized = normalize_severities(findings) deduplicated = deduplicate(normalized) sorted = sort_by_severity(deduplicated) grouped = group_by_file(sorted) { findings: sorted, grouped: grouped, summary: build_summary(sorted) } end |