@appport/assessment 0.0.0-stage → 0.1.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,1467 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://appport.dev/schemas/appport/1/application-assessment-2.schema.json",
4
+ "title": "AppWorks existing-application assessment (format 2: adds HTTP routes read from JavaScript and TypeScript)",
5
+ "description": "appport.application-assessment/2: an evidence-backed capability inventory of a repository from a static reading. It verifies no behavior, grants no authority and registers nothing. See spec/assessment-1.md.",
6
+ "type": "object",
7
+ "properties": {
8
+ "format": {
9
+ "const": "appport.application-assessment/2"
10
+ },
11
+ "assessment": {
12
+ "type": "object",
13
+ "properties": {
14
+ "id": {
15
+ "type": "string",
16
+ "minLength": 1
17
+ },
18
+ "createdAt": {
19
+ "type": "string",
20
+ "format": "date-time"
21
+ }
22
+ },
23
+ "required": [
24
+ "id",
25
+ "createdAt"
26
+ ],
27
+ "additionalProperties": false
28
+ },
29
+ "tool": {
30
+ "type": "object",
31
+ "properties": {
32
+ "name": {
33
+ "type": "string"
34
+ },
35
+ "version": {
36
+ "type": "string"
37
+ }
38
+ },
39
+ "required": [
40
+ "name",
41
+ "version"
42
+ ],
43
+ "additionalProperties": false
44
+ },
45
+ "target": {
46
+ "type": "object",
47
+ "properties": {
48
+ "name": {
49
+ "type": "string",
50
+ "minLength": 1
51
+ },
52
+ "nameSource": {
53
+ "enum": [
54
+ "go.mod",
55
+ "package.json",
56
+ "directory"
57
+ ]
58
+ },
59
+ "repository": {
60
+ "type": "string"
61
+ },
62
+ "revision": {
63
+ "type": "string",
64
+ "pattern": "^[0-9a-f]{40,64}$"
65
+ },
66
+ "ref": {
67
+ "type": "string"
68
+ }
69
+ },
70
+ "required": [
71
+ "name",
72
+ "nameSource"
73
+ ],
74
+ "additionalProperties": false
75
+ },
76
+ "configuration": {
77
+ "$ref": "#/$defs/configuration"
78
+ },
79
+ "coverage": {
80
+ "$ref": "#/$defs/coverage"
81
+ },
82
+ "evidence": {
83
+ "type": "array",
84
+ "items": {
85
+ "$ref": "#/$defs/evidence"
86
+ }
87
+ },
88
+ "inventory": {
89
+ "$ref": "#/$defs/inventory"
90
+ },
91
+ "candidates": {
92
+ "type": "array",
93
+ "items": {
94
+ "$ref": "#/$defs/candidate"
95
+ }
96
+ },
97
+ "recommendation": {
98
+ "anyOf": [
99
+ {
100
+ "type": "null"
101
+ },
102
+ {
103
+ "$ref": "#/$defs/recommendation"
104
+ }
105
+ ]
106
+ },
107
+ "findings": {
108
+ "type": "array",
109
+ "items": {
110
+ "$ref": "#/$defs/finding"
111
+ }
112
+ },
113
+ "limitations": {
114
+ "type": "array",
115
+ "items": {
116
+ "type": "object",
117
+ "properties": {
118
+ "code": {
119
+ "type": "string"
120
+ },
121
+ "description": {
122
+ "type": "string"
123
+ }
124
+ },
125
+ "required": [
126
+ "code",
127
+ "description"
128
+ ],
129
+ "additionalProperties": false
130
+ }
131
+ },
132
+ "questions": {
133
+ "type": "array",
134
+ "items": {
135
+ "$ref": "#/$defs/question"
136
+ }
137
+ },
138
+ "scope": {
139
+ "type": "object",
140
+ "properties": {
141
+ "grantsAuthority": {
142
+ "const": false
143
+ },
144
+ "verifiesBehavior": {
145
+ "const": false
146
+ },
147
+ "modifiesTarget": {
148
+ "const": false
149
+ }
150
+ },
151
+ "required": [
152
+ "grantsAuthority",
153
+ "verifiesBehavior",
154
+ "modifiesTarget"
155
+ ],
156
+ "additionalProperties": false
157
+ },
158
+ "digest": {
159
+ "type": "string",
160
+ "pattern": "^sha256:[0-9a-f]{64}$"
161
+ }
162
+ },
163
+ "required": [
164
+ "format",
165
+ "assessment",
166
+ "tool",
167
+ "target",
168
+ "configuration",
169
+ "coverage",
170
+ "evidence",
171
+ "inventory",
172
+ "candidates",
173
+ "recommendation",
174
+ "findings",
175
+ "limitations",
176
+ "questions",
177
+ "scope",
178
+ "digest"
179
+ ],
180
+ "additionalProperties": false,
181
+ "$defs": {
182
+ "evidenceId": {
183
+ "type": "string",
184
+ "pattern": "^ev-[0-9a-f]{16}$"
185
+ },
186
+ "location": {
187
+ "type": "object",
188
+ "properties": {
189
+ "path": {
190
+ "type": "string",
191
+ "minLength": 1,
192
+ "pattern": "^(?!/)(?!.*(^|/)\\.\\.(/|$)).+$"
193
+ },
194
+ "startLine": {
195
+ "type": "integer",
196
+ "minimum": 1
197
+ },
198
+ "endLine": {
199
+ "type": "integer",
200
+ "minimum": 1
201
+ }
202
+ },
203
+ "required": [
204
+ "path",
205
+ "startLine",
206
+ "endLine"
207
+ ],
208
+ "additionalProperties": false
209
+ },
210
+ "evidence": {
211
+ "type": "object",
212
+ "properties": {
213
+ "id": {
214
+ "$ref": "#/$defs/evidenceId"
215
+ },
216
+ "class": {
217
+ "enum": [
218
+ "observed",
219
+ "inferred",
220
+ "unknown"
221
+ ]
222
+ },
223
+ "kind": {
224
+ "type": "string",
225
+ "minLength": 1
226
+ },
227
+ "location": {
228
+ "$ref": "#/$defs/location"
229
+ },
230
+ "subject": {
231
+ "type": "string"
232
+ },
233
+ "observation": {
234
+ "type": "string",
235
+ "minLength": 1
236
+ },
237
+ "method": {
238
+ "enum": [
239
+ "scanner",
240
+ "manifest-parse",
241
+ "proto-static",
242
+ "go-static",
243
+ "path-convention",
244
+ "git-metadata",
245
+ "derivation",
246
+ "js-static"
247
+ ]
248
+ },
249
+ "basis": {
250
+ "type": "array",
251
+ "items": {
252
+ "$ref": "#/$defs/evidenceId"
253
+ },
254
+ "minItems": 1
255
+ },
256
+ "limitations": {
257
+ "type": "array",
258
+ "items": {
259
+ "type": "string"
260
+ },
261
+ "minItems": 1
262
+ }
263
+ },
264
+ "required": [
265
+ "id",
266
+ "class",
267
+ "kind",
268
+ "observation",
269
+ "method"
270
+ ],
271
+ "additionalProperties": false
272
+ },
273
+ "field": {
274
+ "type": "object",
275
+ "properties": {
276
+ "name": {
277
+ "type": "string"
278
+ },
279
+ "jsonName": {
280
+ "type": "string"
281
+ },
282
+ "type": {
283
+ "type": "string"
284
+ },
285
+ "label": {
286
+ "enum": [
287
+ "singular",
288
+ "optional",
289
+ "repeated",
290
+ "required"
291
+ ]
292
+ },
293
+ "behaviors": {
294
+ "type": "array",
295
+ "items": {
296
+ "type": "string"
297
+ }
298
+ },
299
+ "oneof": {
300
+ "type": "string"
301
+ },
302
+ "evidence": {
303
+ "type": "array",
304
+ "items": {
305
+ "$ref": "#/$defs/evidenceId"
306
+ }
307
+ }
308
+ },
309
+ "required": [
310
+ "name",
311
+ "jsonName",
312
+ "type",
313
+ "label",
314
+ "behaviors",
315
+ "evidence"
316
+ ],
317
+ "additionalProperties": false
318
+ },
319
+ "message": {
320
+ "type": "object",
321
+ "properties": {
322
+ "message": {
323
+ "type": "string"
324
+ },
325
+ "resolved": {
326
+ "type": "boolean"
327
+ },
328
+ "fields": {
329
+ "type": "array",
330
+ "items": {
331
+ "$ref": "#/$defs/field"
332
+ }
333
+ },
334
+ "unresolvedTypes": {
335
+ "type": "array",
336
+ "items": {
337
+ "type": "string"
338
+ }
339
+ },
340
+ "evidence": {
341
+ "type": "array",
342
+ "items": {
343
+ "$ref": "#/$defs/evidenceId"
344
+ }
345
+ }
346
+ },
347
+ "required": [
348
+ "message",
349
+ "resolved",
350
+ "fields",
351
+ "unresolvedTypes",
352
+ "evidence"
353
+ ],
354
+ "additionalProperties": false
355
+ },
356
+ "criterion": {
357
+ "type": "object",
358
+ "properties": {
359
+ "criterion": {
360
+ "enum": [
361
+ "entry-point",
362
+ "implementation",
363
+ "io-schema",
364
+ "validation",
365
+ "authorization",
366
+ "tests",
367
+ "reachability-complete",
368
+ "small-surface"
369
+ ]
370
+ },
371
+ "satisfied": {
372
+ "type": "boolean"
373
+ },
374
+ "reason": {
375
+ "type": "string",
376
+ "minLength": 1
377
+ },
378
+ "evidence": {
379
+ "type": "array",
380
+ "items": {
381
+ "$ref": "#/$defs/evidenceId"
382
+ }
383
+ }
384
+ },
385
+ "required": [
386
+ "criterion",
387
+ "satisfied",
388
+ "reason",
389
+ "evidence"
390
+ ],
391
+ "additionalProperties": false
392
+ },
393
+ "readiness": {
394
+ "type": "object",
395
+ "properties": {
396
+ "class": {
397
+ "enum": [
398
+ "exposure-candidate",
399
+ "investigate",
400
+ "insufficient-evidence"
401
+ ]
402
+ },
403
+ "criteria": {
404
+ "type": "array",
405
+ "items": {
406
+ "$ref": "#/$defs/criterion"
407
+ }
408
+ },
409
+ "concerns": {
410
+ "type": "array",
411
+ "items": {
412
+ "type": "object",
413
+ "properties": {
414
+ "concern": {
415
+ "enum": [
416
+ "outbound-http",
417
+ "async-work",
418
+ "writes-state",
419
+ "unresolved-interface"
420
+ ]
421
+ },
422
+ "evidence": {
423
+ "type": "array",
424
+ "items": {
425
+ "$ref": "#/$defs/evidenceId"
426
+ }
427
+ }
428
+ },
429
+ "required": [
430
+ "concern",
431
+ "evidence"
432
+ ],
433
+ "additionalProperties": false
434
+ }
435
+ }
436
+ },
437
+ "required": [
438
+ "class",
439
+ "criteria",
440
+ "concerns"
441
+ ],
442
+ "additionalProperties": false
443
+ },
444
+ "proposal": {
445
+ "type": "object",
446
+ "properties": {
447
+ "status": {
448
+ "const": "proposed"
449
+ },
450
+ "authoritative": {
451
+ "const": false
452
+ },
453
+ "capability": {
454
+ "type": "object",
455
+ "properties": {
456
+ "name": {
457
+ "type": "string",
458
+ "pattern": "^[a-z][a-z0-9]*(\\.[a-z][a-z0-9]*)+$"
459
+ },
460
+ "version": {
461
+ "type": "integer",
462
+ "minimum": 1
463
+ },
464
+ "kind": {
465
+ "enum": [
466
+ "request",
467
+ "stream"
468
+ ]
469
+ },
470
+ "inputSchema": {
471
+ "type": "object"
472
+ },
473
+ "outputSchema": {
474
+ "type": "object"
475
+ },
476
+ "effect": {
477
+ "enum": [
478
+ "observation",
479
+ "consequential"
480
+ ]
481
+ }
482
+ },
483
+ "required": [
484
+ "name",
485
+ "version",
486
+ "kind",
487
+ "inputSchema",
488
+ "outputSchema",
489
+ "effect"
490
+ ],
491
+ "additionalProperties": false
492
+ },
493
+ "effectBasis": {
494
+ "type": "object",
495
+ "properties": {
496
+ "effect": {
497
+ "enum": [
498
+ "observation",
499
+ "consequential"
500
+ ]
501
+ },
502
+ "reasons": {
503
+ "type": "array",
504
+ "items": {
505
+ "type": "string"
506
+ }
507
+ },
508
+ "evidence": {
509
+ "type": "array",
510
+ "items": {
511
+ "$ref": "#/$defs/evidenceId"
512
+ }
513
+ }
514
+ },
515
+ "required": [
516
+ "effect",
517
+ "reasons",
518
+ "evidence"
519
+ ],
520
+ "additionalProperties": false
521
+ },
522
+ "missing": {
523
+ "type": "array",
524
+ "items": {
525
+ "type": "string"
526
+ }
527
+ }
528
+ },
529
+ "required": [
530
+ "status",
531
+ "authoritative",
532
+ "effectBasis",
533
+ "missing"
534
+ ],
535
+ "additionalProperties": false
536
+ },
537
+ "candidate": {
538
+ "type": "object",
539
+ "properties": {
540
+ "id": {
541
+ "type": "string",
542
+ "pattern": "^cand-"
543
+ },
544
+ "name": {
545
+ "type": "string",
546
+ "minLength": 1
547
+ },
548
+ "description": {
549
+ "type": "string"
550
+ },
551
+ "operation": {
552
+ "oneOf": [
553
+ {
554
+ "type": "object",
555
+ "properties": {
556
+ "kind": {
557
+ "const": "rpc"
558
+ },
559
+ "service": {
560
+ "type": "string"
561
+ },
562
+ "method": {
563
+ "type": "string"
564
+ },
565
+ "fullMethod": {
566
+ "type": "string"
567
+ },
568
+ "streaming": {
569
+ "type": "boolean"
570
+ }
571
+ },
572
+ "required": [
573
+ "kind",
574
+ "service",
575
+ "method",
576
+ "fullMethod",
577
+ "streaming"
578
+ ],
579
+ "additionalProperties": false
580
+ },
581
+ {
582
+ "type": "object",
583
+ "additionalProperties": false,
584
+ "required": [
585
+ "kind",
586
+ "method",
587
+ "path",
588
+ "framework",
589
+ "placeholders"
590
+ ],
591
+ "properties": {
592
+ "kind": {
593
+ "const": "http"
594
+ },
595
+ "method": {
596
+ "type": "string",
597
+ "minLength": 1
598
+ },
599
+ "path": {
600
+ "type": "string",
601
+ "minLength": 1
602
+ },
603
+ "framework": {
604
+ "type": "string",
605
+ "minLength": 1
606
+ },
607
+ "placeholders": {
608
+ "type": "array",
609
+ "items": {
610
+ "type": "string",
611
+ "minLength": 1
612
+ }
613
+ }
614
+ }
615
+ }
616
+ ]
617
+ },
618
+ "entryPoints": {
619
+ "type": "array",
620
+ "items": {
621
+ "type": "object",
622
+ "properties": {
623
+ "kind": {
624
+ "enum": [
625
+ "proto-rpc",
626
+ "http-binding",
627
+ "http-route"
628
+ ]
629
+ },
630
+ "subject": {
631
+ "type": "string"
632
+ },
633
+ "evidence": {
634
+ "type": "array",
635
+ "items": {
636
+ "$ref": "#/$defs/evidenceId"
637
+ }
638
+ }
639
+ },
640
+ "required": [
641
+ "kind",
642
+ "subject",
643
+ "evidence"
644
+ ],
645
+ "additionalProperties": false
646
+ },
647
+ "minItems": 1
648
+ },
649
+ "implementation": {
650
+ "type": "object",
651
+ "properties": {
652
+ "symbol": {
653
+ "type": "string"
654
+ },
655
+ "location": {
656
+ "$ref": "#/$defs/location"
657
+ },
658
+ "link": {
659
+ "enum": [
660
+ "name-and-request-type",
661
+ "name-only",
662
+ "route-inline",
663
+ "route-handler-reference"
664
+ ]
665
+ },
666
+ "evidence": {
667
+ "type": "array",
668
+ "items": {
669
+ "$ref": "#/$defs/evidenceId"
670
+ }
671
+ }
672
+ },
673
+ "required": [
674
+ "symbol",
675
+ "location",
676
+ "link",
677
+ "evidence"
678
+ ],
679
+ "additionalProperties": false
680
+ },
681
+ "inputs": {
682
+ "$ref": "#/$defs/message"
683
+ },
684
+ "outputs": {
685
+ "$ref": "#/$defs/message"
686
+ },
687
+ "dependencies": {
688
+ "type": "object",
689
+ "properties": {
690
+ "reachableFunctions": {
691
+ "type": "array",
692
+ "items": {
693
+ "type": "object",
694
+ "properties": {
695
+ "symbol": {
696
+ "type": "string"
697
+ },
698
+ "path": {
699
+ "type": "string"
700
+ },
701
+ "depth": {
702
+ "type": "integer",
703
+ "minimum": 1
704
+ },
705
+ "evidence": {
706
+ "type": "array",
707
+ "items": {
708
+ "$ref": "#/$defs/evidenceId"
709
+ }
710
+ }
711
+ },
712
+ "required": [
713
+ "symbol",
714
+ "path",
715
+ "depth",
716
+ "evidence"
717
+ ],
718
+ "additionalProperties": false
719
+ }
720
+ },
721
+ "externalPackages": {
722
+ "type": "array",
723
+ "items": {
724
+ "type": "object",
725
+ "properties": {
726
+ "importPath": {
727
+ "type": "string"
728
+ },
729
+ "evidence": {
730
+ "type": "array",
731
+ "items": {
732
+ "$ref": "#/$defs/evidenceId"
733
+ }
734
+ }
735
+ },
736
+ "required": [
737
+ "importPath",
738
+ "evidence"
739
+ ],
740
+ "additionalProperties": false
741
+ }
742
+ },
743
+ "unresolvedCalls": {
744
+ "type": "integer",
745
+ "minimum": 0
746
+ },
747
+ "truncated": {
748
+ "type": "boolean"
749
+ }
750
+ },
751
+ "required": [
752
+ "reachableFunctions",
753
+ "externalPackages",
754
+ "unresolvedCalls",
755
+ "truncated"
756
+ ],
757
+ "additionalProperties": false
758
+ },
759
+ "sideEffects": {
760
+ "type": "object",
761
+ "properties": {
762
+ "persistence": {
763
+ "type": "array",
764
+ "items": {
765
+ "type": "object",
766
+ "properties": {
767
+ "operation": {
768
+ "enum": [
769
+ "read",
770
+ "write",
771
+ "unknown"
772
+ ]
773
+ },
774
+ "statement": {
775
+ "type": "string"
776
+ },
777
+ "evidence": {
778
+ "type": "array",
779
+ "items": {
780
+ "$ref": "#/$defs/evidenceId"
781
+ }
782
+ }
783
+ },
784
+ "required": [
785
+ "operation",
786
+ "statement",
787
+ "evidence"
788
+ ],
789
+ "additionalProperties": false
790
+ }
791
+ },
792
+ "outboundHttp": {
793
+ "type": "array",
794
+ "items": {
795
+ "$ref": "#/$defs/evidenceId"
796
+ }
797
+ },
798
+ "async": {
799
+ "type": "array",
800
+ "items": {
801
+ "$ref": "#/$defs/evidenceId"
802
+ }
803
+ }
804
+ },
805
+ "required": [
806
+ "persistence",
807
+ "outboundHttp",
808
+ "async"
809
+ ],
810
+ "additionalProperties": false
811
+ },
812
+ "authorization": {
813
+ "type": "object",
814
+ "properties": {
815
+ "denials": {
816
+ "type": "array",
817
+ "items": {
818
+ "$ref": "#/$defs/evidenceId"
819
+ }
820
+ },
821
+ "policyReferences": {
822
+ "type": "array",
823
+ "items": {
824
+ "$ref": "#/$defs/evidenceId"
825
+ }
826
+ }
827
+ },
828
+ "required": [
829
+ "denials",
830
+ "policyReferences"
831
+ ],
832
+ "additionalProperties": false
833
+ },
834
+ "validation": {
835
+ "type": "object",
836
+ "properties": {
837
+ "rejections": {
838
+ "type": "array",
839
+ "items": {
840
+ "$ref": "#/$defs/evidenceId"
841
+ }
842
+ }
843
+ },
844
+ "required": [
845
+ "rejections"
846
+ ],
847
+ "additionalProperties": false
848
+ },
849
+ "tests": {
850
+ "type": "array",
851
+ "items": {
852
+ "type": "object",
853
+ "properties": {
854
+ "symbol": {
855
+ "type": "string"
856
+ },
857
+ "path": {
858
+ "type": "string"
859
+ },
860
+ "evidence": {
861
+ "type": "array",
862
+ "items": {
863
+ "$ref": "#/$defs/evidenceId"
864
+ }
865
+ }
866
+ },
867
+ "required": [
868
+ "symbol",
869
+ "path",
870
+ "evidence"
871
+ ],
872
+ "additionalProperties": false
873
+ }
874
+ },
875
+ "evidence": {
876
+ "type": "array",
877
+ "items": {
878
+ "$ref": "#/$defs/evidenceId"
879
+ }
880
+ },
881
+ "confidence": {
882
+ "enum": [
883
+ "linked",
884
+ "weakly-linked",
885
+ "unlinked"
886
+ ]
887
+ },
888
+ "readiness": {
889
+ "$ref": "#/$defs/readiness"
890
+ },
891
+ "unknowns": {
892
+ "type": "array",
893
+ "items": {
894
+ "$ref": "#/$defs/evidenceId"
895
+ }
896
+ },
897
+ "exposure": {
898
+ "$ref": "#/$defs/proposal"
899
+ }
900
+ },
901
+ "required": [
902
+ "id",
903
+ "name",
904
+ "description",
905
+ "operation",
906
+ "entryPoints",
907
+ "dependencies",
908
+ "sideEffects",
909
+ "authorization",
910
+ "validation",
911
+ "tests",
912
+ "evidence",
913
+ "confidence",
914
+ "readiness",
915
+ "unknowns",
916
+ "exposure"
917
+ ],
918
+ "additionalProperties": false
919
+ },
920
+ "finding": {
921
+ "type": "object",
922
+ "properties": {
923
+ "code": {
924
+ "type": "string",
925
+ "pattern": "^[A-Z_]+$"
926
+ },
927
+ "severity": {
928
+ "enum": [
929
+ "info",
930
+ "warning",
931
+ "error"
932
+ ]
933
+ },
934
+ "message": {
935
+ "type": "string"
936
+ },
937
+ "path": {
938
+ "type": "string"
939
+ },
940
+ "evidence": {
941
+ "type": "array",
942
+ "items": {
943
+ "$ref": "#/$defs/evidenceId"
944
+ }
945
+ }
946
+ },
947
+ "required": [
948
+ "code",
949
+ "severity",
950
+ "message"
951
+ ],
952
+ "additionalProperties": false
953
+ },
954
+ "question": {
955
+ "type": "object",
956
+ "properties": {
957
+ "id": {
958
+ "type": "string",
959
+ "pattern": "^q-"
960
+ },
961
+ "candidate": {
962
+ "type": "string"
963
+ },
964
+ "question": {
965
+ "type": "string",
966
+ "minLength": 1
967
+ },
968
+ "evidence": {
969
+ "type": "array",
970
+ "items": {
971
+ "$ref": "#/$defs/evidenceId"
972
+ }
973
+ }
974
+ },
975
+ "required": [
976
+ "id",
977
+ "question",
978
+ "evidence"
979
+ ],
980
+ "additionalProperties": false
981
+ },
982
+ "recommendation": {
983
+ "type": "object",
984
+ "properties": {
985
+ "candidate": {
986
+ "type": "string"
987
+ },
988
+ "readiness": {
989
+ "const": "exposure-candidate"
990
+ },
991
+ "reasons": {
992
+ "type": "array",
993
+ "items": {
994
+ "type": "string"
995
+ },
996
+ "minItems": 1
997
+ },
998
+ "ranking": {
999
+ "type": "object",
1000
+ "properties": {
1001
+ "rules": {
1002
+ "type": "array",
1003
+ "items": {
1004
+ "type": "string"
1005
+ },
1006
+ "minItems": 1
1007
+ },
1008
+ "position": {
1009
+ "const": 1
1010
+ },
1011
+ "of": {
1012
+ "type": "integer",
1013
+ "minimum": 1
1014
+ },
1015
+ "alternatives": {
1016
+ "type": "array",
1017
+ "items": {
1018
+ "type": "string"
1019
+ }
1020
+ }
1021
+ },
1022
+ "required": [
1023
+ "rules",
1024
+ "position",
1025
+ "of",
1026
+ "alternatives"
1027
+ ],
1028
+ "additionalProperties": false
1029
+ },
1030
+ "beforeExposure": {
1031
+ "type": "array",
1032
+ "items": {
1033
+ "type": "string"
1034
+ }
1035
+ }
1036
+ },
1037
+ "required": [
1038
+ "candidate",
1039
+ "readiness",
1040
+ "reasons",
1041
+ "ranking",
1042
+ "beforeExposure"
1043
+ ],
1044
+ "additionalProperties": false
1045
+ },
1046
+ "coverage": {
1047
+ "type": "object",
1048
+ "properties": {
1049
+ "filesSeen": {
1050
+ "type": "integer",
1051
+ "minimum": 0
1052
+ },
1053
+ "filesAnalyzed": {
1054
+ "type": "integer",
1055
+ "minimum": 0
1056
+ },
1057
+ "languages": {
1058
+ "type": "array",
1059
+ "items": {
1060
+ "type": "object",
1061
+ "properties": {
1062
+ "language": {
1063
+ "type": "string"
1064
+ },
1065
+ "files": {
1066
+ "type": "integer",
1067
+ "minimum": 0
1068
+ },
1069
+ "supported": {
1070
+ "type": "boolean"
1071
+ }
1072
+ },
1073
+ "required": [
1074
+ "language",
1075
+ "files",
1076
+ "supported"
1077
+ ],
1078
+ "additionalProperties": false
1079
+ }
1080
+ },
1081
+ "skipped": {
1082
+ "type": "array",
1083
+ "items": {
1084
+ "type": "object",
1085
+ "properties": {
1086
+ "path": {
1087
+ "type": "string"
1088
+ },
1089
+ "reason": {
1090
+ "enum": [
1091
+ "symlink",
1092
+ "excluded-directory",
1093
+ "ignored",
1094
+ "generated",
1095
+ "too-large",
1096
+ "unreadable",
1097
+ "binary",
1098
+ "special-file"
1099
+ ]
1100
+ }
1101
+ },
1102
+ "required": [
1103
+ "path",
1104
+ "reason"
1105
+ ],
1106
+ "additionalProperties": false
1107
+ }
1108
+ },
1109
+ "malformed": {
1110
+ "type": "array",
1111
+ "items": {
1112
+ "type": "object",
1113
+ "properties": {
1114
+ "path": {
1115
+ "type": "string"
1116
+ },
1117
+ "line": {
1118
+ "type": "integer",
1119
+ "minimum": 0
1120
+ },
1121
+ "message": {
1122
+ "type": "string"
1123
+ }
1124
+ },
1125
+ "required": [
1126
+ "path",
1127
+ "line",
1128
+ "message"
1129
+ ],
1130
+ "additionalProperties": false
1131
+ }
1132
+ },
1133
+ "unsupportedIgnorePatterns": {
1134
+ "type": "array",
1135
+ "items": {
1136
+ "type": "string"
1137
+ }
1138
+ },
1139
+ "partial": {
1140
+ "type": "boolean"
1141
+ },
1142
+ "partialReasons": {
1143
+ "type": "array",
1144
+ "items": {
1145
+ "type": "string"
1146
+ }
1147
+ }
1148
+ },
1149
+ "required": [
1150
+ "filesSeen",
1151
+ "filesAnalyzed",
1152
+ "languages",
1153
+ "skipped",
1154
+ "malformed",
1155
+ "unsupportedIgnorePatterns",
1156
+ "partial",
1157
+ "partialReasons"
1158
+ ],
1159
+ "additionalProperties": false
1160
+ },
1161
+ "configuration": {
1162
+ "type": "object",
1163
+ "properties": {
1164
+ "scanner": {
1165
+ "const": "appport.assessment-scanner/2"
1166
+ },
1167
+ "maxFileBytes": {
1168
+ "type": "integer",
1169
+ "minimum": 0
1170
+ },
1171
+ "excludedDirectories": {
1172
+ "type": "array",
1173
+ "items": {
1174
+ "type": "string"
1175
+ }
1176
+ },
1177
+ "maxCallDepth": {
1178
+ "type": "integer",
1179
+ "minimum": 0
1180
+ },
1181
+ "maxReachableFunctions": {
1182
+ "type": "integer",
1183
+ "minimum": 0
1184
+ },
1185
+ "smallSurface": {
1186
+ "type": "object",
1187
+ "properties": {
1188
+ "maxHandlerLines": {
1189
+ "type": "integer",
1190
+ "minimum": 0
1191
+ },
1192
+ "maxReachableFunctions": {
1193
+ "type": "integer",
1194
+ "minimum": 0
1195
+ }
1196
+ },
1197
+ "required": [
1198
+ "maxHandlerLines",
1199
+ "maxReachableFunctions"
1200
+ ],
1201
+ "additionalProperties": false
1202
+ }
1203
+ },
1204
+ "required": [
1205
+ "scanner",
1206
+ "maxFileBytes",
1207
+ "excludedDirectories",
1208
+ "maxCallDepth",
1209
+ "maxReachableFunctions",
1210
+ "smallSurface"
1211
+ ],
1212
+ "additionalProperties": false
1213
+ },
1214
+ "inventory": {
1215
+ "type": "object",
1216
+ "properties": {
1217
+ "manifests": {
1218
+ "type": "array",
1219
+ "items": {
1220
+ "type": "object",
1221
+ "properties": {
1222
+ "path": {
1223
+ "type": "string"
1224
+ },
1225
+ "kind": {
1226
+ "enum": [
1227
+ "go.mod",
1228
+ "package.json"
1229
+ ]
1230
+ },
1231
+ "name": {
1232
+ "type": "string"
1233
+ },
1234
+ "evidence": {
1235
+ "type": "array",
1236
+ "items": {
1237
+ "$ref": "#/$defs/evidenceId"
1238
+ }
1239
+ }
1240
+ },
1241
+ "required": [
1242
+ "path",
1243
+ "kind",
1244
+ "evidence"
1245
+ ],
1246
+ "additionalProperties": false
1247
+ }
1248
+ },
1249
+ "constructs": {
1250
+ "type": "object",
1251
+ "properties": {
1252
+ "protoServices": {
1253
+ "type": "integer",
1254
+ "minimum": 0
1255
+ },
1256
+ "protoMethods": {
1257
+ "type": "integer",
1258
+ "minimum": 0
1259
+ },
1260
+ "goPackages": {
1261
+ "type": "integer",
1262
+ "minimum": 0
1263
+ },
1264
+ "goFunctions": {
1265
+ "type": "integer",
1266
+ "minimum": 0
1267
+ },
1268
+ "goTestFunctions": {
1269
+ "type": "integer",
1270
+ "minimum": 0
1271
+ },
1272
+ "httpRoutes": {
1273
+ "type": "integer",
1274
+ "minimum": 0
1275
+ }
1276
+ },
1277
+ "required": [
1278
+ "protoServices",
1279
+ "protoMethods",
1280
+ "goPackages",
1281
+ "goFunctions",
1282
+ "goTestFunctions",
1283
+ "httpRoutes"
1284
+ ],
1285
+ "additionalProperties": false
1286
+ },
1287
+ "entryPoints": {
1288
+ "type": "array",
1289
+ "items": {
1290
+ "type": "object",
1291
+ "properties": {
1292
+ "candidate": {
1293
+ "type": "string"
1294
+ },
1295
+ "kind": {
1296
+ "type": "string"
1297
+ },
1298
+ "subject": {
1299
+ "type": "string"
1300
+ },
1301
+ "evidence": {
1302
+ "type": "array",
1303
+ "items": {
1304
+ "$ref": "#/$defs/evidenceId"
1305
+ }
1306
+ }
1307
+ },
1308
+ "required": [
1309
+ "candidate",
1310
+ "kind",
1311
+ "subject",
1312
+ "evidence"
1313
+ ],
1314
+ "additionalProperties": false
1315
+ }
1316
+ },
1317
+ "persistence": {
1318
+ "type": "array",
1319
+ "items": {
1320
+ "type": "object",
1321
+ "properties": {
1322
+ "operation": {
1323
+ "enum": [
1324
+ "read",
1325
+ "write",
1326
+ "unknown"
1327
+ ]
1328
+ },
1329
+ "path": {
1330
+ "type": "string"
1331
+ },
1332
+ "evidence": {
1333
+ "type": "array",
1334
+ "items": {
1335
+ "$ref": "#/$defs/evidenceId"
1336
+ }
1337
+ }
1338
+ },
1339
+ "required": [
1340
+ "operation",
1341
+ "path",
1342
+ "evidence"
1343
+ ],
1344
+ "additionalProperties": false
1345
+ }
1346
+ },
1347
+ "integrations": {
1348
+ "type": "array",
1349
+ "items": {
1350
+ "type": "object",
1351
+ "properties": {
1352
+ "kind": {
1353
+ "enum": [
1354
+ "outbound-http",
1355
+ "module-dependency"
1356
+ ]
1357
+ },
1358
+ "subject": {
1359
+ "type": "string"
1360
+ },
1361
+ "evidence": {
1362
+ "type": "array",
1363
+ "items": {
1364
+ "$ref": "#/$defs/evidenceId"
1365
+ }
1366
+ }
1367
+ },
1368
+ "required": [
1369
+ "kind",
1370
+ "subject",
1371
+ "evidence"
1372
+ ],
1373
+ "additionalProperties": false
1374
+ }
1375
+ },
1376
+ "configuration": {
1377
+ "type": "array",
1378
+ "items": {
1379
+ "type": "object",
1380
+ "properties": {
1381
+ "source": {
1382
+ "enum": [
1383
+ "env",
1384
+ "flag",
1385
+ "viper"
1386
+ ]
1387
+ },
1388
+ "key": {
1389
+ "type": "string"
1390
+ },
1391
+ "evidence": {
1392
+ "type": "array",
1393
+ "items": {
1394
+ "$ref": "#/$defs/evidenceId"
1395
+ }
1396
+ }
1397
+ },
1398
+ "required": [
1399
+ "source",
1400
+ "key",
1401
+ "evidence"
1402
+ ],
1403
+ "additionalProperties": false
1404
+ }
1405
+ },
1406
+ "authorization": {
1407
+ "type": "array",
1408
+ "items": {
1409
+ "type": "object",
1410
+ "properties": {
1411
+ "kind": {
1412
+ "enum": [
1413
+ "policy-reference",
1414
+ "denial"
1415
+ ]
1416
+ },
1417
+ "subject": {
1418
+ "type": "string"
1419
+ },
1420
+ "evidence": {
1421
+ "type": "array",
1422
+ "items": {
1423
+ "$ref": "#/$defs/evidenceId"
1424
+ }
1425
+ }
1426
+ },
1427
+ "required": [
1428
+ "kind",
1429
+ "subject",
1430
+ "evidence"
1431
+ ],
1432
+ "additionalProperties": false
1433
+ }
1434
+ },
1435
+ "tests": {
1436
+ "type": "object",
1437
+ "properties": {
1438
+ "files": {
1439
+ "type": "integer",
1440
+ "minimum": 0
1441
+ },
1442
+ "functions": {
1443
+ "type": "integer",
1444
+ "minimum": 0
1445
+ }
1446
+ },
1447
+ "required": [
1448
+ "files",
1449
+ "functions"
1450
+ ],
1451
+ "additionalProperties": false
1452
+ }
1453
+ },
1454
+ "required": [
1455
+ "manifests",
1456
+ "constructs",
1457
+ "entryPoints",
1458
+ "persistence",
1459
+ "integrations",
1460
+ "configuration",
1461
+ "authorization",
1462
+ "tests"
1463
+ ],
1464
+ "additionalProperties": false
1465
+ }
1466
+ }
1467
+ }