-
Notifications
You must be signed in to change notification settings - Fork 1
/
report_template.html
131 lines (130 loc) · 2.62 KB
/
report_template.html
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
<!DOCTYPE html>
<html lang="en">
<head>
<style>
body {
font-family: Arial, Helvetica, sans-serif;
padding: 8px;
}
table {
width: 100%;
border-collapse: collapse;
}
td, th {
text-align: left;
border: 1px solid #ddd;
padding: 8px;
}
tr:nth-child(even){
background-color: #f2f2f2;
}
tr:hover {
background-color: #ddd;
}
th {
padding-top: 12px;
padding-bottom: 12px;
text-align: left;
background-color: #04AA6D;
color: white;
}
.createdby {
background-color: #F2F2F2;
padding: 8px;
}
.image {
background-color: #F2F2F2;
border-radius: 20px;
height:40px;
padding-left:20px;
padding-right:20px;
}
h2 {
text-align: center;
}
</style>
</head>
<body>
<h1>Container Security Report</h1>
Generated On {{.GeneratedOn}}<br/>
Last scan completed on: {{.Completed}} <small>({{.Difference}} ago)</small> <br/>
{{range .Registries}}
<hr/>
<h2>Registry: <b>{{.Name}}</b> </h2>
{{range .Images}}
<br/>
<div class="image" style="display: table; height: 40px; overflow: hidden;">
<div style="display: table-cell; vertical-align: middle;">
<div >
{{.Name}}
</div>
</div>
</div>
<ul>
<li>{{range .Layers}}
Layer ID: {{.ID}}</br>
Create at: {{.CreatedAt}}</br>
Created with:<br/>
<div class="createdby">{{.CreatedBy}}</div>
{{if .Malware}}
<h3>Malware Findings:</h3>
<table>
<tr>
<th>Malware:</th>
<th>File</th>
</tr>
{{range .Malware}}
<tr>
<td><a href="{{.URL}}">{{.Name}}</a></td>
<td>{{.Filename}}</td>
</tr>
{{end}}
</table>
{{end}}
{{if .Package}}
<h3>Vulnerability Findings:</h3>
<table>
<tr>
<th>Module/Package</th>
<th>Severity</th>
<th>Vulnerabilities</th>
</tr>
{{range .Package}}
{{$name := .Name}}
{{$version := .Version}}
{{range .Vulnerabilities}}
<tr>
<td>{{$name}}<br/><small>{{$version}}</small></td>
<td>{{.Severity}}</td>
<td><a href="{{.Link}}">{{.Name}}</a></td>
</tr>
{{end}}
{{end}}
</table>
{{end}}
{{if .Contents}}
<h3>Content Findings:</h3>
<table>
<tr>
<th>Severity</th>
<th>Rule</th>
<th>File</th>
</tr>
{{range .Contents}}
<tr>
<td>{{.Severity}}</td>
<td>{{.Rule}}<br/><small>{{.Description}}</small></td>
<td>{{.Filename}}</td>
</tr>
{{end}}
</table>
{{end}}
{{end}}
</li>
</ul>
{{end}}
{{end}}
<hr/>
<small>Report generated using <a href="https://github.com/mpkondrashin/cs-report">Container Security Report Project</a> by <a href="mailto:mkondrashin@gmail.com">Mikhail Kondrashin</a></small>
</body>
</html>