-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathdebug.html
More file actions
421 lines (393 loc) · 22 KB
/
Copy pathdebug.html
File metadata and controls
421 lines (393 loc) · 22 KB
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
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>SBOM Play - Debug Tools</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet">
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css" rel="stylesheet">
<link href="css/style.css?v=0.2.1" rel="stylesheet">
<link href="css/themes.css?v=0.2.1" rel="stylesheet">
<script src="js/theme-manager.js?v=0.2.1&cb=1777494400000"></script>
<script src="js/analytics.js?v=0.2.1&cb=1777494400000"></script>
<script defer data-domain="cyfinoid.github.io" src="https://plausible.io/js/script.outbound-links.js"></script>
</head>
<body>
<a class="visually-hidden-focusable" href="#main">Skip to content</a>
<!-- Navigation -->
<nav class="navbar navbar-expand-lg navbar-dark bg-primary">
<div class="container">
<a class="navbar-brand" href="index.html">
<i class="fas fa-cubes me-2"></i>SBOM Play
</a>
<div class="navbar-actions">
<button class="btn btn-outline-secondary btn-sm theme-toggle" title="Toggle theme">
<i class="fas fa-sun"></i>
</button>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
</div>
<div class="collapse navbar-collapse" id="navbarNav">
<div class="navbar-nav ms-auto">
<a class="nav-link" href="index.html">Home</a>
<a class="nav-link" href="licenses.html">License</a>
<a class="nav-link" href="vuln.html">Vulns</a>
<a class="nav-link" href="audit.html">Audit</a>
<a class="nav-link" href="findings.html">Findings</a>
<a class="nav-link" href="insights.html">Insights</a>
<a class="nav-link" href="insights-agent.html">Agent</a>
<a class="nav-link" href="deps.html">Deps</a>
<a class="nav-link" href="repos.html">Repos</a>
<a class="nav-link" href="authors.html">Authors</a>
<a class="nav-link" href="settings.html">Settings</a>
<a class="nav-link" href="about.html">About</a>
</div>
</div>
</div>
</nav>
<!-- Main Content -->
<div class="container mt-4" id="main">
<h2 class="text-center mb-3">
<i class="fas fa-cubes me-2"></i>SBOM Play
</h2>
<!-- Badges Section -->
<!-- Header -->
<div class="row mb-4">
<div class="col-12">
<div class="d-flex justify-content-between align-items-center">
<div>
<h1><i class="fas fa-bug me-2"></i>Debug Tools</h1>
<p class="text-muted">Advanced debugging and data management tools</p>
</div>
<div>
<a href="settings.html" class="btn btn-outline-primary">
<i class="fas fa-arrow-left me-2"></i>Back to Settings
</a>
</div>
</div>
</div>
</div>
<div class="alert alert-warning">
<i class="fas fa-exclamation-triangle me-2"></i>
<strong>Advanced Tools:</strong> These tools are intended for debugging and advanced data management.
Use them carefully as they may trigger intensive API queries or modify stored data.
</div>
<!-- Storage Diagnostics -->
<div class="card mb-4">
<div class="card-header">
<h5 class="mb-0">
<i class="fas fa-hdd me-2"></i>Storage Diagnostics
</h5>
</div>
<div class="card-body">
<div class="alert alert-info">
<i class="fas fa-info-circle me-2"></i>
<strong>Advanced Storage Tools:</strong> These tools help diagnose storage issues,
test quota limits, and migrate data between storage formats.
</div>
<div id="debugStorageStatus" class="mb-3">
<!-- Storage status will be populated here -->
</div>
<div class="d-flex flex-wrap gap-2">
<button class="btn btn-outline-info btn-sm" data-action="testStorageQuota">
<i class="fas fa-vial me-2"></i>Test Storage Quota
</button>
<button class="btn btn-outline-secondary btn-sm" data-action="migrateOldData">
<i class="fas fa-sync me-2"></i>Migrate Legacy Data
</button>
</div>
</div>
</div>
<!-- Advanced Cache Management -->
<div class="card mb-4">
<div class="card-header">
<h5 class="mb-0">
<i class="fas fa-database me-2"></i>Advanced Cache Management
</h5>
</div>
<div class="card-body">
<div class="alert alert-info">
<i class="fas fa-info-circle me-2"></i>
<strong>Individual Cache Export/Import:</strong> Export or import specific cache databases
for troubleshooting or selective data recovery.
</div>
<div class="row mb-3">
<div class="col-md-6">
<h6 class="small text-muted mb-2">Individual Cache Exports</h6>
<div class="d-flex flex-wrap gap-2">
<button class="btn btn-outline-secondary btn-sm" data-action="exportAuthorsCache">
<i class="fas fa-users me-2"></i>Export Authors
</button>
<button class="btn btn-outline-secondary btn-sm" data-action="exportPackagesCache">
<i class="fas fa-box me-2"></i>Export Packages
</button>
<button class="btn btn-outline-secondary btn-sm" data-action="exportVulnerabilitiesCache">
<i class="fas fa-shield-alt me-2"></i>Export Vulnerabilities
</button>
</div>
</div>
<div class="col-md-6">
<h6 class="small text-muted mb-2">Individual Cache Imports</h6>
<div class="d-flex flex-wrap gap-2">
<button class="btn btn-outline-secondary btn-sm" data-action="importAuthorsCache">
<i class="fas fa-users me-2"></i>Import Authors
</button>
<button class="btn btn-outline-secondary btn-sm" data-action="importPackagesCache">
<i class="fas fa-box me-2"></i>Import Packages
</button>
<button class="btn btn-outline-secondary btn-sm" data-action="importVulnerabilitiesCache">
<i class="fas fa-shield-alt me-2"></i>Import Vulnerabilities
</button>
</div>
</div>
</div>
<input type="file" id="importFileInput" accept=".json" class="d-none">
</div>
</div>
<!-- License Management -->
<div class="card mb-4">
<div class="card-header">
<h5 class="mb-0">
<i class="fas fa-certificate me-2"></i>License Management
</h5>
</div>
<div class="card-body">
<div class="alert alert-info">
<i class="fas fa-info-circle me-2"></i>
<strong>Re-fetch Missing Licenses:</strong> Use this if you have packages showing "Unknown" licenses.
This will query deps.dev and package registries (PyPI, npm, etc.) to fetch missing license information.
</div>
<div id="licenseRefetchStatus" class="mb-3">
<!-- Status will be populated here -->
</div>
<div class="d-flex gap-2">
<button class="btn btn-primary" id="refetchLicensesBtn">
<i class="fas fa-sync-alt me-2"></i>Re-fetch Missing Licenses
</button>
<button class="btn btn-outline-secondary" id="checkUnknownLicensesBtn">
<i class="fas fa-search me-2"></i>Check Unknown License Count
</button>
</div>
<div id="licenseRefetchProgress" class="d-none mt-3">
<div class="progress progress-h-25">
<div id="licenseRefetchProgressBar" class="progress-bar progress-bar-striped progress-bar-animated progress-bar-initial"
role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100">
<span id="licenseRefetchProgressText">0%</span>
</div>
</div>
<div class="mt-2">
<small id="licenseRefetchDetails" class="text-muted"></small>
</div>
</div>
</div>
</div>
<!-- Author Detection Settings -->
<div class="card mb-4">
<div class="card-header">
<h5><i class="fas fa-users me-2"></i>Author Detection Settings</h5>
</div>
<div class="card-body">
<div class="alert alert-info">
<i class="fas fa-info-circle me-2"></i>
<strong>Re-run Author Detection:</strong> This will clear cached author data and re-fetch from APIs.
Useful when author information has changed or was incomplete during initial analysis.
</div>
<div class="row mb-3">
<div class="col-md-6">
<label for="redoOrgSelect" class="form-label">Re-fetch authors for organization or repository</label>
<select class="form-select" id="redoOrgSelect">
<option value="">-- Select an organization or repository --</option>
</select>
<small class="text-muted">Select an organization or repository to re-run author detection</small>
</div>
<div class="col-md-6">
<label class="form-label">Actions</label>
<div class="d-flex flex-column gap-2">
<button class="btn btn-warning" id="redoAuthorDetectionBtn" disabled>
<i class="fas fa-redo me-2"></i>Re-fetch authors
</button>
<small class="text-muted">This will clear cached author data and re-fetch from APIs</small>
</div>
</div>
</div>
<div id="authorDetectionProgress" class="mt-3 d-none">
<div class="mb-2">
<strong id="authorDetectionStatus">Preparing...</strong>
</div>
<div class="progress author-detection-progress">
<div class="progress-bar progress-bar-striped progress-bar-animated author-detection-progress-bar"
role="progressbar"
id="authorDetectionProgressBar"
aria-valuenow="0"
aria-valuemin="0"
aria-valuemax="100">
0%
</div>
</div>
<div id="authorDetectionDetails" class="mt-2 small text-muted"></div>
</div>
</div>
</div>
<!-- Findings Re-analysis -->
<div class="card mb-4">
<div class="card-header">
<h5><i class="fas fa-shield-alt me-2"></i>Findings Re-analysis</h5>
</div>
<div class="card-body">
<div class="alert alert-info">
<i class="fas fa-info-circle me-2"></i>
<strong>Refresh the Findings page</strong> for a previously-scanned analysis. Pick one of the two modes depending on what you need:
<ul class="mb-0 mt-2">
<li><strong>Normalize Stored Findings</strong> — schema-only fix-up. Renames legacy <code>UNPINNED_ACTION_REFERENCE</code> rows to <code>MUTABLE_TAG_REFERENCE</code> and dedups duplicates left by the older double-fire bug. No network calls, completes in seconds.</li>
<li><strong>Re-analyze (re-fetch from GitHub)</strong> — full refresh. Re-downloads every workflow YAML and every referenced action's metadata from GitHub, then re-runs the analyzer end-to-end. Catches real upstream drift (workflow edits, new action versions, Dockerfile changes) but is slow and consumes GitHub API quota; only GitHub-backed repos are processed (uploaded SBOMs are skipped).</li>
</ul>
</div>
<div class="row mb-3">
<div class="col-md-12">
<label for="findingsRedoOrgSelect" class="form-label">Analysis to refresh</label>
<select class="form-select" id="findingsRedoOrgSelect">
<option value="">-- Select an organization or repository --</option>
</select>
<small class="text-muted">Pick the org/user/repo whose Findings you want to refresh.</small>
</div>
</div>
<div class="d-flex flex-wrap gap-2">
<button class="btn btn-outline-primary" id="normalizeFindingsBtn" disabled>
<i class="fas fa-broom me-2"></i>Normalize Stored Findings
<small class="ms-1 opacity-75">(no network)</small>
</button>
<button class="btn btn-warning" id="reanalyzeFindingsBtn" disabled>
<i class="fas fa-sync me-2"></i>Re-analyze (re-fetch from GitHub)
</button>
</div>
<div id="findingsRedoProgress" class="mt-3 d-none">
<div class="mb-2">
<strong id="findingsRedoStatus">Preparing...</strong>
</div>
<div class="progress author-detection-progress">
<div class="progress-bar progress-bar-striped progress-bar-animated author-detection-progress-bar"
role="progressbar" id="findingsRedoProgressBar"
aria-valuenow="0" aria-valuemin="0" aria-valuemax="100">0%</div>
</div>
<div id="findingsRedoDetails" class="mt-2 small text-muted"></div>
</div>
</div>
</div>
<!-- Debug Settings -->
<div class="card mb-4">
<div class="card-header">
<h5><i class="fas fa-bug me-2"></i>Debug Settings</h5>
</div>
<div class="card-body">
<div class="alert alert-warning">
<i class="fas fa-exclamation-triangle me-2"></i>
<strong>Warning:</strong> Enabling debug logging will generate large amounts of console output.
This may slow down the browser and should only be enabled when troubleshooting issues.
</div>
<div class="row mb-3">
<div class="col-md-12">
<div class="form-check">
<input class="form-check-input" type="checkbox" id="debugUrlLogging">
<label class="form-check-label" for="debugUrlLogging">
<strong>Enable Debug URL Logging</strong>
</label>
<small class="form-text text-muted d-block">When enabled, all API request URLs will be logged to the browser console</small>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
<button class="btn btn-primary" id="saveDebugSettingsBtn">
<i class="fas fa-save me-2"></i>Save Debug Settings
</button>
<button class="btn btn-outline-secondary" id="resetDebugSettingsBtn">
<i class="fas fa-undo me-2"></i>Reset to Defaults
</button>
</div>
</div>
</div>
</div>
<!-- No Data Section -->
<div id="noDataSection" class="card mb-4 d-none">
<div class="card-body empty-state">
<i class="fas fa-database empty-state-icon"></i>
<h3>No analysis data yet</h3>
<p>Analyze a GitHub org, user, repo, or upload an SBOM to get started.</p>
<a href="index.html" class="btn btn-primary">
<i class="fas fa-play me-2"></i>Analyze a GitHub org
</a>
</div>
</div>
</div>
<!-- Footer -->
<footer class="bg-light mt-5 py-4">
<div class="container">
<div class="row">
<!-- First Column: SBOM Play Tool -->
<div class="col-md-4">
<h6 class="text-primary">SBOM Play</h6>
<p class="text-muted small mb-0">
Client-side SBOM analysis from GitHub orgs, users, repos, or uploaded files. All processing happens in your browser.
</p>
</div>
<!-- Second Column: Links -->
<div class="col-md-4">
<h6 class="text-primary">Resources</h6>
<div class="d-flex flex-column gap-2">
<a href="https://cyfinoid.com/" target="_blank" class="btn btn-outline-primary btn-sm">
<i class="fas fa-globe me-1"></i>Website
</a>
<a href="https://cyfinoid.com/blog/" target="_blank" class="btn btn-outline-primary btn-sm">
<i class="fas fa-blog me-1"></i>Blog
</a>
<a href="https://cyfinoid.com/trainings/#upcoming-trainings" target="_blank" class="btn btn-outline-primary btn-sm">
<i class="fas fa-graduation-cap me-1"></i>Upcoming Trainings
</a>
<a href="https://cyfinoid.com/opensource-by-cyfinoid/" target="_blank" class="btn btn-outline-primary btn-sm">
<i class="fab fa-github me-1"></i>Open Source by Cyfinoid
</a>
</div>
</div>
<!-- Third Column: Company Information -->
<div class="col-md-4">
<h6 class="text-primary">About Cyfinoid Research</h6>
<p class="text-muted small mb-3">
Cyfinoid Research works on software supply-chain, cloud security, AI usage and security. SBOM Play is one of our open-source tools.
</p>
</div>
</div>
<hr class="my-3">
<div class="text-center">
<small class="text-muted">
© <time datetime="2026">2026</time> Cyfinoid Research. All rights reserved. |
<a href="https://github.com/cyfinoid/sbomplay" target="_blank" class="text-muted">
<i class="fab fa-github me-1"></i>View on GitHub
</a>
</small>
</div>
</div>
</footer>
<!-- Scripts -->
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js"></script>
<script src="js/indexeddb-manager.js?v=0.2.1&cb=1782100000000"></script>
<script src="js/common.js?v=0.2.1&cb=1777642497882"></script>
<script src="js/registry-utils.js?v=0.2.1&cb=1777646299546"></script>
<script src="js/version-utils.js?v=0.2.1&cb=1777494400000"></script>
<script src="js/ecosystem-utils.js?v=0.2.1&cb=1777494400000"></script>
<script src="js/cache-manager.js?v=0.2.1&cb=1777494400000"></script>
<script src="js/depconfuse-service.js?v=0.2.1&cb=1777494400000"></script>
<script src="js/dependency-tree-resolver.js?v=0.2.1&cb=1777646299546"></script>
<script src="js/github-client.js?v=0.2.1&cb=1778000000000"></script>
<script src="js/sbom-processor.js?v=0.2.1&cb=1779000000000"></script>
<script src="js/github-actions-analyzer.js?v=0.2.1&cb=1780200000000"></script>
<script src="js/license-processor.js?v=0.2.1&cb=1778000000000"></script>
<script src="js/osv-service.js?v=0.2.1&cb=1777800000000"></script>
<script src="js/author-service.js?v=0.2.1&cb=1777714413667"></script>
<script src="js/sanctions-service.js?v=0.2.1&cb=1777494400000"></script>
<script src="js/storage-manager.js?v=0.2.1&cb=1779000000000"></script>
<script src="js/view-manager.js?v=0.2.1&cb=1780000000000"></script>
<script src="js/app.js?v=0.2.1&cb=1780100000000"></script>
<script src="js/settings.js?v=0.2.1&cb=1780200000000"></script>
</body>
</html>