@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,225 @@
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
+ "executionId": {
10
+ "type": "string",
11
+ "minLength": 1
12
+ },
13
+ "subject": {
14
+ "type": "object",
15
+ "properties": {
16
+ "repositoryId": {
17
+ "type": "string",
18
+ "minLength": 1
19
+ },
20
+ "prHeadSha": {
21
+ "type": "string",
22
+ "minLength": 1
23
+ },
24
+ "testedCommitSha": {
25
+ "type": "string",
26
+ "minLength": 1
27
+ },
28
+ "testedCommitParents": {
29
+ "type": "array",
30
+ "items": {
31
+ "type": "string",
32
+ "minLength": 1
33
+ }
34
+ },
35
+ "sourceTreeHash": {
36
+ "type": "string",
37
+ "pattern": "^[a-f0-9]{64}$"
38
+ },
39
+ "dirty": {
40
+ "type": "boolean"
41
+ },
42
+ "baseSha": {
43
+ "type": "string",
44
+ "minLength": 1
45
+ },
46
+ "diffBaseSha": {
47
+ "type": "string",
48
+ "minLength": 1
49
+ }
50
+ },
51
+ "required": [
52
+ "testedCommitSha",
53
+ "sourceTreeHash",
54
+ "dirty"
55
+ ],
56
+ "additionalProperties": false
57
+ },
58
+ "producer": {
59
+ "type": "object",
60
+ "properties": {
61
+ "tool": {
62
+ "type": "string",
63
+ "minLength": 1
64
+ },
65
+ "version": {
66
+ "type": "string",
67
+ "minLength": 1
68
+ },
69
+ "collectorVersion": {
70
+ "type": "string",
71
+ "minLength": 1
72
+ }
73
+ },
74
+ "required": [
75
+ "tool",
76
+ "version",
77
+ "collectorVersion"
78
+ ],
79
+ "additionalProperties": false
80
+ },
81
+ "commandHash": {
82
+ "type": "string",
83
+ "pattern": "^[a-f0-9]{64}$"
84
+ },
85
+ "configHashes": {
86
+ "type": "object",
87
+ "propertyNames": {
88
+ "type": "string",
89
+ "minLength": 1
90
+ },
91
+ "additionalProperties": {
92
+ "type": "string",
93
+ "pattern": "^[a-f0-9]{64}$"
94
+ }
95
+ },
96
+ "dependencyLockHash": {
97
+ "type": "string",
98
+ "pattern": "^[a-f0-9]{64}$"
99
+ },
100
+ "environment": {
101
+ "type": "object",
102
+ "properties": {
103
+ "nodeVersion": {
104
+ "type": "string",
105
+ "minLength": 1
106
+ },
107
+ "platform": {
108
+ "type": "string",
109
+ "minLength": 1
110
+ }
111
+ },
112
+ "required": [
113
+ "nodeVersion",
114
+ "platform"
115
+ ],
116
+ "additionalProperties": false
117
+ },
118
+ "startedAt": {
119
+ "type": "string",
120
+ "format": "date-time",
121
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
122
+ },
123
+ "completedAt": {
124
+ "type": "string",
125
+ "format": "date-time",
126
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
127
+ },
128
+ "exitCode": {
129
+ "type": "integer",
130
+ "minimum": -9007199254740991,
131
+ "maximum": 9007199254740991
132
+ },
133
+ "artifacts": {
134
+ "type": "array",
135
+ "items": {
136
+ "type": "object",
137
+ "properties": {
138
+ "ref": {
139
+ "type": "string",
140
+ "minLength": 1
141
+ },
142
+ "sha256": {
143
+ "type": "string",
144
+ "pattern": "^[a-f0-9]{64}$"
145
+ },
146
+ "kind": {
147
+ "type": "string",
148
+ "minLength": 1
149
+ },
150
+ "scope": {
151
+ "type": "array",
152
+ "items": {
153
+ "type": "string",
154
+ "minLength": 1
155
+ }
156
+ }
157
+ },
158
+ "required": [
159
+ "ref",
160
+ "sha256",
161
+ "kind",
162
+ "scope"
163
+ ],
164
+ "additionalProperties": false
165
+ }
166
+ },
167
+ "ci": {
168
+ "type": "object",
169
+ "properties": {
170
+ "repositoryId": {
171
+ "type": "string",
172
+ "minLength": 1
173
+ },
174
+ "workflowRef": {
175
+ "type": "string",
176
+ "minLength": 1
177
+ },
178
+ "runId": {
179
+ "type": "string",
180
+ "minLength": 1
181
+ },
182
+ "runAttempt": {
183
+ "type": "integer",
184
+ "minimum": 1,
185
+ "maximum": 9007199254740991
186
+ },
187
+ "jobId": {
188
+ "type": "string",
189
+ "minLength": 1
190
+ },
191
+ "eventName": {
192
+ "type": "string",
193
+ "minLength": 1
194
+ }
195
+ },
196
+ "required": [
197
+ "repositoryId",
198
+ "workflowRef",
199
+ "runId",
200
+ "runAttempt",
201
+ "jobId",
202
+ "eventName"
203
+ ],
204
+ "additionalProperties": false
205
+ },
206
+ "attestationRef": {
207
+ "type": "string",
208
+ "minLength": 1
209
+ }
210
+ },
211
+ "required": [
212
+ "schemaVersion",
213
+ "executionId",
214
+ "subject",
215
+ "producer",
216
+ "commandHash",
217
+ "configHashes",
218
+ "environment",
219
+ "startedAt",
220
+ "completedAt",
221
+ "exitCode",
222
+ "artifacts"
223
+ ],
224
+ "additionalProperties": false
225
+ }
@@ -0,0 +1,21 @@
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
+ "profileVersion": {
10
+ "type": "string",
11
+ "const": "1"
12
+ },
13
+ "rules": {}
14
+ },
15
+ "required": [
16
+ "schemaVersion",
17
+ "profileVersion",
18
+ "rules"
19
+ ],
20
+ "additionalProperties": false
21
+ }