coverme-scanner 2.0.2 → 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +27 -4
- package/dist/analyzers/ast-analyzer.d.ts +29 -0
- package/dist/analyzers/ast-analyzer.d.ts.map +1 -0
- package/dist/analyzers/ast-analyzer.js +194 -0
- package/dist/analyzers/ast-analyzer.js.map +1 -0
- package/dist/analyzers/duplication-detector.d.ts +27 -0
- package/dist/analyzers/duplication-detector.d.ts.map +1 -0
- package/dist/analyzers/duplication-detector.js +169 -0
- package/dist/analyzers/duplication-detector.js.map +1 -0
- package/dist/analyzers/index.d.ts +5 -0
- package/dist/analyzers/index.d.ts.map +1 -0
- package/dist/analyzers/index.js +10 -0
- package/dist/analyzers/index.js.map +1 -0
- package/dist/analyzers/stride-analyzer.d.ts +20 -0
- package/dist/analyzers/stride-analyzer.d.ts.map +1 -0
- package/dist/analyzers/stride-analyzer.js +166 -0
- package/dist/analyzers/stride-analyzer.js.map +1 -0
- package/dist/cli/index.js +4 -2
- package/dist/cli/index.js.map +1 -1
- package/dist/index.d.ts +7 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +16 -0
- package/dist/index.js.map +1 -0
- package/dist/prompts/advanced-analysis.md +199 -0
- package/dist/prompts/orchestration.md +102 -3
- package/dist/report/generator.js +1 -1
- package/dist/report/generator.js.map +1 -1
- package/dist/report/index.d.ts +3 -2
- package/dist/report/index.d.ts.map +1 -1
- package/dist/report/index.js +16 -4
- package/dist/report/index.js.map +1 -1
- package/dist/report/pdf-generator.d.ts +23 -0
- package/dist/report/pdf-generator.d.ts.map +1 -0
- package/dist/report/pdf-generator.js +405 -0
- package/dist/report/pdf-generator.js.map +1 -0
- package/dist/templates/report-minimal.html +429 -0
- package/dist/templates/report.html +147 -147
- package/package.json +30 -3
|
@@ -0,0 +1,429 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8">
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
|
+
<title>{{projectName}} - Security Assessment Report</title>
|
|
7
|
+
<style>
|
|
8
|
+
* {
|
|
9
|
+
margin: 0;
|
|
10
|
+
padding: 0;
|
|
11
|
+
box-sizing: border-box;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
body {
|
|
15
|
+
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
|
|
16
|
+
font-size: 14px;
|
|
17
|
+
line-height: 1.6;
|
|
18
|
+
color: #1a1a1a;
|
|
19
|
+
background: #ffffff;
|
|
20
|
+
padding: 40px 20px;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.container {
|
|
24
|
+
max-width: 1000px;
|
|
25
|
+
margin: 0 auto;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/* Header */
|
|
29
|
+
.header {
|
|
30
|
+
border-bottom: 2px solid #e0e0e0;
|
|
31
|
+
padding-bottom: 24px;
|
|
32
|
+
margin-bottom: 32px;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.header h1 {
|
|
36
|
+
font-size: 24px;
|
|
37
|
+
font-weight: 600;
|
|
38
|
+
color: #1a1a1a;
|
|
39
|
+
margin-bottom: 8px;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.header .meta {
|
|
43
|
+
font-size: 13px;
|
|
44
|
+
color: #666;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/* Summary Stats */
|
|
48
|
+
.summary {
|
|
49
|
+
display: grid;
|
|
50
|
+
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
|
|
51
|
+
gap: 16px;
|
|
52
|
+
margin-bottom: 32px;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.summary-card {
|
|
56
|
+
border: 1px solid #e0e0e0;
|
|
57
|
+
border-radius: 4px;
|
|
58
|
+
padding: 16px;
|
|
59
|
+
background: #fafafa;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.summary-card .label {
|
|
63
|
+
font-size: 11px;
|
|
64
|
+
font-weight: 600;
|
|
65
|
+
text-transform: uppercase;
|
|
66
|
+
color: #666;
|
|
67
|
+
letter-spacing: 0.5px;
|
|
68
|
+
margin-bottom: 8px;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.summary-card .value {
|
|
72
|
+
font-size: 32px;
|
|
73
|
+
font-weight: 700;
|
|
74
|
+
color: #1a1a1a;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.summary-card.critical .value { color: #dc2626; }
|
|
78
|
+
.summary-card.high .value { color: #ea580c; }
|
|
79
|
+
.summary-card.medium .value { color: #f59e0b; }
|
|
80
|
+
.summary-card.low .value { color: #3b82f6; }
|
|
81
|
+
|
|
82
|
+
/* Findings */
|
|
83
|
+
.findings-section {
|
|
84
|
+
margin-top: 32px;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.findings-section h2 {
|
|
88
|
+
font-size: 18px;
|
|
89
|
+
font-weight: 600;
|
|
90
|
+
color: #1a1a1a;
|
|
91
|
+
margin-bottom: 16px;
|
|
92
|
+
padding-bottom: 8px;
|
|
93
|
+
border-bottom: 1px solid #e0e0e0;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.finding {
|
|
97
|
+
border: 1px solid #e0e0e0;
|
|
98
|
+
border-radius: 4px;
|
|
99
|
+
margin-bottom: 16px;
|
|
100
|
+
background: #ffffff;
|
|
101
|
+
overflow: hidden;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.finding-header {
|
|
105
|
+
padding: 16px;
|
|
106
|
+
display: flex;
|
|
107
|
+
align-items: center;
|
|
108
|
+
gap: 12px;
|
|
109
|
+
background: #fafafa;
|
|
110
|
+
border-bottom: 1px solid #e0e0e0;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.severity-badge {
|
|
114
|
+
font-size: 11px;
|
|
115
|
+
font-weight: 600;
|
|
116
|
+
text-transform: uppercase;
|
|
117
|
+
padding: 4px 10px;
|
|
118
|
+
border-radius: 3px;
|
|
119
|
+
letter-spacing: 0.3px;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.severity-badge.critical {
|
|
123
|
+
background: #fef2f2;
|
|
124
|
+
color: #dc2626;
|
|
125
|
+
border: 1px solid #fecaca;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.severity-badge.high {
|
|
129
|
+
background: #fff7ed;
|
|
130
|
+
color: #ea580c;
|
|
131
|
+
border: 1px solid #fed7aa;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
.severity-badge.medium {
|
|
135
|
+
background: #fffbeb;
|
|
136
|
+
color: #d97706;
|
|
137
|
+
border: 1px solid #fde68a;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
.severity-badge.low {
|
|
141
|
+
background: #eff6ff;
|
|
142
|
+
color: #2563eb;
|
|
143
|
+
border: 1px solid #bfdbfe;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
.finding-title {
|
|
147
|
+
flex: 1;
|
|
148
|
+
font-size: 14px;
|
|
149
|
+
font-weight: 600;
|
|
150
|
+
color: #1a1a1a;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
.finding-location {
|
|
154
|
+
font-size: 12px;
|
|
155
|
+
color: #666;
|
|
156
|
+
font-family: 'SF Mono', Monaco, 'Courier New', monospace;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
.finding-body {
|
|
160
|
+
padding: 24px;
|
|
161
|
+
display: block;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
/* Content Sections */
|
|
165
|
+
.section {
|
|
166
|
+
margin-bottom: 24px;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
.section-label {
|
|
170
|
+
font-size: 12px;
|
|
171
|
+
font-weight: 600;
|
|
172
|
+
text-transform: uppercase;
|
|
173
|
+
color: #666;
|
|
174
|
+
letter-spacing: 0.5px;
|
|
175
|
+
margin-bottom: 8px;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
.section-content {
|
|
179
|
+
color: #1a1a1a;
|
|
180
|
+
line-height: 1.7;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
.section-content p {
|
|
184
|
+
margin: 0;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
/* Code Block */
|
|
188
|
+
.code-block {
|
|
189
|
+
background: #f5f5f5;
|
|
190
|
+
border: 1px solid #e0e0e0;
|
|
191
|
+
border-radius: 4px;
|
|
192
|
+
padding: 16px;
|
|
193
|
+
margin: 16px 0;
|
|
194
|
+
overflow-x: auto;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
.code-block code {
|
|
198
|
+
font-family: 'SF Mono', Monaco, 'Courier New', monospace;
|
|
199
|
+
font-size: 13px;
|
|
200
|
+
color: #1a1a1a;
|
|
201
|
+
white-space: pre;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
/* Recommendation Box */
|
|
205
|
+
.recommendation {
|
|
206
|
+
background: #f0fdf4;
|
|
207
|
+
border: 1px solid #bbf7d0;
|
|
208
|
+
border-radius: 4px;
|
|
209
|
+
padding: 16px;
|
|
210
|
+
margin-top: 16px;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
.recommendation .section-label {
|
|
214
|
+
color: #166534;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
/* Footer */
|
|
218
|
+
.footer {
|
|
219
|
+
margin-top: 48px;
|
|
220
|
+
padding-top: 24px;
|
|
221
|
+
border-top: 1px solid #e0e0e0;
|
|
222
|
+
text-align: center;
|
|
223
|
+
font-size: 12px;
|
|
224
|
+
color: #999;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
/* Print Styles */
|
|
228
|
+
@media print {
|
|
229
|
+
body {
|
|
230
|
+
padding: 0;
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
.finding {
|
|
234
|
+
page-break-inside: avoid;
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
</style>
|
|
238
|
+
</head>
|
|
239
|
+
<body>
|
|
240
|
+
<div class="container">
|
|
241
|
+
<!-- Header -->
|
|
242
|
+
<div class="header">
|
|
243
|
+
<h1>{{projectName}}</h1>
|
|
244
|
+
<div class="meta">Security Assessment Report · Generated {{scanDate}}</div>
|
|
245
|
+
</div>
|
|
246
|
+
|
|
247
|
+
<!-- Summary -->
|
|
248
|
+
<div class="summary">
|
|
249
|
+
{{#if criticalCount}}
|
|
250
|
+
<div class="summary-card critical">
|
|
251
|
+
<div class="label">Critical</div>
|
|
252
|
+
<div class="value">{{criticalCount}}</div>
|
|
253
|
+
</div>
|
|
254
|
+
{{/if}}
|
|
255
|
+
{{#if highCount}}
|
|
256
|
+
<div class="summary-card high">
|
|
257
|
+
<div class="label">High</div>
|
|
258
|
+
<div class="value">{{highCount}}</div>
|
|
259
|
+
</div>
|
|
260
|
+
{{/if}}
|
|
261
|
+
{{#if mediumCount}}
|
|
262
|
+
<div class="summary-card medium">
|
|
263
|
+
<div class="label">Medium</div>
|
|
264
|
+
<div class="value">{{mediumCount}}</div>
|
|
265
|
+
</div>
|
|
266
|
+
{{/if}}
|
|
267
|
+
{{#if lowCount}}
|
|
268
|
+
<div class="summary-card low">
|
|
269
|
+
<div class="label">Low</div>
|
|
270
|
+
<div class="value">{{lowCount}}</div>
|
|
271
|
+
</div>
|
|
272
|
+
{{/if}}
|
|
273
|
+
</div>
|
|
274
|
+
|
|
275
|
+
<!-- Critical Findings -->
|
|
276
|
+
{{#if criticalFindings}}
|
|
277
|
+
<div class="findings-section">
|
|
278
|
+
<h2>Critical Findings</h2>
|
|
279
|
+
{{#each criticalFindings}}
|
|
280
|
+
<div class="finding">
|
|
281
|
+
<div class="finding-header">
|
|
282
|
+
<span class="severity-badge critical">Critical</span>
|
|
283
|
+
<span class="finding-title">{{id}} - {{title}}</span>
|
|
284
|
+
<span class="finding-location">{{file}}:{{line}}</span>
|
|
285
|
+
</div>
|
|
286
|
+
<div class="finding-body">
|
|
287
|
+
<div class="section">
|
|
288
|
+
<div class="section-label">Description</div>
|
|
289
|
+
<div class="section-content">
|
|
290
|
+
<p>{{description}}</p>
|
|
291
|
+
</div>
|
|
292
|
+
</div>
|
|
293
|
+
|
|
294
|
+
{{#if code}}
|
|
295
|
+
<div class="code-block">
|
|
296
|
+
<code>{{code}}</code>
|
|
297
|
+
</div>
|
|
298
|
+
{{/if}}
|
|
299
|
+
|
|
300
|
+
<div class="recommendation">
|
|
301
|
+
<div class="section-label">Recommendation</div>
|
|
302
|
+
<div class="section-content">
|
|
303
|
+
<p>{{recommendation}}</p>
|
|
304
|
+
</div>
|
|
305
|
+
</div>
|
|
306
|
+
</div>
|
|
307
|
+
</div>
|
|
308
|
+
{{/each}}
|
|
309
|
+
</div>
|
|
310
|
+
{{/if}}
|
|
311
|
+
|
|
312
|
+
<!-- High Findings -->
|
|
313
|
+
{{#if highFindings}}
|
|
314
|
+
<div class="findings-section">
|
|
315
|
+
<h2>High Findings</h2>
|
|
316
|
+
{{#each highFindings}}
|
|
317
|
+
<div class="finding">
|
|
318
|
+
<div class="finding-header">
|
|
319
|
+
<span class="severity-badge high">High</span>
|
|
320
|
+
<span class="finding-title">{{id}} - {{title}}</span>
|
|
321
|
+
<span class="finding-location">{{file}}:{{line}}</span>
|
|
322
|
+
</div>
|
|
323
|
+
<div class="finding-body">
|
|
324
|
+
<div class="section">
|
|
325
|
+
<div class="section-label">Description</div>
|
|
326
|
+
<div class="section-content">
|
|
327
|
+
<p>{{description}}</p>
|
|
328
|
+
</div>
|
|
329
|
+
</div>
|
|
330
|
+
|
|
331
|
+
{{#if code}}
|
|
332
|
+
<div class="code-block">
|
|
333
|
+
<code>{{code}}</code>
|
|
334
|
+
</div>
|
|
335
|
+
{{/if}}
|
|
336
|
+
|
|
337
|
+
<div class="recommendation">
|
|
338
|
+
<div class="section-label">Recommendation</div>
|
|
339
|
+
<div class="section-content">
|
|
340
|
+
<p>{{recommendation}}</p>
|
|
341
|
+
</div>
|
|
342
|
+
</div>
|
|
343
|
+
</div>
|
|
344
|
+
</div>
|
|
345
|
+
{{/each}}
|
|
346
|
+
</div>
|
|
347
|
+
{{/if}}
|
|
348
|
+
|
|
349
|
+
<!-- Medium Findings -->
|
|
350
|
+
{{#if mediumFindings}}
|
|
351
|
+
<div class="findings-section">
|
|
352
|
+
<h2>Medium Findings</h2>
|
|
353
|
+
{{#each mediumFindings}}
|
|
354
|
+
<div class="finding">
|
|
355
|
+
<div class="finding-header">
|
|
356
|
+
<span class="severity-badge medium">Medium</span>
|
|
357
|
+
<span class="finding-title">{{id}} - {{title}}</span>
|
|
358
|
+
<span class="finding-location">{{file}}:{{line}}</span>
|
|
359
|
+
</div>
|
|
360
|
+
<div class="finding-body">
|
|
361
|
+
<div class="section">
|
|
362
|
+
<div class="section-label">Description</div>
|
|
363
|
+
<div class="section-content">
|
|
364
|
+
<p>{{description}}</p>
|
|
365
|
+
</div>
|
|
366
|
+
</div>
|
|
367
|
+
|
|
368
|
+
{{#if code}}
|
|
369
|
+
<div class="code-block">
|
|
370
|
+
<code>{{code}}</code>
|
|
371
|
+
</div>
|
|
372
|
+
{{/if}}
|
|
373
|
+
|
|
374
|
+
<div class="recommendation">
|
|
375
|
+
<div class="section-label">Recommendation</div>
|
|
376
|
+
<div class="section-content">
|
|
377
|
+
<p>{{recommendation}}</p>
|
|
378
|
+
</div>
|
|
379
|
+
</div>
|
|
380
|
+
</div>
|
|
381
|
+
</div>
|
|
382
|
+
{{/each}}
|
|
383
|
+
</div>
|
|
384
|
+
{{/if}}
|
|
385
|
+
|
|
386
|
+
<!-- Low Findings -->
|
|
387
|
+
{{#if lowFindings}}
|
|
388
|
+
<div class="findings-section">
|
|
389
|
+
<h2>Low Findings</h2>
|
|
390
|
+
{{#each lowFindings}}
|
|
391
|
+
<div class="finding">
|
|
392
|
+
<div class="finding-header">
|
|
393
|
+
<span class="severity-badge low">Low</span>
|
|
394
|
+
<span class="finding-title">{{id}} - {{title}}</span>
|
|
395
|
+
<span class="finding-location">{{file}}:{{line}}</span>
|
|
396
|
+
</div>
|
|
397
|
+
<div class="finding-body">
|
|
398
|
+
<div class="section">
|
|
399
|
+
<div class="section-label">Description</div>
|
|
400
|
+
<div class="section-content">
|
|
401
|
+
<p>{{description}}</p>
|
|
402
|
+
</div>
|
|
403
|
+
</div>
|
|
404
|
+
|
|
405
|
+
{{#if code}}
|
|
406
|
+
<div class="code-block">
|
|
407
|
+
<code>{{code}}</code>
|
|
408
|
+
</div>
|
|
409
|
+
{{/if}}
|
|
410
|
+
|
|
411
|
+
<div class="recommendation">
|
|
412
|
+
<div class="section-label">Recommendation</div>
|
|
413
|
+
<div class="section-content">
|
|
414
|
+
<p>{{recommendation}}</p>
|
|
415
|
+
</div>
|
|
416
|
+
</div>
|
|
417
|
+
</div>
|
|
418
|
+
</div>
|
|
419
|
+
{{/each}}
|
|
420
|
+
</div>
|
|
421
|
+
{{/if}}
|
|
422
|
+
|
|
423
|
+
<!-- Footer -->
|
|
424
|
+
<div class="footer">
|
|
425
|
+
Generated by CoverMe Security Scanner
|
|
426
|
+
</div>
|
|
427
|
+
</div>
|
|
428
|
+
</body>
|
|
429
|
+
</html>
|