export notes associated to a vuln

in addition to ntoes asscoiated directly
to a host, the XML export will now
export notes that are tied to a vuln

MSP-12183
bug/bundler_fix
David Maloney 2015-02-24 12:17:44 -06:00
parent 885469ca52
commit 2389185376
No known key found for this signature in database
GPG Key ID: DEDBA9DC3A913DB2
1 changed files with 12 additions and 0 deletions

View File

@ -374,6 +374,18 @@ class Export
report_file.write(" #{el}\n")
end
# Notes attached to vulns instead of the host
report_file.write(" <notes>\n")
@notes.where(vuln_id: e.id).each do |note|
report_file.write(" <note>\n")
note.attributes.each_pair do |k,v|
el = create_xml_element(k,v)
report_file.write(" #{el}\n")
end
report_file.write(" </note>\n")
end
report_file.write(" </notes>\n")
# References
report_file.write(" <refs>\n")
e.refs.each do |ref|