sbomly 0.1.0__py3-none-any.whl

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.
sbomly/__init__.py ADDED
@@ -0,0 +1,9 @@
1
+ """Sbomly: see what changed between two SBOMs, and what deserves a closer look."""
2
+
3
+ __version__ = "0.1.0"
4
+
5
+
6
+ def main() -> None:
7
+ from .cli import main as _main
8
+
9
+ _main()
sbomly/__main__.py ADDED
@@ -0,0 +1,3 @@
1
+ from sbomly import main
2
+
3
+ main()
@@ -0,0 +1,93 @@
1
+ Copyright 2020 The JetBrains Mono Project Authors (https://github.com/JetBrains/JetBrainsMono)
2
+
3
+ This Font Software is licensed under the SIL Open Font License, Version 1.1.
4
+ This license is copied below, and is also available with a FAQ at:
5
+ https://openfontlicense.org
6
+
7
+
8
+ -----------------------------------------------------------
9
+ SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
10
+ -----------------------------------------------------------
11
+
12
+ PREAMBLE
13
+ The goals of the Open Font License (OFL) are to stimulate worldwide
14
+ development of collaborative font projects, to support the font creation
15
+ efforts of academic and linguistic communities, and to provide a free and
16
+ open framework in which fonts may be shared and improved in partnership
17
+ with others.
18
+
19
+ The OFL allows the licensed fonts to be used, studied, modified and
20
+ redistributed freely as long as they are not sold by themselves. The
21
+ fonts, including any derivative works, can be bundled, embedded,
22
+ redistributed and/or sold with any software provided that any reserved
23
+ names are not used by derivative works. The fonts and derivatives,
24
+ however, cannot be released under any other type of license. The
25
+ requirement for fonts to remain under this license does not apply
26
+ to any document created using the fonts or their derivatives.
27
+
28
+ DEFINITIONS
29
+ "Font Software" refers to the set of files released by the Copyright
30
+ Holder(s) under this license and clearly marked as such. This may
31
+ include source files, build scripts and documentation.
32
+
33
+ "Reserved Font Name" refers to any names specified as such after the
34
+ copyright statement(s).
35
+
36
+ "Original Version" refers to the collection of Font Software components as
37
+ distributed by the Copyright Holder(s).
38
+
39
+ "Modified Version" refers to any derivative made by adding to, deleting,
40
+ or substituting -- in part or in whole -- any of the components of the
41
+ Original Version, by changing formats or by porting the Font Software to a
42
+ new environment.
43
+
44
+ "Author" refers to any designer, engineer, programmer, technical
45
+ writer or other person who contributed to the Font Software.
46
+
47
+ PERMISSION & CONDITIONS
48
+ Permission is hereby granted, free of charge, to any person obtaining
49
+ a copy of the Font Software, to use, study, copy, merge, embed, modify,
50
+ redistribute, and sell modified and unmodified copies of the Font
51
+ Software, subject to the following conditions:
52
+
53
+ 1) Neither the Font Software nor any of its individual components,
54
+ in Original or Modified Versions, may be sold by itself.
55
+
56
+ 2) Original or Modified Versions of the Font Software may be bundled,
57
+ redistributed and/or sold with any software, provided that each copy
58
+ contains the above copyright notice and this license. These can be
59
+ included either as stand-alone text files, human-readable headers or
60
+ in the appropriate machine-readable metadata fields within text or
61
+ binary files as long as those fields can be easily viewed by the user.
62
+
63
+ 3) No Modified Version of the Font Software may use the Reserved Font
64
+ Name(s) unless explicit written permission is granted by the corresponding
65
+ Copyright Holder. This restriction only applies to the primary font name as
66
+ presented to the users.
67
+
68
+ 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
69
+ Software shall not be used to promote, endorse or advertise any
70
+ Modified Version, except to acknowledge the contribution(s) of the
71
+ Copyright Holder(s) and the Author(s) or with their explicit written
72
+ permission.
73
+
74
+ 5) The Font Software, modified or unmodified, in part or in whole,
75
+ must be distributed entirely under this license, and must not be
76
+ distributed under any other license. The requirement for fonts to
77
+ remain under this license does not apply to any document created
78
+ using the Font Software.
79
+
80
+ TERMINATION
81
+ This license becomes null and void if any of the above conditions are
82
+ not met.
83
+
84
+ DISCLAIMER
85
+ THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
86
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
87
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
88
+ OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
89
+ COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
90
+ INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
91
+ DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
92
+ FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
93
+ OTHER DEALINGS IN THE FONT SOFTWARE.
Binary file
@@ -0,0 +1,515 @@
1
+ <!DOCTYPE html>
2
+ <!--
3
+ Sbomly SBOM diff report template. sbomly/html.py fills in every
4
+ double-brace placeholder; every value is HTML-escaped there first.
5
+ -->
6
+ <html lang="en"{{THEME_ATTR}}>
7
+ <head>
8
+ <meta charset="UTF-8" />
9
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
10
+ <link rel="icon" href="data:image/svg+xml;base64,{{FAVICON_B64}}" />
11
+ <title>SBOM Diff — {{TITLE}} | Sbomly</title>
12
+ <style>
13
+ /* Fonts are embedded, not fetched, so the report renders identically
14
+ * offline. Both are variable fonts under the SIL Open Font License 1.1. */
15
+ @font-face {
16
+ font-family: 'Space Grotesk';
17
+ font-weight: 300 700;
18
+ font-display: swap;
19
+ src: url(data:font/woff2;base64,{{FONT_DISPLAY_B64}}) format('woff2');
20
+ }
21
+ @font-face {
22
+ font-family: 'JetBrains Mono';
23
+ font-weight: 100 800;
24
+ font-display: swap;
25
+ src: url(data:font/woff2;base64,{{FONT_MONO_B64}}) format('woff2');
26
+ }
27
+
28
+ /* ── Design tokens ─────────────────────────────────────────── */
29
+ /* Full-Stack-Spectrum, shared with Vulnly: dark first, neutral
30
+ * surfaces, the spectrum kept for signal. */
31
+ :root {
32
+ --font-display: 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
33
+ --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
34
+ --gutter: max(2.5rem, calc((100% - 1160px) / 2 + 2.5rem));
35
+
36
+ --cs-accent: #8fb4ff;
37
+ --accent-rgb: 143,180,255;
38
+ --cs-red: #ff4d5e;
39
+ --focus: #4f8cff;
40
+
41
+ --spectrum-1: #4f8cff;
42
+ --spectrum-2: #8fb4ff;
43
+ --spectrum-3: #f5c84c;
44
+ --spectrum-4: #ff8a3d;
45
+ --spectrum-5: #ff4d5e;
46
+
47
+ --cs-bg: #0a0d12;
48
+ --cs-surface: #121821;
49
+ --cs-surface2: #10151d;
50
+ --cs-border: #222b38;
51
+ --cs-border-strong: #2f3a4b;
52
+ --cs-text: #eef1f6;
53
+ --cs-muted: #9aa4b2;
54
+ --cs-faint: #646f7f;
55
+ --dot: rgba(255,255,255,0.07);
56
+
57
+ /* Change and finding colours borrow the severity spectrum: hot means
58
+ * look at this, cool means routine. */
59
+ --c-red: #ff4d5e; --c-red-rgb: 255,77,94;
60
+ --c-orange: #ff8a3d; --c-orange-rgb: 255,138,61;
61
+ --c-yellow: #f5c84c; --c-yellow-rgb: 245,200,76;
62
+ --c-blue: #4f8cff; --c-blue-rgb: 79,140,255;
63
+ --c-soft: #8fb4ff; --c-soft-rgb: 143,180,255;
64
+ --c-grey: #9aa4b2; --c-grey-rgb: 154,164,178;
65
+
66
+ --tint-weak: 0.12;
67
+ --tint-border: 0.50;
68
+ --header-bg: rgba(10,13,18,0.72);
69
+ }
70
+
71
+ :root[data-theme="light"] {
72
+ --cs-accent: #2a5bc4;
73
+ --accent-rgb: 42,91,196;
74
+ --cs-red: #d1213a;
75
+ --focus: #2d63d8;
76
+
77
+ --cs-bg: #fafafa;
78
+ --cs-surface: #ffffff;
79
+ --cs-surface2: #f2f4f7;
80
+ --cs-border: #e3e7ed;
81
+ --cs-border-strong: #cbd3de;
82
+ --cs-text: #0a0d12;
83
+ --cs-muted: #4a5462;
84
+ --cs-faint: #5f6b7a;
85
+ --dot: rgba(10,13,18,0.07);
86
+
87
+ --c-red: #d1213a; --c-red-rgb: 209,33,58;
88
+ --c-orange: #b8500f; --c-orange-rgb: 184,80,15;
89
+ --c-yellow: #8f6500; --c-yellow-rgb: 143,101,0;
90
+ --c-blue: #2d63d8; --c-blue-rgb: 45,99,216;
91
+ --c-soft: #2a5bc4; --c-soft-rgb: 42,91,196;
92
+ --c-grey: #5f6b7a; --c-grey-rgb: 95,107,122;
93
+
94
+ --tint-weak: 0.08;
95
+ --tint-border: 0.40;
96
+ --header-bg: rgba(250,250,250,0.85);
97
+ }
98
+
99
+ *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
100
+ @media (max-width: 600px) { :root { --gutter: 1rem; } }
101
+
102
+ body {
103
+ font-family: var(--font-display);
104
+ background-color: var(--cs-bg);
105
+ background-image: radial-gradient(var(--dot) 1px, transparent 1px);
106
+ background-size: 28px 28px;
107
+ color: var(--cs-text);
108
+ min-height: 100vh;
109
+ -webkit-font-smoothing: antialiased;
110
+ }
111
+ ::selection { background: var(--cs-red); color: var(--cs-bg); }
112
+ :focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
113
+ a { color: var(--cs-accent); }
114
+
115
+ /* Each kind maps to one colour, used by badges, cards and filters. */
116
+ .k-added { --k: var(--c-blue); --k-rgb: var(--c-blue-rgb); }
117
+ .k-removed { --k: var(--c-grey); --k-rgb: var(--c-grey-rgb); }
118
+ .k-upgraded { --k: var(--c-soft); --k-rgb: var(--c-soft-rgb); }
119
+ .k-downgraded { --k: var(--c-orange); --k-rgb: var(--c-orange-rgb); }
120
+ .k-changed { --k: var(--c-yellow); --k-rgb: var(--c-yellow-rgb); }
121
+ .k-hash { --k: var(--c-red); --k-rgb: var(--c-red-rgb); }
122
+ .k-copyleft { --k: var(--c-orange); --k-rgb: var(--c-orange-rgb); }
123
+ .k-license { --k: var(--c-yellow); --k-rgb: var(--c-yellow-rgb); }
124
+ .k-supplier { --k: var(--c-yellow); --k-rgb: var(--c-yellow-rgb); }
125
+ .k-info { --k: var(--c-grey); --k-rgb: var(--c-grey-rgb); }
126
+ .k-findings { --k: var(--c-red); --k-rgb: var(--c-red-rgb); }
127
+
128
+ /* ── Header ─────────────────────────────────────────────────── */
129
+ header {
130
+ position: sticky; top: 0; z-index: 10;
131
+ background: var(--header-bg);
132
+ -webkit-backdrop-filter: blur(10px);
133
+ backdrop-filter: blur(10px);
134
+ border-bottom: 1px solid var(--cs-border);
135
+ padding: 0 var(--gutter);
136
+ display: flex; align-items: center; justify-content: space-between;
137
+ height: 64px;
138
+ }
139
+ .logo-area { display: flex; align-items: center; gap: 0.75rem; }
140
+ /* The Layered Core product mark. Its layers are filled with the dark
141
+ * bg, so it sits on a dark tile in the light theme too. */
142
+ .logo-mark { display: block; width: 28px; height: 28px; }
143
+ :root[data-theme="light"] .logo-mark { background: #0a0d12; border-radius: 6px; padding: 3px; width: 32px; height: 32px; }
144
+ .logo-text { font-size: 1.15rem; font-weight: 700; letter-spacing: -0.02em; }
145
+ .header-actions { display: flex; align-items: center; gap: 0.75rem; }
146
+
147
+ .badge {
148
+ font-family: var(--font-mono);
149
+ font-size: 0.69rem; font-weight: 600;
150
+ letter-spacing: 0.04em; text-transform: uppercase;
151
+ color: var(--k);
152
+ background: rgba(var(--k-rgb), var(--tint-weak));
153
+ border: 1px solid rgba(var(--k-rgb), var(--tint-border));
154
+ padding: 0.3rem 0.6rem;
155
+ border-radius: 4px;
156
+ white-space: nowrap;
157
+ }
158
+
159
+ .theme-toggle {
160
+ width: 34px; height: 34px;
161
+ border-radius: 6px;
162
+ border: 1px solid var(--cs-border);
163
+ background: var(--cs-surface);
164
+ color: var(--cs-muted);
165
+ cursor: pointer;
166
+ font-size: 1rem;
167
+ }
168
+ .theme-toggle:hover { color: var(--cs-text); border-color: var(--cs-border-strong); }
169
+ :root[data-theme="light"] .theme-toggle .to-light,
170
+ :root:not([data-theme="light"]) .theme-toggle .to-dark { display: none; }
171
+
172
+ /* ── Hero ───────────────────────────────────────────────────── */
173
+ .hero { border-bottom: 1px solid var(--cs-border); padding: 3.5rem var(--gutter) 2.5rem; }
174
+ .spectrum-bar { display: flex; gap: 6px; margin-bottom: 1.5rem; }
175
+ .spectrum-bar i { display: block; width: 28px; height: 8px; border-radius: 1px; }
176
+ .spectrum-bar i:nth-child(1) { background: var(--spectrum-1); }
177
+ .spectrum-bar i:nth-child(2) { background: var(--spectrum-2); }
178
+ .spectrum-bar i:nth-child(3) { background: var(--spectrum-3); }
179
+ .spectrum-bar i:nth-child(4) { background: var(--spectrum-4); }
180
+ .spectrum-bar i:nth-child(5) { background: var(--spectrum-5); }
181
+ .hero-meta {
182
+ font-family: var(--font-mono); font-size: 0.81rem;
183
+ letter-spacing: 0.04em; color: var(--cs-red); margin-bottom: 0.75rem;
184
+ }
185
+ .hero-meta::before { content: '// '; color: var(--cs-faint); }
186
+ .hero h1 {
187
+ font-size: clamp(2rem, 5vw, 3.25rem);
188
+ font-weight: 700; line-height: 1.05; letter-spacing: -0.03em;
189
+ margin-bottom: 1rem; overflow-wrap: anywhere;
190
+ }
191
+ .hero h1 .arrow { color: var(--cs-faint); font-weight: 400; margin: 0 0.3em; }
192
+ .hero-sub { font-size: 1.06rem; color: var(--cs-muted); max-width: 65ch; line-height: 1.6; }
193
+
194
+ .compare {
195
+ display: grid; grid-template-columns: 1fr 1fr; gap: 1rem;
196
+ margin-top: 1.75rem;
197
+ }
198
+ @media (max-width: 700px) { .compare { grid-template-columns: 1fr; } }
199
+ .sbom-card {
200
+ background: var(--cs-surface);
201
+ border: 1px solid var(--cs-border);
202
+ border-radius: 10px;
203
+ padding: 1rem 1.25rem;
204
+ min-width: 0;
205
+ }
206
+ .sbom-card h2 {
207
+ font-family: var(--font-mono); font-size: 0.69rem; font-weight: 600;
208
+ text-transform: uppercase; letter-spacing: 0.04em; color: var(--cs-muted);
209
+ margin-bottom: 0.6rem;
210
+ }
211
+ .sbom-card dl { display: grid; grid-template-columns: auto 1fr; gap: 0.3rem 1rem; }
212
+ .sbom-card dt { font-family: var(--font-mono); font-size: 0.75rem; color: var(--cs-faint); }
213
+ .sbom-card dd {
214
+ font-family: var(--font-mono); font-size: 0.78rem; color: var(--cs-text);
215
+ overflow-wrap: anywhere;
216
+ }
217
+
218
+ /* ── Main ───────────────────────────────────────────────────── */
219
+ main { max-width: 1160px; margin: 0 auto; padding: 2.5rem; }
220
+ @media (max-width: 600px) { main { padding: 2rem 1rem; } }
221
+
222
+ .stats-row {
223
+ display: grid;
224
+ grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
225
+ gap: 1rem;
226
+ margin-bottom: 3rem;
227
+ }
228
+ .stat-card {
229
+ background: var(--cs-surface);
230
+ border: 1px solid var(--cs-border);
231
+ border-radius: 10px;
232
+ padding: 1.25rem 1.25rem;
233
+ position: relative; overflow: hidden;
234
+ }
235
+ .stat-card::before {
236
+ content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
237
+ background: var(--k);
238
+ }
239
+ .stat-label {
240
+ font-family: var(--font-mono); font-size: 0.69rem; font-weight: 600;
241
+ text-transform: uppercase; letter-spacing: 0.04em; color: var(--cs-muted);
242
+ margin-bottom: 0.5rem;
243
+ }
244
+ .stat-number {
245
+ font-family: var(--font-mono); font-size: 2rem; font-weight: 700;
246
+ letter-spacing: -0.03em; line-height: 1; font-variant-numeric: tabular-nums;
247
+ color: var(--k);
248
+ }
249
+ .stat-card.zero .stat-number { color: var(--cs-faint); }
250
+ .stat-sub { font-size: 0.78rem; color: var(--cs-muted); margin-top: 0.45rem; }
251
+
252
+ .section-title {
253
+ font-size: 1.375rem; font-weight: 700; letter-spacing: -0.02em;
254
+ margin-bottom: 1.25rem;
255
+ display: flex; align-items: center; gap: 0.75rem;
256
+ }
257
+ .section-title::before {
258
+ content: '//'; font-family: var(--font-mono); font-size: 0.81rem;
259
+ font-weight: 400; letter-spacing: 0; color: var(--cs-faint);
260
+ }
261
+ .section-title::after { content: ''; flex: 1; height: 1px; background: var(--cs-border); }
262
+ section { margin-bottom: 3rem; }
263
+
264
+ /* ── Findings ───────────────────────────────────────────────── */
265
+ .findings { display: grid; gap: 0.75rem; }
266
+ .finding {
267
+ background: var(--cs-surface);
268
+ border: 1px solid var(--cs-border);
269
+ border-left: 3px solid var(--k);
270
+ border-radius: 8px;
271
+ padding: 0.9rem 1.1rem;
272
+ display: grid;
273
+ grid-template-columns: auto 1fr;
274
+ gap: 0.3rem 1rem;
275
+ align-items: baseline;
276
+ }
277
+ /* Fixed width so every finding's text starts on the same line. */
278
+ .finding .badge { grid-row: span 2; align-self: start; min-width: 7.5rem; text-align: center; }
279
+ .finding-title { font-weight: 600; overflow-wrap: anywhere; }
280
+ .finding-title code { font-family: var(--font-mono); font-size: 0.78rem; color: var(--cs-muted); font-weight: 400; margin-left: 0.4rem; }
281
+ .finding-msg { color: var(--cs-muted); font-size: 0.9rem; overflow-wrap: anywhere; }
282
+ @media (max-width: 600px) {
283
+ .finding { grid-template-columns: 1fr; }
284
+ .finding .badge { grid-row: auto; justify-self: start; }
285
+ }
286
+ .empty {
287
+ background: var(--cs-surface);
288
+ border: 1px dashed var(--cs-border-strong);
289
+ border-radius: 10px;
290
+ padding: 1.5rem;
291
+ color: var(--cs-muted);
292
+ text-align: center;
293
+ }
294
+
295
+ /* ── Changes table ──────────────────────────────────────────── */
296
+ .controls { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; margin-bottom: 1rem; }
297
+ .search-input {
298
+ flex: 1 1 220px;
299
+ font-family: var(--font-mono); font-size: 0.81rem;
300
+ background: var(--cs-surface); color: var(--cs-text);
301
+ border: 1px solid var(--cs-border); border-radius: 6px;
302
+ padding: 0.55rem 0.8rem; outline: none;
303
+ }
304
+ .search-input::placeholder { color: var(--cs-muted); }
305
+ .search-input:focus { border-color: var(--cs-accent); }
306
+ .filter-btn {
307
+ font-family: var(--font-mono); font-size: 0.75rem; font-weight: 600;
308
+ background: var(--cs-surface); color: var(--cs-muted);
309
+ border: 1px solid var(--cs-border); border-radius: 6px;
310
+ padding: 0.5rem 0.75rem; cursor: pointer;
311
+ }
312
+ .filter-btn:hover { color: var(--cs-text); border-color: var(--cs-border-strong); }
313
+ .filter-btn[aria-pressed="true"] {
314
+ color: var(--k, var(--cs-accent));
315
+ border-color: var(--k, var(--cs-accent));
316
+ background: rgba(var(--k-rgb, var(--accent-rgb)), var(--tint-weak));
317
+ }
318
+ .result-count { font-family: var(--font-mono); font-size: 0.75rem; color: var(--cs-faint); margin-left: auto; }
319
+
320
+ .table-wrap {
321
+ background: var(--cs-surface);
322
+ border: 1px solid var(--cs-border);
323
+ border-radius: 10px;
324
+ overflow-x: auto;
325
+ }
326
+ table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
327
+ th {
328
+ font-family: var(--font-mono); font-size: 0.69rem; font-weight: 600;
329
+ text-transform: uppercase; letter-spacing: 0.04em; color: var(--cs-muted);
330
+ text-align: left; padding: 0.8rem 1rem;
331
+ border-bottom: 1px solid var(--cs-border);
332
+ background: var(--cs-surface2);
333
+ white-space: nowrap;
334
+ }
335
+ td { padding: 0.7rem 1rem; border-bottom: 1px solid var(--cs-border); vertical-align: top; }
336
+ tbody tr:last-child td { border-bottom: none; }
337
+ tbody tr:hover td { background: var(--cs-surface2); }
338
+ td.pkg { font-weight: 600; overflow-wrap: anywhere; min-width: 12rem; }
339
+ td.pkg small { display: block; font-family: var(--font-mono); font-weight: 400; font-size: 0.72rem; color: var(--cs-faint); margin-top: 0.15rem; }
340
+ td.ver { font-family: var(--font-mono); font-size: 0.78rem; white-space: nowrap; }
341
+ td.ver .old { color: var(--cs-muted); }
342
+ td.ver .sep { color: var(--cs-faint); margin: 0 0.4rem; }
343
+ td.lic { font-family: var(--font-mono); font-size: 0.75rem; color: var(--cs-muted); overflow-wrap: anywhere; }
344
+ tr.hidden { display: none; }
345
+
346
+ /* ── Diff view ──────────────────────────────────────────────── */
347
+ .view-toggle { display: flex; gap: 0.5rem; margin-bottom: 1rem; }
348
+ [hidden] { display: none !important; }
349
+ .udiff {
350
+ background: var(--cs-surface);
351
+ border: 1px solid var(--cs-border);
352
+ border-radius: 10px;
353
+ overflow: hidden;
354
+ font-family: var(--font-mono);
355
+ font-size: 0.8rem;
356
+ line-height: 1.7;
357
+ }
358
+ .udiff-file {
359
+ padding: 0.6rem 1rem;
360
+ background: var(--cs-surface2);
361
+ border-bottom: 1px solid var(--cs-border);
362
+ color: var(--cs-muted);
363
+ overflow-wrap: anywhere;
364
+ }
365
+ .udiff-body { overflow-x: auto; }
366
+ /* Rows stretch to the longest line so tints run the full width. */
367
+ .udiff-lines { min-width: max-content; }
368
+ .dl { display: grid; grid-template-columns: 3.25rem 3.25rem 1.5rem 1fr; white-space: pre; }
369
+ .dl .ln {
370
+ color: var(--cs-faint);
371
+ text-align: right;
372
+ padding-right: 0.75rem;
373
+ user-select: none;
374
+ font-variant-numeric: tabular-nums;
375
+ }
376
+ .dl .sg { text-align: center; user-select: none; }
377
+ .dl .tx { padding-right: 1.5rem; color: var(--cs-text); }
378
+ .dl.ctx .tx { color: var(--cs-muted); }
379
+ .dl.hunk { background: rgba(var(--c-soft-rgb), 0.06); }
380
+ .dl.hunk .tx { color: var(--c-soft); padding: 0.15rem 0; }
381
+ /* The one place red marks change rather than alarm: removals, as every
382
+ * diff reader expects. Additions take the brand blue, not green. */
383
+ .dl.add { background: rgba(var(--c-blue-rgb), 0.10); }
384
+ .dl.add .sg { color: var(--c-blue); font-weight: 700; }
385
+ .dl.add mark { background: rgba(var(--c-blue-rgb), 0.32); color: inherit; border-radius: 2px; }
386
+ .dl.del { background: rgba(var(--c-red-rgb), 0.09); }
387
+ .dl.del .sg { color: var(--c-red); font-weight: 700; }
388
+ .dl.del mark { background: rgba(var(--c-red-rgb), 0.30); color: inherit; border-radius: 2px; }
389
+ .udiff-note { margin-top: 0.75rem; font-size: 0.8rem; color: var(--cs-muted); }
390
+ .udiff-note code { font-family: var(--font-mono); font-size: 0.75rem; }
391
+
392
+ /* ── Footer ─────────────────────────────────────────────────── */
393
+ footer {
394
+ border-top: 1px solid var(--cs-border);
395
+ padding: 1.5rem var(--gutter);
396
+ display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; justify-content: space-between;
397
+ font-size: 0.81rem; color: var(--cs-muted);
398
+ }
399
+ </style>
400
+ </head>
401
+ <body>
402
+
403
+ <header>
404
+ <div class="logo-area">
405
+ <svg class="logo-mark" viewBox="9 9 46 46" aria-hidden="true"><rect x="25" y="11" width="28" height="28" rx="6" fill="#0a0d12" stroke="#4f8cff" stroke-width="3.5"/><rect x="18" y="18" width="28" height="28" rx="6" fill="#0a0d12" stroke="#f5c84c" stroke-width="3.5"/><rect x="11" y="25" width="28" height="28" rx="6" fill="#0a0d12" stroke="#eef1f6" stroke-width="3.5"/><path d="M19.5 35.5h11M25 30v11M19.5 47.5h11" fill="none" stroke="#ff4d5e" stroke-width="3" stroke-linecap="round"/></svg>
406
+ <span class="logo-text">Sbomly</span>
407
+ </div>
408
+ <div class="header-actions">
409
+ <span class="badge {{BADGE_CLASS}}">{{BADGE_TEXT}}</span>
410
+ <button class="theme-toggle" id="themeToggle" type="button" aria-label="Switch theme" title="Switch theme">
411
+ <span class="to-dark" aria-hidden="true">&#9789;</span>
412
+ <span class="to-light" aria-hidden="true">&#9788;</span>
413
+ </button>
414
+ </div>
415
+ </header>
416
+
417
+ <div class="hero">
418
+ <div class="spectrum-bar" aria-hidden="true"><i></i><i></i><i></i><i></i><i></i></div>
419
+ <p class="hero-meta">sbom diff report</p>
420
+ <h1>{{HERO_TITLE}}</h1>
421
+ <p class="hero-sub">{{HEADLINE}}</p>
422
+ <div class="compare">
423
+ {{OLD_CARD}}
424
+ {{NEW_CARD}}
425
+ </div>
426
+ </div>
427
+
428
+ <main>
429
+ <div class="stats-row">
430
+ {{STAT_CARDS}}
431
+ </div>
432
+
433
+ <section aria-labelledby="findingsTitle">
434
+ <h2 class="section-title" id="findingsTitle">Findings to review</h2>
435
+ {{FINDINGS}}
436
+ </section>
437
+
438
+ <section aria-labelledby="changesTitle">
439
+ <h2 class="section-title" id="changesTitle">Component changes</h2>
440
+ {{CHANGES}}
441
+ </section>
442
+ </main>
443
+
444
+ <footer>
445
+ <div>Generated by <a href="https://github.com/fullstackspectrum/sbomly" target="_blank" rel="noopener">Sbomly</a> {{VERSION}} &mdash; {{REPORT_DATE}}</div>
446
+ <div>Part of <a href="https://fullstackspectrum.com/" target="_blank" rel="noopener">Full-Stack-Spectrum</a></div>
447
+ </footer>
448
+
449
+ <script>
450
+ (function () {
451
+ var root = document.documentElement;
452
+ document.getElementById('themeToggle').addEventListener('click', function () {
453
+ var light = root.getAttribute('data-theme') !== 'light';
454
+ if (light) root.setAttribute('data-theme', 'light'); else root.removeAttribute('data-theme');
455
+ try { localStorage.setItem('sbomly-theme', light ? 'light' : 'dark'); } catch (e) {}
456
+ });
457
+ try {
458
+ var saved = localStorage.getItem('sbomly-theme');
459
+ if (saved === 'light') root.setAttribute('data-theme', 'light');
460
+ if (saved === 'dark') root.removeAttribute('data-theme');
461
+ } catch (e) {}
462
+
463
+ // Table or diff view. #diff in the URL opens the diff, so a link can
464
+ // point straight at it; otherwise the last choice is remembered.
465
+ var views = { table: document.getElementById('viewTable'), diff: document.getElementById('viewDiff') };
466
+ var viewButtons = Array.prototype.slice.call(document.querySelectorAll('[data-view]'));
467
+ function showView(name) {
468
+ if (!views[name]) return;
469
+ Object.keys(views).forEach(function (k) { views[k].hidden = k !== name; });
470
+ viewButtons.forEach(function (b) { b.setAttribute('aria-pressed', b.getAttribute('data-view') === name ? 'true' : 'false'); });
471
+ }
472
+ viewButtons.forEach(function (btn) {
473
+ btn.addEventListener('click', function () {
474
+ var name = btn.getAttribute('data-view');
475
+ showView(name);
476
+ try { localStorage.setItem('sbomly-view', name); } catch (e) {}
477
+ });
478
+ });
479
+ if (location.hash === '#diff') showView('diff');
480
+ else {
481
+ try { var savedView = localStorage.getItem('sbomly-view'); if (savedView) showView(savedView); } catch (e) {}
482
+ }
483
+
484
+ var table = document.getElementById('changesTable');
485
+ if (!table) return;
486
+ var rows = Array.prototype.slice.call(table.tBodies[0].rows);
487
+ var search = document.getElementById('changeSearch');
488
+ var buttons = Array.prototype.slice.call(document.querySelectorAll('[data-kind-filter]'));
489
+ var count = document.getElementById('resultCount');
490
+ var active = '';
491
+
492
+ function apply() {
493
+ var q = search.value.trim().toLowerCase();
494
+ var shown = 0;
495
+ rows.forEach(function (row) {
496
+ var ok = (!active || row.getAttribute('data-kind') === active) &&
497
+ (!q || row.getAttribute('data-search').indexOf(q) !== -1);
498
+ row.classList.toggle('hidden', !ok);
499
+ if (ok) shown++;
500
+ });
501
+ count.textContent = shown + ' of ' + rows.length;
502
+ }
503
+ buttons.forEach(function (btn) {
504
+ btn.addEventListener('click', function () {
505
+ active = btn.getAttribute('data-kind-filter');
506
+ buttons.forEach(function (b) { b.setAttribute('aria-pressed', b === btn ? 'true' : 'false'); });
507
+ apply();
508
+ });
509
+ });
510
+ search.addEventListener('input', apply);
511
+ apply();
512
+ })();
513
+ </script>
514
+ </body>
515
+ </html>