Issues in HTML Reports

I’m currently looking at using the HTML reports to generate a series of charts based off of the Issues (not notes) imported from Nexpose. The idea is to take these charts and simply add them into the AdvancedWord report. I have the example working where the report is based on the notes, however, I’m unable to find out if I can do something similar with the issues.

Has anyone been able to get this working?

I appreciate your help in advance.

Thank you,

Hi @Todds,

You can definitely get this working with Issues, accessing the issues local variable. You can see an example here:


Thanks Daniel,

This worked great, I’ve included the code below that generates the charts using the imported issues instead of the notes below. Can you tell me if the Tags are also available to these reports?

<script src=""></script>
<script src=""></script>
<script src=""></script>
<script type="text/javascript">
  // this hash will map note id's to CSS classes associated with their
  // CVSS score
  var noteClassName = {};
  <%# Create a Ruby hash mapping each note to a risk level %>
  <% sorted = { :low => [], :medium => [], :high => []} %>
  <% issues.each do |issue|;
       cvss = issue.fields['Severity'].to_f;
       case cvss
         when 0.0..3.9
           sorted[:low] << issue
         when 4.0..6.9
           sorted[:medium] << issue
           sorted[:high] << issue
     end %>

Hi @Todds,

Yes, you can access them using the #tag method of each Issue instance. Keep in mind it will return an array (even though each Issue, can only have one Tag). Something like this should work:

<%= if issue.tags.any? %>


p.s. Tags are only available in the Pro edition.