提交 b3a112ac 编写于 作者: J Justin Collins

Add Brakeman version to text and HTML reports

上级 54cabde7
......@@ -475,7 +475,16 @@ class Brakeman::Report
#Generate header for text output
def text_header
"\n+BRAKEMAN REPORT+\n\nApplication path: #{File.expand_path tracker.options[:app_path]}\nRails version: #{rails_version}\nGenerated at #{Time.now}\nChecks run: #{checks.checks_run.sort.join(", ")}\n"
<<-HEADER
+BRAKEMAN REPORT+
Application path: #{File.expand_path tracker.options[:app_path]}
Rails version: #{rails_version}
Brakeman version: #{Brakeman::Version}
Generated at #{Time.now}
Checks run: #{checks.checks_run.sort.join(", ")}
HEADER
end
#Generate header for CSV output
......
......@@ -26,12 +26,14 @@
<tr>
<th>Application Path</th>
<th>Rails Version</th>
<th>Brakeman Version</th>
<th>Report Generation Time</th>
<th>Checks Performed</th>
</tr>
<tr>
<td><%= File.expand_path tracker.options[:app_path] %></td>
<td><%= rails_version %></td>
<td><%= Brakeman::Version %>
<td><%= Time.now %></td>
<td><%= checks.checks_run.sort.join(", ") %></td>
</tr>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册