summary with brakeman links
This commit is contained in:
parent
5e973bd2f9
commit
87c9d43dfb
@ -13,7 +13,7 @@ class ReportAdapter
|
|||||||
end
|
end
|
||||||
|
|
||||||
def summary(report)
|
def summary(report)
|
||||||
"**Brakeman Report**: \n - #{security_warnings(report)} security warnings"
|
"**Brakeman Report**: \n - #{security_warnings(report)} security warnings\n #{check_table(report)}"
|
||||||
end
|
end
|
||||||
|
|
||||||
def annotations(report)
|
def annotations(report)
|
||||||
@ -31,6 +31,14 @@ class ReportAdapter
|
|||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
|
def check_table(report)
|
||||||
|
uniq_checks(report).reduce('') { |memo, check| memo + " - [#{check[:check_name]}](#{check[:link]})" }
|
||||||
|
end
|
||||||
|
|
||||||
|
def uniq_checks(report)
|
||||||
|
report['warnings'].map { |w| { check_name: w['check_name'], link: w['link'] } }.uniq { |w| w[:checkname] }
|
||||||
|
end
|
||||||
|
|
||||||
def security_warnings(report)
|
def security_warnings(report)
|
||||||
report['scan_info']['security_warnings']
|
report['scan_info']['security_warnings']
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user