1 | <!doctype html>
|
2 | <html lang="en">
|
3 |
|
4 | <head>
|
5 | <meta charset="utf-8">
|
6 | <meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover">
|
7 |
|
8 | <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">
|
9 |
|
10 | <title>Yarn Audit Report</title>
|
11 | <meta name="description" content="{{summary.vulnerabilities}} known vulnerabilities found.">
|
12 |
|
13 | <style>
|
14 | label {
|
15 | position: relative;
|
16 |
|
17 | display: block;
|
18 | padding-left: 30px;
|
19 |
|
20 | cursor: pointer;
|
21 | }
|
22 |
|
23 | label:before {
|
24 | position: absolute;
|
25 | top: 50%;
|
26 | left: 10px;
|
27 |
|
28 | width: 0;
|
29 | height: 0;
|
30 |
|
31 | border-left: 8px solid black;
|
32 | border-top: 8px solid transparent;
|
33 | border-bottom: 8px solid transparent;
|
34 | margin-top: -8px;
|
35 |
|
36 | content: "";
|
37 | }
|
38 |
|
39 | input[type=checkbox] {
|
40 | visibility: hidden;
|
41 | }
|
42 |
|
43 | input[type=checkbox]:checked ~ h3 label:before {
|
44 | border-left: 8px solid transparent;
|
45 | border-top: 8px solid black;
|
46 | border-right: 8px solid transparent;
|
47 |
|
48 | margin-left: -4px;
|
49 | margin-top: -4px
|
50 | }
|
51 |
|
52 | .collapsible-wrapper {
|
53 | max-height: 0;
|
54 | padding-left: 30px;
|
55 | overflow-y: auto;
|
56 |
|
57 | transition: max-height 0.15s ease;
|
58 | }
|
59 |
|
60 | input[type=checkbox]:checked ~ h3 ~ .collapsible-wrapper {
|
61 | max-height: 500px;
|
62 | }
|
63 | </style>
|
64 | </head>
|
65 |
|
66 | <body>
|
67 | <div class="container">
|
68 | <div class="row mb-3">
|
69 | <div class="col-md text-center">
|
70 | <h1>Yarn Audit Report</h1>
|
71 |
|
72 | <h3>
|
73 | {{#if showUnique}}
|
74 | {{vulnerabilities.length}} unique from
|
75 | {{/if}}
|
76 | {{summary.vulnerabilities}} known vulnerabilities |
|
77 | {{summary.totalDependencies}} dependencies
|
78 | </h3>
|
79 | </div>
|
80 | </div>
|
81 | <div class="row">
|
82 | {{#each vulnerabilities}}
|
83 | <div class="col-md-12">
|
84 | <div class="card mb-3">
|
85 | <div class="card-body">
|
86 | <h1 class="card-title">
|
87 | <span class="badge badge-{{severityClass severity}}">{{severity}}</span>
|
88 | {{title}}
|
89 | </h1>
|
90 | <div class="row">
|
91 | <div class="col-md-6">
|
92 | <ul>
|
93 | <li>Module:
|
94 | <a href="https://npmjs.com/package/{{module_name}}">{{module_name}}</a>
|
95 | </li>
|
96 | {{#if version}}
|
97 | <li>Installed version: {{version}}</li>
|
98 | {{/if}}
|
99 | <li>Published: {{date created}}</li>
|
100 | <li>Reported by: {{reported_by.name}}</li>
|
101 | <li>{{cwe}}</li>
|
102 | {{#each cves}}
|
103 | <li>{{this}}</li>
|
104 | {{/each}}
|
105 | </ul>
|
106 | </div>
|
107 | <div class="col-md-6">
|
108 | <ul>
|
109 | <li>Vulnerable: {{vulnerable_versions}}</li>
|
110 | <li>Patched: {{patched_versions}}</li>
|
111 | <li>CVSS: {{metadata.exploitability}}</li>
|
112 | </ul>
|
113 | </div>
|
114 | </div>
|
115 | <h3>Overview</h3>
|
116 | <div class="card-text">{{{markdown overview}}}</div>
|
117 |
|
118 | {{#if recommendation}}
|
119 | <h3>Remediation</h3>
|
120 | <div class="card-text">{{{markdown recommendation}}}</div>
|
121 | {{/if}}
|
122 | {{#if references}}
|
123 | <h3>References</h3>
|
124 | <div class="card-text">{{{markdown references}}}</div>
|
125 | {{/if}}
|
126 | {{#if paths.length}}
|
127 | <input id="vulnerability-reasons-{{@index}}" type="checkbox">
|
128 | <h3><label for="vulnerability-reasons-{{@index}}">Reasons this module exists</label></h3>
|
129 | <div class="mb-3 collapsible-wrapper">
|
130 | {{#each paths}}
|
131 | <div class="card-text">
|
132 | <code>{{this}}</code>
|
133 | </div>
|
134 | {{/each}}
|
135 | </div>
|
136 | {{/if}}
|
137 |
|
138 | <a href="{{url}}" class="btn btn-primary">More about this vulnerability</a>
|
139 | </div>
|
140 | </div>
|
141 | </div>
|
142 | {{else}}
|
143 | <div class="col-md-12 alert alert-success">
|
144 | Congrats!!! No vulnerabilities have been found.
|
145 | </div>
|
146 | {{/each}}
|
147 |
|
148 | <h6 class="col-md-12 mb-3 text-right">Report generated at {{date reportDate}}.</h6>
|
149 | </div>
|
150 | </div>
|
151 | </body>
|
152 |
|
153 | </html>
|
154 |
|
\ | No newline at end of file |