@behavproof/cli 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.
Files changed (67) hide show
  1. package/README.md +14 -2
  2. package/dist/api.d.ts +6 -0
  3. package/dist/api.d.ts.map +1 -0
  4. package/dist/api.js +5 -0
  5. package/dist/api.js.map +1 -0
  6. package/dist/check.d.ts +272 -0
  7. package/dist/check.d.ts.map +1 -0
  8. package/dist/check.js +220 -0
  9. package/dist/check.js.map +1 -0
  10. package/dist/formal-evaluation.d.ts +108 -0
  11. package/dist/formal-evaluation.d.ts.map +1 -0
  12. package/dist/formal-evaluation.js +78 -0
  13. package/dist/formal-evaluation.js.map +1 -0
  14. package/dist/formal-worker.d.ts +2 -0
  15. package/dist/formal-worker.d.ts.map +1 -0
  16. package/dist/formal-worker.js +32 -0
  17. package/dist/formal-worker.js.map +1 -0
  18. package/dist/formal.d.ts +148 -0
  19. package/dist/formal.d.ts.map +1 -0
  20. package/dist/formal.js +99 -0
  21. package/dist/formal.js.map +1 -0
  22. package/dist/impact.d.ts +20 -0
  23. package/dist/impact.d.ts.map +1 -0
  24. package/dist/impact.js +23 -0
  25. package/dist/impact.js.map +1 -0
  26. package/dist/index.d.ts +3 -0
  27. package/dist/index.d.ts.map +1 -0
  28. package/dist/index.js +151 -0
  29. package/dist/index.js.map +1 -0
  30. package/dist/pipeline.d.ts +38 -0
  31. package/dist/pipeline.d.ts.map +1 -0
  32. package/dist/pipeline.js +46 -0
  33. package/dist/pipeline.js.map +1 -0
  34. package/dist/project.d.ts +97 -0
  35. package/dist/project.d.ts.map +1 -0
  36. package/dist/project.js +101 -0
  37. package/dist/project.js.map +1 -0
  38. package/dist/registration.d.ts +595 -0
  39. package/dist/registration.d.ts.map +1 -0
  40. package/dist/registration.js +112 -0
  41. package/dist/registration.js.map +1 -0
  42. package/dist/report.d.ts +23 -0
  43. package/dist/report.d.ts.map +1 -0
  44. package/dist/report.js +34 -0
  45. package/dist/report.js.map +1 -0
  46. package/dist/scopes.d.ts +48 -0
  47. package/dist/scopes.d.ts.map +1 -0
  48. package/dist/scopes.js +60 -0
  49. package/dist/scopes.js.map +1 -0
  50. package/dist/trust.d.ts +533 -0
  51. package/dist/trust.d.ts.map +1 -0
  52. package/dist/trust.js +130 -0
  53. package/dist/trust.js.map +1 -0
  54. package/package.json +51 -4
  55. package/presets/basic-v1.json +21 -0
  56. package/presets/critical-v1.json +39 -0
  57. package/presets/standard-v1.json +21 -0
  58. package/schemas/config.schema.json +492 -0
  59. package/schemas/evidence.schema.json +3612 -0
  60. package/schemas/manifest.schema.json +225 -0
  61. package/schemas/policy.schema.json +21 -0
  62. package/schemas/registration.schema.json +1065 -0
  63. package/schemas/registry.schema.json +307 -0
  64. package/schemas/trust-root.schema.json +1445 -0
  65. package/templates/audit.yml +28 -0
  66. package/templates/protected-github-producer.yml +58 -0
  67. package/templates/protected-github-publisher.yml +111 -0
