privalint 0.6.0 → 0.6.1

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,857 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://github.com/JExcellence/privalint/raw/refs/heads/main/schemas/report-1.2.0.schema.json",
4
+ "title": "PrivaLint scan report 1.2.0",
5
+ "description": "Structural contract; not a guarantee of complete observation, URL safety or legal compliance. Counter equations and page-ID references require semantic checks.",
6
+ "type": "object",
7
+ "properties": {
8
+ "scanId": {
9
+ "type": "string",
10
+ "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
11
+ },
12
+ "schemaVersion": {
13
+ "const": "1.2.0"
14
+ },
15
+ "scannerVersion": {
16
+ "type": "string",
17
+ "minLength": 1
18
+ },
19
+ "options": {
20
+ "$ref": "#/$defs/options"
21
+ },
22
+ "siteUrl": {
23
+ "type": "string"
24
+ },
25
+ "lang": {
26
+ "type": "string",
27
+ "enum": [
28
+ "en",
29
+ "de"
30
+ ]
31
+ },
32
+ "region": {
33
+ "type": "string",
34
+ "enum": [
35
+ "de",
36
+ "at",
37
+ "ch",
38
+ "eu"
39
+ ]
40
+ },
41
+ "scannedAt": {
42
+ "type": "string",
43
+ "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"
44
+ },
45
+ "durationMs": {
46
+ "type": "number",
47
+ "minimum": 0
48
+ },
49
+ "pages": {
50
+ "type": "array",
51
+ "items": {
52
+ "$ref": "#/$defs/page"
53
+ }
54
+ },
55
+ "consent": {
56
+ "$ref": "#/$defs/consent"
57
+ },
58
+ "findings": {
59
+ "type": "array",
60
+ "items": {
61
+ "$ref": "#/$defs/finding"
62
+ }
63
+ },
64
+ "rules": {
65
+ "type": "array",
66
+ "items": {
67
+ "$ref": "#/$defs/rule"
68
+ }
69
+ },
70
+ "coverage": {
71
+ "type": "string",
72
+ "enum": [
73
+ "complete",
74
+ "partial"
75
+ ]
76
+ }
77
+ },
78
+ "required": [
79
+ "scanId",
80
+ "schemaVersion",
81
+ "scannerVersion",
82
+ "options",
83
+ "siteUrl",
84
+ "lang",
85
+ "region",
86
+ "scannedAt",
87
+ "durationMs",
88
+ "pages",
89
+ "findings",
90
+ "rules",
91
+ "coverage"
92
+ ],
93
+ "$defs": {
94
+ "diagnostic": {
95
+ "type": "object",
96
+ "properties": {
97
+ "kind": {
98
+ "type": "string",
99
+ "enum": [
100
+ "security-blocked",
101
+ "unsupported-method",
102
+ "unsupported-protocol",
103
+ "dns",
104
+ "tls",
105
+ "connection",
106
+ "timeout",
107
+ "resource-limit",
108
+ "http-error",
109
+ "browser-failure",
110
+ "skipped",
111
+ "aborted"
112
+ ]
113
+ },
114
+ "phase": {
115
+ "type": "string",
116
+ "enum": [
117
+ "before-consent",
118
+ "after-reject"
119
+ ]
120
+ },
121
+ "url": {
122
+ "type": "string",
123
+ "pattern": "^(https?://[^/?#@\\s]+/\\[redacted\\]|\\[redacted\\])$"
124
+ },
125
+ "status": {
126
+ "type": "integer",
127
+ "minimum": 100,
128
+ "maximum": 599
129
+ },
130
+ "limit": {
131
+ "type": "string",
132
+ "enum": [
133
+ "requests",
134
+ "response-bytes",
135
+ "total-bytes",
136
+ "redirects"
137
+ ]
138
+ },
139
+ "skippedReason": {
140
+ "type": "string",
141
+ "enum": [
142
+ "beacon",
143
+ "unsupported-method",
144
+ "unsupported-protocol",
145
+ "policy",
146
+ "cancelled-by-page"
147
+ ]
148
+ }
149
+ },
150
+ "required": [
151
+ "kind",
152
+ "phase",
153
+ "url"
154
+ ]
155
+ },
156
+ "diagnostics": {
157
+ "type": "object",
158
+ "properties": {
159
+ "requests": {
160
+ "type": "integer",
161
+ "minimum": 0
162
+ },
163
+ "omittedRequests": {
164
+ "type": "integer",
165
+ "minimum": 0
166
+ },
167
+ "responses": {
168
+ "type": "integer",
169
+ "minimum": 0
170
+ },
171
+ "finished": {
172
+ "type": "integer",
173
+ "minimum": 0
174
+ },
175
+ "failed": {
176
+ "type": "integer",
177
+ "minimum": 0
178
+ },
179
+ "blocked": {
180
+ "type": "integer",
181
+ "minimum": 0
182
+ },
183
+ "skippedRequests": {
184
+ "type": "integer",
185
+ "minimum": 0
186
+ },
187
+ "failedRequests": {
188
+ "type": "integer",
189
+ "minimum": 0
190
+ },
191
+ "securityBlockedRequests": {
192
+ "type": "integer",
193
+ "minimum": 0
194
+ },
195
+ "httpErrors": {
196
+ "type": "integer",
197
+ "minimum": 0
198
+ },
199
+ "bytes": {
200
+ "type": "integer",
201
+ "minimum": 0
202
+ },
203
+ "issueCount": {
204
+ "type": "integer",
205
+ "minimum": 0
206
+ },
207
+ "dropped": {
208
+ "type": "integer",
209
+ "minimum": 0
210
+ },
211
+ "issues": {
212
+ "type": "array",
213
+ "items": {
214
+ "$ref": "#/$defs/diagnostic"
215
+ }
216
+ }
217
+ },
218
+ "required": [
219
+ "requests",
220
+ "omittedRequests",
221
+ "responses",
222
+ "finished",
223
+ "failed",
224
+ "blocked",
225
+ "skippedRequests",
226
+ "failedRequests",
227
+ "securityBlockedRequests",
228
+ "httpErrors",
229
+ "bytes",
230
+ "issueCount",
231
+ "dropped",
232
+ "issues"
233
+ ]
234
+ },
235
+ "capture": {
236
+ "type": "object",
237
+ "properties": {
238
+ "complete": {
239
+ "type": "boolean"
240
+ },
241
+ "beforeConsentComplete": {
242
+ "type": "boolean"
243
+ },
244
+ "document": {
245
+ "type": "boolean"
246
+ },
247
+ "diagnostics": {
248
+ "$ref": "#/$defs/diagnostics"
249
+ }
250
+ },
251
+ "required": [
252
+ "complete",
253
+ "beforeConsentComplete",
254
+ "document",
255
+ "diagnostics"
256
+ ],
257
+ "allOf": [
258
+ {
259
+ "if": {
260
+ "properties": {
261
+ "complete": {
262
+ "const": true
263
+ }
264
+ },
265
+ "required": [
266
+ "complete"
267
+ ]
268
+ },
269
+ "then": {
270
+ "properties": {
271
+ "document": {
272
+ "const": true
273
+ },
274
+ "beforeConsentComplete": {
275
+ "const": true
276
+ },
277
+ "diagnostics": {
278
+ "type": "object",
279
+ "properties": {
280
+ "omittedRequests": {
281
+ "const": 0
282
+ },
283
+ "failed": {
284
+ "const": 0
285
+ },
286
+ "blocked": {
287
+ "const": 0
288
+ },
289
+ "skippedRequests": {
290
+ "const": 0
291
+ },
292
+ "failedRequests": {
293
+ "const": 0
294
+ },
295
+ "securityBlockedRequests": {
296
+ "const": 0
297
+ },
298
+ "httpErrors": {
299
+ "const": 0
300
+ },
301
+ "issueCount": {
302
+ "const": 0
303
+ },
304
+ "dropped": {
305
+ "const": 0
306
+ }
307
+ }
308
+ }
309
+ }
310
+ }
311
+ }
312
+ ]
313
+ },
314
+ "evaluation": {
315
+ "type": "object",
316
+ "properties": {
317
+ "pageId": {
318
+ "type": "string",
319
+ "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
320
+ },
321
+ "ruleId": {
322
+ "type": "string"
323
+ },
324
+ "status": {
325
+ "type": "string",
326
+ "enum": [
327
+ "executed",
328
+ "skipped",
329
+ "not-evaluable"
330
+ ]
331
+ },
332
+ "reason": {
333
+ "type": "string",
334
+ "enum": [
335
+ "disabled",
336
+ "consent-disabled",
337
+ "not-start-page",
338
+ "missing-observation",
339
+ "no-consent-needed"
340
+ ]
341
+ },
342
+ "partial": {
343
+ "type": "boolean"
344
+ },
345
+ "outcome": {
346
+ "type": "string",
347
+ "enum": [
348
+ "checked-no-finding",
349
+ "finding-detected",
350
+ "not-evaluable"
351
+ ]
352
+ },
353
+ "explanation": {
354
+ "type": "string",
355
+ "enum": [
356
+ "disabled",
357
+ "not-start-page",
358
+ "consent-disabled",
359
+ "missing-reject-observation",
360
+ "missing-consent-observation",
361
+ "incomplete-document",
362
+ "positive-evidence",
363
+ "incomplete-observation",
364
+ "required-observations-available",
365
+ "no-supported-banner",
366
+ "no-supported-reject-control",
367
+ "unsupported-banner-markup",
368
+ "browser-interaction-failed",
369
+ "reject-clicked-and-reloaded",
370
+ "no-consent-needed"
371
+ ]
372
+ },
373
+ "findingCount": {
374
+ "type": "integer",
375
+ "minimum": 0
376
+ }
377
+ },
378
+ "required": [
379
+ "pageId",
380
+ "ruleId",
381
+ "status",
382
+ "partial",
383
+ "outcome",
384
+ "explanation",
385
+ "findingCount"
386
+ ],
387
+ "allOf": [
388
+ {
389
+ "if": {
390
+ "properties": {
391
+ "outcome": {
392
+ "const": "checked-no-finding"
393
+ }
394
+ },
395
+ "required": [
396
+ "outcome"
397
+ ]
398
+ },
399
+ "then": {
400
+ "properties": {
401
+ "findingCount": {
402
+ "const": 0
403
+ },
404
+ "partial": {
405
+ "const": false
406
+ },
407
+ "status": {
408
+ "const": "executed"
409
+ }
410
+ }
411
+ }
412
+ },
413
+ {
414
+ "if": {
415
+ "properties": {
416
+ "outcome": {
417
+ "const": "finding-detected"
418
+ }
419
+ },
420
+ "required": [
421
+ "outcome"
422
+ ]
423
+ },
424
+ "then": {
425
+ "properties": {
426
+ "findingCount": {
427
+ "type": "integer",
428
+ "minimum": 1
429
+ },
430
+ "status": {
431
+ "const": "executed"
432
+ }
433
+ }
434
+ }
435
+ }
436
+ ]
437
+ },
438
+ "page": {
439
+ "type": "object",
440
+ "properties": {
441
+ "pageId": {
442
+ "type": "string",
443
+ "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
444
+ },
445
+ "url": {
446
+ "type": "string"
447
+ },
448
+ "finalUrl": {
449
+ "type": "string"
450
+ },
451
+ "status": {
452
+ "anyOf": [
453
+ {
454
+ "type": "integer",
455
+ "minimum": 100,
456
+ "maximum": 599
457
+ },
458
+ {
459
+ "type": "null"
460
+ }
461
+ ]
462
+ },
463
+ "requestCount": {
464
+ "type": "integer",
465
+ "minimum": 0
466
+ },
467
+ "cookieCount": {
468
+ "type": "integer",
469
+ "minimum": 0
470
+ },
471
+ "error": {
472
+ "type": "string"
473
+ },
474
+ "capture": {
475
+ "$ref": "#/$defs/capture"
476
+ },
477
+ "ruleEvaluations": {
478
+ "type": "array",
479
+ "items": {
480
+ "$ref": "#/$defs/evaluation"
481
+ }
482
+ }
483
+ },
484
+ "required": [
485
+ "pageId",
486
+ "url",
487
+ "finalUrl",
488
+ "status",
489
+ "requestCount",
490
+ "cookieCount",
491
+ "capture",
492
+ "ruleEvaluations"
493
+ ]
494
+ },
495
+ "finding": {
496
+ "type": "object",
497
+ "properties": {
498
+ "pageId": {
499
+ "type": "string",
500
+ "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
501
+ },
502
+ "ruleId": {
503
+ "type": "string"
504
+ },
505
+ "severity": {
506
+ "type": "string",
507
+ "enum": [
508
+ "error",
509
+ "warning",
510
+ "info"
511
+ ]
512
+ },
513
+ "message": {
514
+ "type": "string"
515
+ },
516
+ "pageUrl": {
517
+ "type": "string"
518
+ },
519
+ "evidence": {
520
+ "type": "array",
521
+ "items": {
522
+ "type": "string"
523
+ }
524
+ },
525
+ "fix": {
526
+ "type": "string"
527
+ },
528
+ "subject": {
529
+ "type": "string"
530
+ },
531
+ "references": {
532
+ "type": "array",
533
+ "items": {
534
+ "type": "string"
535
+ }
536
+ },
537
+ "policy": {
538
+ "type": "object",
539
+ "properties": {
540
+ "allowed": {
541
+ "type": "boolean"
542
+ },
543
+ "originalSeverity": {
544
+ "type": "string",
545
+ "enum": [
546
+ "error",
547
+ "warning",
548
+ "info"
549
+ ]
550
+ }
551
+ },
552
+ "required": [
553
+ "allowed",
554
+ "originalSeverity"
555
+ ]
556
+ }
557
+ },
558
+ "required": [
559
+ "pageId",
560
+ "ruleId",
561
+ "severity",
562
+ "message",
563
+ "pageUrl",
564
+ "evidence"
565
+ ]
566
+ },
567
+ "consent": {
568
+ "type": "object",
569
+ "properties": {
570
+ "bannerFound": {
571
+ "type": "boolean"
572
+ },
573
+ "rejected": {
574
+ "type": "boolean"
575
+ },
576
+ "state": {
577
+ "type": "string",
578
+ "enum": [
579
+ "not-detected",
580
+ "reject-unavailable",
581
+ "interaction-failed",
582
+ "reject-tested"
583
+ ]
584
+ },
585
+ "outcome": {
586
+ "type": "string",
587
+ "enum": [
588
+ "no-banner-detected",
589
+ "unsupported-banner",
590
+ "interaction-failed",
591
+ "reject-succeeded"
592
+ ]
593
+ },
594
+ "reason": {
595
+ "type": "string",
596
+ "enum": [
597
+ "no-supported-banner",
598
+ "no-supported-reject-control",
599
+ "unsupported-banner-markup",
600
+ "browser-interaction-failed",
601
+ "reject-clicked-and-reloaded"
602
+ ]
603
+ },
604
+ "cmp": {
605
+ "type": "string"
606
+ },
607
+ "acceptLabel": {
608
+ "type": "string"
609
+ },
610
+ "rejectLabel": {
611
+ "type": "string"
612
+ },
613
+ "payOrOk": {
614
+ "type": "boolean"
615
+ },
616
+ "afterRejectComplete": {
617
+ "type": "boolean"
618
+ },
619
+ "settingsControl": {
620
+ "type": "object",
621
+ "properties": {
622
+ "found": {
623
+ "type": "boolean"
624
+ },
625
+ "label": {
626
+ "type": "string"
627
+ }
628
+ },
629
+ "required": [
630
+ "found"
631
+ ]
632
+ },
633
+ "error": {
634
+ "type": "string"
635
+ }
636
+ },
637
+ "required": [
638
+ "bannerFound",
639
+ "rejected",
640
+ "state",
641
+ "outcome",
642
+ "reason"
643
+ ]
644
+ },
645
+ "rule": {
646
+ "type": "object",
647
+ "properties": {
648
+ "id": {
649
+ "type": "string"
650
+ },
651
+ "title": {
652
+ "type": "string"
653
+ },
654
+ "description": {
655
+ "type": "string"
656
+ },
657
+ "references": {
658
+ "type": "array",
659
+ "items": {
660
+ "type": "string"
661
+ }
662
+ },
663
+ "requires": {
664
+ "type": "array",
665
+ "items": {
666
+ "type": "string",
667
+ "enum": [
668
+ "document",
669
+ "network",
670
+ "consent",
671
+ "after-reject"
672
+ ]
673
+ }
674
+ }
675
+ },
676
+ "required": [
677
+ "id",
678
+ "title",
679
+ "description",
680
+ "references"
681
+ ]
682
+ },
683
+ "networkLimits": {
684
+ "type": "object",
685
+ "properties": {
686
+ "concurrency": {
687
+ "type": "integer",
688
+ "minimum": 1
689
+ },
690
+ "maxRequests": {
691
+ "type": "integer",
692
+ "minimum": 1
693
+ },
694
+ "maxResponseBytes": {
695
+ "type": "integer",
696
+ "minimum": 1
697
+ },
698
+ "maxTotalBytes": {
699
+ "type": "integer",
700
+ "minimum": 1
701
+ },
702
+ "maxRedirects": {
703
+ "type": "integer",
704
+ "minimum": 0
705
+ },
706
+ "requestTimeoutMs": {
707
+ "type": "integer",
708
+ "minimum": 1
709
+ }
710
+ },
711
+ "required": [
712
+ "concurrency",
713
+ "maxRequests",
714
+ "maxResponseBytes",
715
+ "maxTotalBytes",
716
+ "maxRedirects",
717
+ "requestTimeoutMs"
718
+ ]
719
+ },
720
+ "options": {
721
+ "type": "object",
722
+ "properties": {
723
+ "maxPages": {
724
+ "type": "integer",
725
+ "minimum": 1
726
+ },
727
+ "settleMs": {
728
+ "type": "integer",
729
+ "minimum": 0
730
+ },
731
+ "timeoutMs": {
732
+ "type": "integer",
733
+ "minimum": 1
734
+ },
735
+ "locale": {
736
+ "type": "string"
737
+ },
738
+ "lang": {
739
+ "type": "string",
740
+ "enum": [
741
+ "en",
742
+ "de"
743
+ ]
744
+ },
745
+ "region": {
746
+ "type": "string",
747
+ "enum": [
748
+ "de",
749
+ "at",
750
+ "ch",
751
+ "eu"
752
+ ]
753
+ },
754
+ "consentCheck": {
755
+ "type": "boolean"
756
+ },
757
+ "headed": {
758
+ "type": "boolean"
759
+ },
760
+ "channel": {
761
+ "type": "string"
762
+ },
763
+ "captureTimeoutMs": {
764
+ "anyOf": [
765
+ {
766
+ "type": "integer",
767
+ "minimum": 1
768
+ },
769
+ {
770
+ "type": "null"
771
+ }
772
+ ]
773
+ },
774
+ "maxDiagnostics": {
775
+ "type": "integer",
776
+ "minimum": 0
777
+ },
778
+ "failureMode": {
779
+ "type": "string",
780
+ "enum": [
781
+ "throw",
782
+ "report"
783
+ ]
784
+ },
785
+ "captureMode": {
786
+ "type": "string",
787
+ "enum": [
788
+ "native",
789
+ "adapter",
790
+ "offline-fixture"
791
+ ]
792
+ },
793
+ "networkLimits": {
794
+ "anyOf": [
795
+ {
796
+ "$ref": "#/$defs/networkLimits"
797
+ },
798
+ {
799
+ "type": "null"
800
+ }
801
+ ]
802
+ },
803
+ "selectedRules": {
804
+ "type": "array",
805
+ "items": {
806
+ "type": "string"
807
+ },
808
+ "uniqueItems": true
809
+ },
810
+ "ruleSettings": {
811
+ "type": "object",
812
+ "additionalProperties": {
813
+ "type": "string",
814
+ "enum": [
815
+ "error",
816
+ "warning",
817
+ "info",
818
+ "off"
819
+ ]
820
+ }
821
+ },
822
+ "allowedVendors": {
823
+ "type": "array",
824
+ "items": {
825
+ "type": "string"
826
+ }
827
+ },
828
+ "sandbox": {
829
+ "type": "boolean"
830
+ },
831
+ "concurrency": {
832
+ "type": "integer",
833
+ "minimum": 1
834
+ }
835
+ },
836
+ "required": [
837
+ "maxPages",
838
+ "settleMs",
839
+ "timeoutMs",
840
+ "locale",
841
+ "lang",
842
+ "region",
843
+ "consentCheck",
844
+ "headed",
845
+ "channel",
846
+ "captureTimeoutMs",
847
+ "maxDiagnostics",
848
+ "failureMode",
849
+ "captureMode",
850
+ "networkLimits",
851
+ "selectedRules",
852
+ "ruleSettings",
853
+ "allowedVendors"
854
+ ]
855
+ }
856
+ }
857
+ }