@decantr/verifier 1.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.
@@ -0,0 +1,378 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://decantr.ai/schemas/showcase-shortlist-report.v1.json",
4
+ "title": "Decantr Showcase Shortlist Verification Report",
5
+ "type": "object",
6
+ "required": ["$schema", "generatedAt", "dryRun", "summary", "results"],
7
+ "properties": {
8
+ "$schema": {
9
+ "const": "https://decantr.ai/schemas/showcase-shortlist-report.v1.json"
10
+ },
11
+ "generatedAt": {
12
+ "$ref": "https://decantr.ai/schemas/verification-report.common.v1.json#/$defs/nonEmptyString"
13
+ },
14
+ "dryRun": {
15
+ "type": "boolean"
16
+ },
17
+ "summary": {
18
+ "type": "object",
19
+ "required": [
20
+ "appCount",
21
+ "passedBuilds",
22
+ "failedBuilds",
23
+ "averageDurationMs",
24
+ "passedSmokes",
25
+ "failedSmokes",
26
+ "averageSmokeDurationMs",
27
+ "appsWithTitleOkCount",
28
+ "appsWithLangOkCount",
29
+ "appsWithViewportOkCount",
30
+ "appsWithCharsetOkCount",
31
+ "appsWithoutInlineScriptsCount",
32
+ "appsWithoutInlineEventHandlersCount",
33
+ "appsWithCspSignalCount",
34
+ "appsWithExternalScriptIntegrityCount",
35
+ "appsWithExternalScriptCrossoriginCount",
36
+ "appsWithoutInsecureRemoteAssetTransportCount",
37
+ "appsWithSafeExternalBlankLinksCount",
38
+ "appsWithSandboxedExternalIframesCount",
39
+ "appsWithoutInsecureExternalIframesCount",
40
+ "appsWithExternalStylesheetIntegrityCount",
41
+ "appsWithExternalStylesheetCrossoriginCount",
42
+ "appsWithRouteCoverageCount",
43
+ "appsWithRouteDocumentHardeningCount",
44
+ "appsWithFullRouteCoverageCount",
45
+ "averageTotalAssetBytes",
46
+ "averageJsAssetBytes",
47
+ "averageCssAssetBytes",
48
+ "lowerDriftCount",
49
+ "moderateDriftCount",
50
+ "elevatedDriftCount",
51
+ "withPackManifestCount"
52
+ ],
53
+ "properties": {
54
+ "appCount": { "type": "number", "minimum": 0 },
55
+ "passedBuilds": { "type": "number", "minimum": 0 },
56
+ "failedBuilds": { "type": "number", "minimum": 0 },
57
+ "averageDurationMs": { "type": "number", "minimum": 0 },
58
+ "passedSmokes": { "type": "number", "minimum": 0 },
59
+ "failedSmokes": { "type": "number", "minimum": 0 },
60
+ "averageSmokeDurationMs": { "type": "number", "minimum": 0 },
61
+ "appsWithTitleOkCount": { "type": "number", "minimum": 0 },
62
+ "appsWithLangOkCount": { "type": "number", "minimum": 0 },
63
+ "appsWithViewportOkCount": { "type": "number", "minimum": 0 },
64
+ "appsWithCharsetOkCount": { "type": "number", "minimum": 0 },
65
+ "appsWithoutInlineScriptsCount": { "type": "number", "minimum": 0 },
66
+ "appsWithoutInlineEventHandlersCount": { "type": "number", "minimum": 0 },
67
+ "appsWithCspSignalCount": { "type": "number", "minimum": 0 },
68
+ "appsWithExternalScriptIntegrityCount": { "type": "number", "minimum": 0 },
69
+ "appsWithExternalScriptCrossoriginCount": { "type": "number", "minimum": 0 },
70
+ "appsWithoutInsecureRemoteAssetTransportCount": { "type": "number", "minimum": 0 },
71
+ "appsWithSafeExternalBlankLinksCount": { "type": "number", "minimum": 0 },
72
+ "appsWithSandboxedExternalIframesCount": { "type": "number", "minimum": 0 },
73
+ "appsWithoutInsecureExternalIframesCount": { "type": "number", "minimum": 0 },
74
+ "appsWithExternalStylesheetIntegrityCount": { "type": "number", "minimum": 0 },
75
+ "appsWithExternalStylesheetCrossoriginCount": { "type": "number", "minimum": 0 },
76
+ "appsWithRouteCoverageCount": { "type": "number", "minimum": 0 },
77
+ "appsWithRouteDocumentHardeningCount": { "type": "number", "minimum": 0 },
78
+ "appsWithFullRouteCoverageCount": { "type": "number", "minimum": 0 },
79
+ "averageTotalAssetBytes": { "type": "number", "minimum": 0 },
80
+ "averageJsAssetBytes": { "type": "number", "minimum": 0 },
81
+ "averageCssAssetBytes": { "type": "number", "minimum": 0 },
82
+ "lowerDriftCount": { "type": "number", "minimum": 0 },
83
+ "moderateDriftCount": { "type": "number", "minimum": 0 },
84
+ "elevatedDriftCount": { "type": "number", "minimum": 0 },
85
+ "withPackManifestCount": { "type": "number", "minimum": 0 }
86
+ },
87
+ "additionalProperties": false
88
+ },
89
+ "results": {
90
+ "type": "array",
91
+ "items": {
92
+ "$ref": "#/$defs/showcaseShortlistEntry"
93
+ }
94
+ }
95
+ },
96
+ "$defs": {
97
+ "showcaseShortlistEntry": {
98
+ "type": "object",
99
+ "required": ["slug", "target", "classification", "verificationStatus", "build", "smoke", "drift"],
100
+ "properties": {
101
+ "slug": {
102
+ "$ref": "https://decantr.ai/schemas/verification-report.common.v1.json#/$defs/nonEmptyString"
103
+ },
104
+ "target": {
105
+ "type": ["string", "null"]
106
+ },
107
+ "classification": {
108
+ "type": "string",
109
+ "enum": ["pending", "A", "B", "C", "D"]
110
+ },
111
+ "verificationStatus": {
112
+ "type": "string",
113
+ "enum": ["pending", "build-green", "build-red", "smoke-green", "smoke-red"]
114
+ },
115
+ "build": {
116
+ "type": "object",
117
+ "required": ["passed", "durationMs"],
118
+ "properties": {
119
+ "passed": {
120
+ "type": ["boolean", "null"]
121
+ },
122
+ "durationMs": {
123
+ "type": "number",
124
+ "minimum": 0
125
+ }
126
+ },
127
+ "additionalProperties": false
128
+ },
129
+ "smoke": {
130
+ "type": "object",
131
+ "required": [
132
+ "passed",
133
+ "durationMs",
134
+ "rootDocumentOk",
135
+ "titleOk",
136
+ "langOk",
137
+ "viewportOk",
138
+ "charsetOk",
139
+ "cspSignalOk",
140
+ "inlineScriptCount",
141
+ "inlineEventHandlerCount",
142
+ "externalScriptsWithoutIntegrityCount",
143
+ "externalScriptsWithIntegrityMissingCrossoriginCount",
144
+ "externalStylesheetsWithoutIntegrityCount",
145
+ "externalStylesheetsWithIntegrityMissingCrossoriginCount",
146
+ "externalScriptsWithInsecureTransportCount",
147
+ "externalStylesheetsWithInsecureTransportCount",
148
+ "externalMediaSourcesWithInsecureTransportCount",
149
+ "externalBlankLinksWithoutRelCount",
150
+ "externalIframesWithoutSandboxCount",
151
+ "externalIframesWithInsecureTransportCount",
152
+ "jsEvalSignalCount",
153
+ "jsHtmlInjectionSignalCount",
154
+ "jsInsecureTransportSignalCount",
155
+ "jsSecretSignalCount",
156
+ "assetCount",
157
+ "assetsPassed",
158
+ "routeHintsChecked",
159
+ "routeHintsMatched",
160
+ "routeHintsCoverageOk",
161
+ "routeDocumentsChecked",
162
+ "routeDocumentsPassed",
163
+ "routeDocumentsHardenedCount",
164
+ "routeDocumentsCoverageOk",
165
+ "routeDocumentsHardeningOk",
166
+ "fullRouteCoverageOk",
167
+ "totalAssetBytes",
168
+ "jsAssetBytes",
169
+ "cssAssetBytes",
170
+ "largestAssetPath",
171
+ "largestAssetBytes",
172
+ "failures"
173
+ ],
174
+ "properties": {
175
+ "passed": {
176
+ "type": ["boolean", "null"]
177
+ },
178
+ "durationMs": {
179
+ "type": "number",
180
+ "minimum": 0
181
+ },
182
+ "rootDocumentOk": {
183
+ "type": "boolean"
184
+ },
185
+ "titleOk": {
186
+ "type": "boolean"
187
+ },
188
+ "langOk": {
189
+ "type": "boolean"
190
+ },
191
+ "viewportOk": {
192
+ "type": "boolean"
193
+ },
194
+ "charsetOk": {
195
+ "type": "boolean"
196
+ },
197
+ "cspSignalOk": {
198
+ "type": "boolean"
199
+ },
200
+ "inlineScriptCount": {
201
+ "type": "number",
202
+ "minimum": 0
203
+ },
204
+ "inlineEventHandlerCount": {
205
+ "type": "number",
206
+ "minimum": 0
207
+ },
208
+ "externalScriptsWithoutIntegrityCount": {
209
+ "type": "number",
210
+ "minimum": 0
211
+ },
212
+ "externalScriptsWithIntegrityMissingCrossoriginCount": {
213
+ "type": "number",
214
+ "minimum": 0
215
+ },
216
+ "externalStylesheetsWithoutIntegrityCount": {
217
+ "type": "number",
218
+ "minimum": 0
219
+ },
220
+ "externalStylesheetsWithIntegrityMissingCrossoriginCount": {
221
+ "type": "number",
222
+ "minimum": 0
223
+ },
224
+ "externalScriptsWithInsecureTransportCount": {
225
+ "type": "number",
226
+ "minimum": 0
227
+ },
228
+ "externalStylesheetsWithInsecureTransportCount": {
229
+ "type": "number",
230
+ "minimum": 0
231
+ },
232
+ "externalMediaSourcesWithInsecureTransportCount": {
233
+ "type": "number",
234
+ "minimum": 0
235
+ },
236
+ "externalBlankLinksWithoutRelCount": {
237
+ "type": "number",
238
+ "minimum": 0
239
+ },
240
+ "externalIframesWithoutSandboxCount": {
241
+ "type": "number",
242
+ "minimum": 0
243
+ },
244
+ "externalIframesWithInsecureTransportCount": {
245
+ "type": "number",
246
+ "minimum": 0
247
+ },
248
+ "jsEvalSignalCount": {
249
+ "type": "number",
250
+ "minimum": 0
251
+ },
252
+ "jsHtmlInjectionSignalCount": {
253
+ "type": "number",
254
+ "minimum": 0
255
+ },
256
+ "jsInsecureTransportSignalCount": {
257
+ "type": "number",
258
+ "minimum": 0
259
+ },
260
+ "jsSecretSignalCount": {
261
+ "type": "number",
262
+ "minimum": 0
263
+ },
264
+ "assetCount": {
265
+ "type": "number",
266
+ "minimum": 0
267
+ },
268
+ "assetsPassed": {
269
+ "type": "number",
270
+ "minimum": 0
271
+ },
272
+ "routeHintsChecked": {
273
+ "$ref": "https://decantr.ai/schemas/verification-report.common.v1.json#/$defs/stringArray"
274
+ },
275
+ "routeHintsMatched": {
276
+ "type": "number",
277
+ "minimum": 0
278
+ },
279
+ "routeHintsCoverageOk": {
280
+ "type": "boolean"
281
+ },
282
+ "routeDocumentsChecked": {
283
+ "type": "number",
284
+ "minimum": 0
285
+ },
286
+ "routeDocumentsPassed": {
287
+ "type": "number",
288
+ "minimum": 0
289
+ },
290
+ "routeDocumentsHardenedCount": {
291
+ "type": "number",
292
+ "minimum": 0
293
+ },
294
+ "routeDocumentsCoverageOk": {
295
+ "type": "boolean"
296
+ },
297
+ "routeDocumentsHardeningOk": {
298
+ "type": "boolean"
299
+ },
300
+ "fullRouteCoverageOk": {
301
+ "type": "boolean"
302
+ },
303
+ "totalAssetBytes": {
304
+ "type": "number",
305
+ "minimum": 0
306
+ },
307
+ "jsAssetBytes": {
308
+ "type": "number",
309
+ "minimum": 0
310
+ },
311
+ "cssAssetBytes": {
312
+ "type": "number",
313
+ "minimum": 0
314
+ },
315
+ "largestAssetPath": {
316
+ "type": ["string", "null"]
317
+ },
318
+ "largestAssetBytes": {
319
+ "type": "number",
320
+ "minimum": 0
321
+ },
322
+ "failures": {
323
+ "$ref": "https://decantr.ai/schemas/verification-report.common.v1.json#/$defs/stringArray"
324
+ }
325
+ },
326
+ "additionalProperties": false
327
+ },
328
+ "drift": {
329
+ "type": "object",
330
+ "required": [
331
+ "signal",
332
+ "penalty",
333
+ "inlineStyleCount",
334
+ "hardcodedColorCount",
335
+ "utilityLeakageCount",
336
+ "decantrTreatmentCount",
337
+ "hasPackManifest",
338
+ "hasDist"
339
+ ],
340
+ "properties": {
341
+ "signal": {
342
+ "type": "string",
343
+ "enum": ["lower", "moderate", "elevated"]
344
+ },
345
+ "penalty": {
346
+ "type": "number"
347
+ },
348
+ "inlineStyleCount": {
349
+ "type": "number",
350
+ "minimum": 0
351
+ },
352
+ "hardcodedColorCount": {
353
+ "type": "number",
354
+ "minimum": 0
355
+ },
356
+ "utilityLeakageCount": {
357
+ "type": "number",
358
+ "minimum": 0
359
+ },
360
+ "decantrTreatmentCount": {
361
+ "type": "number",
362
+ "minimum": 0
363
+ },
364
+ "hasPackManifest": {
365
+ "type": "boolean"
366
+ },
367
+ "hasDist": {
368
+ "type": "boolean"
369
+ }
370
+ },
371
+ "additionalProperties": false
372
+ }
373
+ },
374
+ "additionalProperties": false
375
+ }
376
+ },
377
+ "additionalProperties": false
378
+ }
@@ -0,0 +1,76 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://decantr.ai/schemas/verification-report.common.v1.json",
4
+ "title": "Decantr Verification Report Common Definitions",
5
+ "$defs": {
6
+ "nonEmptyString": {
7
+ "type": "string",
8
+ "minLength": 1
9
+ },
10
+ "stringArray": {
11
+ "type": "array",
12
+ "items": {
13
+ "type": "string"
14
+ }
15
+ },
16
+ "verificationFinding": {
17
+ "type": "object",
18
+ "required": ["id", "category", "severity", "message", "evidence"],
19
+ "properties": {
20
+ "id": {
21
+ "$ref": "#/$defs/nonEmptyString"
22
+ },
23
+ "category": {
24
+ "$ref": "#/$defs/nonEmptyString"
25
+ },
26
+ "severity": {
27
+ "type": "string",
28
+ "enum": ["error", "warn", "info"]
29
+ },
30
+ "message": {
31
+ "$ref": "#/$defs/nonEmptyString"
32
+ },
33
+ "evidence": {
34
+ "$ref": "#/$defs/stringArray"
35
+ },
36
+ "target": {
37
+ "type": "string"
38
+ },
39
+ "file": {
40
+ "type": "string"
41
+ },
42
+ "rule": {
43
+ "type": "string"
44
+ },
45
+ "suggestedFix": {
46
+ "type": "string"
47
+ }
48
+ },
49
+ "additionalProperties": false
50
+ },
51
+ "verificationScore": {
52
+ "type": "object",
53
+ "required": ["category", "focusArea", "score", "details", "suggestions"],
54
+ "properties": {
55
+ "category": {
56
+ "$ref": "#/$defs/nonEmptyString"
57
+ },
58
+ "focusArea": {
59
+ "$ref": "#/$defs/nonEmptyString"
60
+ },
61
+ "score": {
62
+ "type": "number",
63
+ "minimum": 0,
64
+ "maximum": 5
65
+ },
66
+ "details": {
67
+ "$ref": "#/$defs/nonEmptyString"
68
+ },
69
+ "suggestions": {
70
+ "$ref": "#/$defs/stringArray"
71
+ }
72
+ },
73
+ "additionalProperties": false
74
+ }
75
+ }
76
+ }