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