3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
# File 'lib/security_report/plain_reporter.rb', line 3
def report(results, skipped)
if results.any?
high, medium_or_lower = results.partition { |result| result.criticality == :high }
medium, low_or_unknown = medium_or_lower.partition { |result| result.criticality == :medium }
[high, medium, low_or_unknown].each do |results|
puts format_results(results) if results.any?
end
else
puts "No vulnerabilities found"
end
if skipped.any?
puts
puts "Skipped #{skipped.join(", ")}: No Gemfile.lock found"
end
end
|