Class: ReportStdout
Instance Attribute Summary
#scandata
Instance Method Summary
collapse
#desc, #getkey, #sev2word, #sortvulns
inherited, modules
Instance Method Details
#file_extension ⇒ Object
11
12
13
|
# File 'lib/dockscan/modules/report/stdout.rb', line 11
def file_extension
return "-stdout.txt"
end
|
7
8
9
|
# File 'lib/dockscan/modules/report/stdout.rb', line 7
def format
return "stdout"
end
|
#info ⇒ Object
3
4
5
|
# File 'lib/dockscan/modules/report/stdout.rb', line 3
def info
return 'This plugin produces brief stdout reports'
end
|
#report(opts) ⇒ Object
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
# File 'lib/dockscan/modules/report/stdout.rb', line 15
def report(opts)
output=""
output << "Dockscan Report\n\n"
issues = sortvulns
7.downto(3) do |sev|
if issues.key?(sev)
output << sev2word(sev) << "\n"
issues[sev].each do |v|
output << v.vuln.title << ": "
output << v.vuln.solution
output << "\n"
end
output << "\n"
end
end
return output
end
|