Skip to content

Commit

Permalink
Fix a bug, add findings count
Browse files Browse the repository at this point in the history
* Removing a workaround introduced a bug
* It's nice to know how many findings popped up
  • Loading branch information
safejulian committed Oct 24, 2024
1 parent bf7171e commit 2aeff54
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 0 additions & 2 deletions html_report.rb
Original file line number Diff line number Diff line change
Expand Up @@ -103,14 +103,12 @@ def generate
def results_matching(severity, rule_id)
@results.select do |result|
_description = result.description
rule_id = result.rule_id
result.severity == severity && result.rule_id == rule_id
end
end

def rules_and_descriptions(severity)
@results.select { |e| e.severity == severity }.map do |result|

[result.rule_id, result.description]
end.uniq.to_h
end
Expand Down
1 change: 1 addition & 0 deletions template.erb
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@
<p><strong>Repo Branch:</strong> <%= ENV['REPO_BRANCH'] %></p>
<p><strong>Latest Commit SHA:</strong> <%= ENV['LATEST_COMMIT_SHA'] %></p>
<p><strong>Scan Date:</strong> <%= @scan_date %></p>
<p><strong>Findings:</strong> <%= @results.length %></p>
<p><strong>Tools used:</strong> <%= @tools.join(", ") %></p>
</div>
</div>
Expand Down

0 comments on commit 2aeff54

Please sign in to comment.