@@ -0,0 +1,307 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "schemaVersion": {
6
+ "type": "number",
7
+ "const": 1
8
+ },
9
+ "repositoryId": {
10
+ "type": "string",
11
+ "minLength": 1
12
+ },
13
+ "commitSha": {
14
+ "type": "string",
15
+ "minLength": 1
16
+ },
17
+ "contracts": {
18
+ "type": "array",
19
+ "items": {
20
+ "type": "object",
21
+ "properties": {
22
+ "id": {
23
+ "type": "string",
24
+ "minLength": 1
25
+ },
26
+ "formal": {
27
+ "type": "object",
28
+ "properties": {
29
+ "modelId": {
30
+ "type": "string",
31
+ "minLength": 1
32
+ },
33
+ "modelHash": {
34
+ "type": "string",
35
+ "pattern": "^[a-f0-9]{64}$"
36
+ },
37
+ "driverHash": {
38
+ "type": "string",
39
+ "pattern": "^[a-f0-9]{64}$"
40
+ },
41
+ "propertyIds": {
42
+ "minItems": 1,
43
+ "maxItems": 10000,
44
+ "type": "array",
45
+ "items": {
46
+ "type": "string",
47
+ "minLength": 1
48
+ }
49
+ }
50
+ },
51
+ "required": [
52
+ "modelId",
53
+ "modelHash",
54
+ "propertyIds"
55
+ ],
56
+ "additionalProperties": false
57
+ },
58
+ "kind": {
59
+ "type": "string",
60
+ "enum": [
61
+ "examples",
62
+ "invariant",
63
+ "state_machine",
64
+ "api_contract",
65
+ "external"
66
+ ]
67
+ },
68
+ "intentIds": {
69
+ "type": "array",
70
+ "items": {
71
+ "type": "string",
72
+ "minLength": 1
73
+ }
74
+ },
75
+ "revisionHash": {
76
+ "type": "string",
77
+ "pattern": "^[a-f0-9]{64}$"
78
+ },
79
+ "sourceRef": {
80
+ "type": "string",
81
+ "minLength": 1
82
+ },
83
+ "caseIds": {
84
+ "type": "array",
85
+ "items": {
86
+ "type": "string",
87
+ "minLength": 1
88
+ }
89
+ },
90
+ "risk": {
91
+ "type": "string",
92
+ "enum": [
93
+ "basic",
94
+ "standard",
95
+ "critical"
96
+ ]
97
+ },
98
+ "cases": {
99
+ "type": "array",
100
+ "items": {
101
+ "type": "object",
102
+ "properties": {
103
+ "id": {
104
+ "type": "string",
105
+ "minLength": 1
106
+ },
107
+ "input": {
108
+ "$ref": "#/$defs/__schema0"
109
+ },
110
+ "expected": {
111
+ "$ref": "#/$defs/__schema1"
112
+ },
113
+ "negative": {
114
+ "type": "boolean"
115
+ }
116
+ },
117
+ "required": [
118
+ "id",
119
+ "input",
120
+ "expected"
121
+ ],
122
+ "additionalProperties": false
123
+ }
124
+ }
125
+ },
126
+ "required": [
127
+ "id",
128
+ "kind",
129
+ "intentIds",
130
+ "revisionHash",
131
+ "sourceRef"
132
+ ],
133
+ "additionalProperties": false
134
+ }
135
+ },
136
+ "intents": {
137
+ "type": "array",
138
+ "items": {
139
+ "type": "object",
140
+ "properties": {
141
+ "id": {
142
+ "type": "string",
143
+ "minLength": 1
144
+ },
145
+ "statement": {
146
+ "type": "string",
147
+ "minLength": 1
148
+ },
149
+ "risk": {
150
+ "type": "string",
151
+ "enum": [
152
+ "basic",
153
+ "standard",
154
+ "critical"
155
+ ]
156
+ },
157
+ "contentHash": {
158
+ "type": "string",
159
+ "pattern": "^[a-f0-9]{64}$"
160
+ },
161
+ "origin": {
162
+ "type": "object",
163
+ "properties": {
164
+ "kind": {
165
+ "type": "string",
166
+ "enum": [
167
+ "inline",
168
+ "manifest",
169
+ "external"
170
+ ]
171
+ },
172
+ "ref": {
173
+ "type": "string",
174
+ "minLength": 1
175
+ }
176
+ },
177
+ "required": [
178
+ "kind",
179
+ "ref"
180
+ ],
181
+ "additionalProperties": false
182
+ }
183
+ },
184
+ "required": [
185
+ "id",
186
+ "statement",
187
+ "risk",
188
+ "contentHash",
189
+ "origin"
190
+ ],
191
+ "additionalProperties": false
192
+ }
193
+ },
194
+ "policyHash": {
195
+ "type": "string",
196
+ "pattern": "^[a-f0-9]{64}$"
197
+ },
198
+ "extractorVersion": {
199
+ "type": "string",
200
+ "minLength": 1
201
+ },
202
+ "scope": {
203
+ "type": "array",
204
+ "items": {
205
+ "type": "string",
206
+ "minLength": 1
207
+ }
208
+ },
209
+ "discoveryDiagnostics": {
210
+ "type": "array",
211
+ "items": {
212
+ "type": "object",
213
+ "properties": {
214
+ "code": {
215
+ "type": "string",
216
+ "minLength": 1
217
+ },
218
+ "sourceRef": {
219
+ "type": "string",
220
+ "minLength": 1
221
+ },
222
+ "message": {
223
+ "type": "string",
224
+ "minLength": 1
225
+ }
226
+ },
227
+ "required": [
228
+ "code",
229
+ "sourceRef",
230
+ "message"
231
+ ],
232
+ "additionalProperties": false
233
+ }
234
+ }
235
+ },
236
+ "required": [
237
+ "schemaVersion",
238
+ "commitSha",
239
+ "contracts",
240
+ "intents"
241
+ ],
242
+ "additionalProperties": false,
243
+ "$defs": {
244
+ "__schema0": {
245
+ "anyOf": [
246
+ {
247
+ "type": "string"
248
+ },
249
+ {
250
+ "type": "number"
251
+ },
252
+ {
253
+ "type": "boolean"
254
+ },
255
+ {
256
+ "type": "null"
257
+ },
258
+ {
259
+ "type": "array",
260
+ "items": {
261
+ "$ref": "#/$defs/__schema0"
262
+ }
263
+ },
264
+ {
265
+ "type": "object",
266
+ "propertyNames": {
267
+ "type": "string"
268
+ },
269
+ "additionalProperties": {
270
+ "$ref": "#/$defs/__schema0"
271
+ }
272
+ }
273
+ ]
274
+ },
275
+ "__schema1": {
276
+ "anyOf": [
277
+ {
278
+ "type": "string"
279
+ },
280
+ {
281
+ "type": "number"
282
+ },
283
+ {
284
+ "type": "boolean"
285
+ },
286
+ {
287
+ "type": "null"
288
+ },
289
+ {
290
+ "type": "array",
291
+ "items": {
292
+ "$ref": "#/$defs/__schema1"
293
+ }
294
+ },
295
+ {
296
+ "type": "object",
297
+ "propertyNames": {
298
+ "type": "string"
299
+ },
300
+ "additionalProperties": {
301
+ "$ref": "#/$defs/__schema1"
302
+ }
303
+ }
304
+ ]
305
+ }
306
+ }
307
+ }