This repository has been archived by the owner on Feb 12, 2022. It is now read-only.
/
default.erb
343 lines (296 loc) · 8.39 KB
/
default.erb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
<html>
<head>
<title>Security Test Report for <%=h(@app.name)%></title>
<style type="text/css">
body{
background-color: #e5e5e5;
color: #F0F1F2;
font-family: Arial, Helvetica, sans-serif;
}
@media print {
body{
background-color: #fff;
color: #000;
}
h1, h2, h3, h4, h5{
page-break-after: avoid; /* keep headers with bodies */
}
}
a:link, a:visited, a:active{
color: #4e6a91;
text-decoration: none;
}
a:hover{
color: #a5cfe7;
}
@media print {
a:link, a:visited, a:active, a:hover{
color: #000;
}
}
.strongP{
font-family: Arial, Helvetica Neue, Helvetica, sans-serif;
font-weight: 600;
}
.container{
background-color: #f0f8fc;
color: #4e6a91;
width: 900px;
margin: 0 auto;
padding: 12px;
}
@media print {
.container{
background-color: #fff;
color: #000;
}
}
.header{
width: 900px;
height: 60px;
background-color: #4e6a91;
color: #eff6fb;
margin: 0 auto;
padding: 12px;
margin-top: 25px;
text-align: center;
vertical-align: middle;
line-height: 66px;
font-family: Arial, Helvetica Neue, Helvetica, sans-serif;
font-weight: 600;
font-size: 22px;
}
@media print {
.header{
margin: 0;
}
}
.typeHeader{
width: 900px;
height: 30px;
background-color: #4e6a91;
color: #eff6fb;
margin: 0 auto;
padding: 12px;
margin-top: 25px;
text-align: left;
line-height: 36px;
font-family: Arial, Helvetica Neue, Helvetica, sans-serif;
font-weight: 600;
font-size: 22px;
position:relative;
left: -12px;
}
@media print {
.typeHeader{
margin: 0;
page-break-after: avoid; /* keep headers with bodies */
page-break-before: always; /* force types onto new page */
}
}
.vulnDescrip{
font-size: 10pt;
}
.findingHeader{
margin-bottom: 8px;
}
.finding{
margin-left: 20px;
margin-bottom: 20px;
font-size: 10pt;
}
.sectHeader{
margin-bottom: 5px;
font-size: 12pt;
font-family: Arial, Helvetica Neue, Helvetica, sans-serif;
font-weight: 600;
}
.sectBody{
width: 860px;
font-size: 10pt;
word-wrap: break-word;
font-family: Arial, Helvetica Neue, Helvetica, sans-serif;
}
@media print {
/* keep headers with bodies */
.findingHeader, .sectHeader{
page-break-after: avoid;
}
.finding, .sectBody{
page-break-before: avoid;
}
}
.code{
font-family: Consolas, Arial, Sans-Serif;
font-size: 10pt;
border: 1px solid #333;
width: 850px;
margin-top: 6px;
margin-bottom: 6px;
padding: 6px;
max-height: 300px;
overflow-y: scroll;
overflow-x: scroll;
word-wrap: normal;
}
pre{
margin: 0;
font-family: Arial, Helvetica, sans-serif;
white-space: pre-wrap; /* CSS 3 */
white-space: -moz-pre-wrap; /* Mozilla, since 1999 */
white-space: -pre-wrap; /* Opera 4-6 */
white-space: -o-pre-wrap; /* Opera 7 */
word-wrap: break-word; /* Internet Explorer 5.5+ */
}
@media print {
.code {
/* paper can't scroll: */
overflow-y: unset;
overflow-x: unset;
max-height: none;
/* same as 'pre': */
word-wrap: break-word;
/* try to keep it contiguous and with header: */
page-break-inside: avoid;
page-break-before: avoid;
}
}
.footer{
width: 900px;
margin: 0 auto;
margin-top: 10px;
margin-bottom: 20px;
color: #666666;
font-size: 14px;
font-family: Arial, Helvetica, sans-serif;
font-weight: 400;
text-align: center;
}
@media print {
.footer{
page-break-inside: avoid;
background-color: #e5e5e5;
}
}
hr{
border: 0;
height: 1px;
background-image: -webkit-linear-gradient(left, rgba(102,102,102,0), rgba(102,102,102,0.75), rgba(102,102,102,0));
background-image: -moz-linear-gradient(left, rgba(102,102,102,0), rgba(102,102,102,0.75), rgba(102,102,102,0));
background-image: -ms-linear-gradient(left, rgba(102,102,102,0), rgba(102,102,102,0.75), rgba(102,102,102,0));
background-image: -o-linear-gradient(left, rgba(102,102,102,0), rgba(102,102,102,0.75), rgba(102,102,102,0));
}
ol.toc{
margin-left:30px;
}
ol.toc > li{
font-size: 14pt;
margin-bottom: 6px;
word-wrap: break-word;
}
ol.vulns > li{
font-weight: normal;
font-size: 10pt;
word-wrap: break-word;
}
@media print {
ol.vulns{
page-break-before: avoid; /* keep with opening text */
}
ol.toc > li{
page-break-inside: avoid; /* try to keep each TOC entry contig. */
}
ol.vulns > li{
page-break-before: avoid; /* keep with ol "header" */
}
}
</style>
</head>
<body>
<div class="header">
<div>Security Report for <%=h(@app.name)%></div>
</div>
<div class="container">
<div style="margin-bottom:30px;">
<p>The below report outlines vulnerability and informational findings that were discovered via a mixture of automated scanning and manual security penetration testing. It is possible that there are other vulnerabilities that were not discovered during testing and are therefore not included on this report. Not all instances of each vulnerability type were enumerated.</p>
<p>The attack vector and evidence of vulnerability associated with each item is listed with a description of the vulnerability. Suggested remediation steps and additional educational resources for each class of vulnerability are also provided.</p>
<p class="strongP">Please note that this is not a comprehensive list of vulnerabilities in your application. Similar and additional vulnerabilities outside of this report may exist. Please look through your entire codebase for additional security issues.</p>
</div>
<hr>
<h1>Contents</h1>
<div style="margin-bottom:30px;">
<% count = 1 %>
<ol class="toc">
<% @test.verified_vulns.uniq{ |v| v.type_str }.each do |v| %>
<li>
<a href='#vuln<%=count%>'><%=h(v.type_str)%> Vulnerability</a>
<ol class="vulns">
<% findingCount = 1 %>
<% @test.verified_vulns.each do |vv| %>
<% next if vv.type_str != v.type_str %>
<% if !vv.descriptor.nil? && vv.descriptor != "" %>
<li><a href='#vbody_<%=vv.id%>'><%=vv.descriptor%></a></li>
<% else %>
<li><a href='#vbody_<%=vv.id%>'>Finding <%=findingCount%></a></li>
<% end %>
<% findingCount += 1 %>
<% end %>
</ol>
</li>
<% count += 1 %>
<% end %>
</ol>
</div>
<% count = 1 %>
<% @test.verified_vulns.uniq{ |v| v.type_str }.each do |v| %>
<div class="typeHeader">
<a id='vuln<%=count%>'><%=h(v.type_str)%></a>
</div>
<% if !v.type_html.nil? %>
<h3>Issue Description</h3>
<div class="vulnDescrip">
<%=v.type_html%>
<% if !v.cwe_mapping.nil? %>
<b>CWE</b>: <a href="<%=v.cwe_link%>" target="_blank"><%=v.cwe_mapping%></a>
<% end %>
</div>
<h3>Risk Level / Priority</h3>
<div class="vulnDescrip">
<%=vulnPriorityToString(v.vuln_priority, @test.record_type)%>
</div>
<% end %>
<% typeCount = 0 %>
<% @test.verified_vulns.each do |vv| %>
<% next if vv.type_str != v.type_str %>
<% typeCount += 1 %>
<% end %>
<% findingCount = 1 %>
<% @test.verified_vulns.each do |vv| %>
<% next if vv.type_str != v.type_str %>
<h3 class="findingHeader" id="vbody_<%=vv.id%>">Finding <%=findingCount%> of <%=typeCount%></h3>
<div class="finding">
<% if (vv.vuln_priority != v.vuln_priority) || vv.vulntype == 0 %>
<h4 class="sectHeader">Risk Level / Priority</h4>
<div class="sectBody"><%=vulnPriorityToString(vv.vuln_priority, @test.record_type)%></div>
<% end %>
<% vv.sections.sort{|x,y| x.listOrder <=> y.listOrder }.each do |sec| %>
<%=sec.html_formatted%>
<% end %>
</div>
<% findingCount += 1 %>
<% if findingCount <= typeCount %>
<hr>
<% end %>
<% end %>
<% count += 1 %>
<% end %>
</div>
<div class="footer">
Report does not represent in any way a guarantee of security
<br /><br />
Information contained in this report may be confidential
<br /><br />
Generated <%=Time.now.strftime('%m/%d/%Y at %I:%M %p')%>
</div>
</body>
</html>