@kungfu-tech/kfd 1.0.0-alpha.1 → 1.0.0-alpha.13

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,276 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://kfd.libkungfu.dev/schemas/kfd-2/release-trust-passport.schema.json",
4
+ "title": "KFD-2 release trust passport",
5
+ "type": "object",
6
+ "required": [
7
+ "schemaVersion",
8
+ "contract",
9
+ "standard",
10
+ "product",
11
+ "release",
12
+ "releaseClaims",
13
+ "result",
14
+ "claims"
15
+ ],
16
+ "properties": {
17
+ "schemaVersion": {
18
+ "const": 1
19
+ },
20
+ "contract": {
21
+ "const": "kfd-2-release-trust-passport"
22
+ },
23
+ "standard": {
24
+ "const": "kfd-2"
25
+ },
26
+ "product": {
27
+ "$ref": "#/$defs/product"
28
+ },
29
+ "release": {
30
+ "$ref": "#/$defs/release"
31
+ },
32
+ "releaseClaims": {
33
+ "type": "object",
34
+ "required": [
35
+ "schemaId",
36
+ "digest"
37
+ ],
38
+ "properties": {
39
+ "schemaId": {
40
+ "const": "https://kfd.libkungfu.dev/schemas/kfd-2/release-claims.schema.json"
41
+ },
42
+ "path": {
43
+ "type": "string",
44
+ "minLength": 1
45
+ },
46
+ "digest": {
47
+ "type": "string",
48
+ "minLength": 1
49
+ }
50
+ },
51
+ "additionalProperties": true
52
+ },
53
+ "result": {
54
+ "enum": [
55
+ "pass",
56
+ "fail",
57
+ "warning",
58
+ "unverifiable"
59
+ ]
60
+ },
61
+ "claims": {
62
+ "type": "array",
63
+ "items": {
64
+ "$ref": "#/$defs/claimResult"
65
+ }
66
+ },
67
+ "unboundClaims": {
68
+ "type": "array",
69
+ "items": {
70
+ "type": "string",
71
+ "minLength": 1
72
+ }
73
+ },
74
+ "downgradeReasons": {
75
+ "type": "array",
76
+ "items": {
77
+ "$ref": "https://kfd.libkungfu.dev/schemas/kfd-2/trust-taxonomy.schema.json#/$defs/downgradeReason"
78
+ }
79
+ },
80
+ "responsibility": {
81
+ "$ref": "#/$defs/responsibilityState"
82
+ },
83
+ "schemaEvolution": {
84
+ "$ref": "#/$defs/schemaEvolution"
85
+ }
86
+ },
87
+ "additionalProperties": true,
88
+ "$defs": {
89
+ "product": {
90
+ "type": "object",
91
+ "required": [
92
+ "name"
93
+ ],
94
+ "properties": {
95
+ "name": {
96
+ "type": "string",
97
+ "minLength": 1
98
+ },
99
+ "repository": {
100
+ "type": "string",
101
+ "minLength": 1
102
+ },
103
+ "package": {
104
+ "type": "string",
105
+ "minLength": 1
106
+ }
107
+ },
108
+ "additionalProperties": true
109
+ },
110
+ "release": {
111
+ "type": "object",
112
+ "required": [
113
+ "version",
114
+ "channel"
115
+ ],
116
+ "properties": {
117
+ "version": {
118
+ "type": "string",
119
+ "minLength": 1
120
+ },
121
+ "channel": {
122
+ "type": "string",
123
+ "minLength": 1
124
+ },
125
+ "tag": {
126
+ "type": "string",
127
+ "minLength": 1
128
+ },
129
+ "sourceSha": {
130
+ "type": "string",
131
+ "minLength": 1
132
+ }
133
+ },
134
+ "additionalProperties": true
135
+ },
136
+ "claimResult": {
137
+ "type": "object",
138
+ "required": [
139
+ "id",
140
+ "result",
141
+ "evidence",
142
+ "auditBoundary",
143
+ "responsibility"
144
+ ],
145
+ "properties": {
146
+ "id": {
147
+ "type": "string",
148
+ "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$"
149
+ },
150
+ "result": {
151
+ "enum": [
152
+ "pass",
153
+ "fail",
154
+ "warning",
155
+ "unverifiable"
156
+ ]
157
+ },
158
+ "evidence": {
159
+ "type": "array",
160
+ "items": {
161
+ "$ref": "#/$defs/evidenceResult"
162
+ }
163
+ },
164
+ "auditBoundary": {
165
+ "$ref": "#/$defs/auditBoundary"
166
+ },
167
+ "responsibility": {
168
+ "$ref": "#/$defs/responsibilityState"
169
+ },
170
+ "residualRisk": {
171
+ "type": "array",
172
+ "items": {
173
+ "$ref": "https://kfd.libkungfu.dev/schemas/kfd-2/trust-taxonomy.schema.json#/$defs/residualRisk"
174
+ }
175
+ }
176
+ },
177
+ "additionalProperties": true
178
+ },
179
+ "evidenceResult": {
180
+ "type": "object",
181
+ "required": [
182
+ "type",
183
+ "result"
184
+ ],
185
+ "properties": {
186
+ "type": {
187
+ "type": "string",
188
+ "minLength": 1
189
+ },
190
+ "result": {
191
+ "enum": [
192
+ "pass",
193
+ "fail",
194
+ "warning",
195
+ "unverifiable"
196
+ ]
197
+ },
198
+ "digest": {
199
+ "type": "string",
200
+ "minLength": 1
201
+ },
202
+ "description": {
203
+ "type": "string",
204
+ "minLength": 1
205
+ }
206
+ },
207
+ "additionalProperties": true
208
+ },
209
+ "auditBoundary": {
210
+ "type": "object",
211
+ "required": [
212
+ "scope",
213
+ "enumerability"
214
+ ],
215
+ "properties": {
216
+ "scope": {
217
+ "type": "string",
218
+ "minLength": 1
219
+ },
220
+ "enumerability": {
221
+ "enum": [
222
+ "closed-world",
223
+ "declared-open",
224
+ "sampled",
225
+ "manual"
226
+ ]
227
+ }
228
+ },
229
+ "additionalProperties": true
230
+ },
231
+ "responsibilityState": {
232
+ "type": "object",
233
+ "required": [
234
+ "sourceOwner",
235
+ "verificationOwner",
236
+ "releaseDecisionOwner"
237
+ ],
238
+ "properties": {
239
+ "sourceOwner": {
240
+ "type": "string",
241
+ "minLength": 1
242
+ },
243
+ "verificationOwner": {
244
+ "type": "string",
245
+ "minLength": 1
246
+ },
247
+ "releaseDecisionOwner": {
248
+ "type": "string",
249
+ "minLength": 1
250
+ },
251
+ "escalation": {
252
+ "type": "string",
253
+ "minLength": 1
254
+ }
255
+ },
256
+ "additionalProperties": true
257
+ },
258
+ "schemaEvolution": {
259
+ "type": "object",
260
+ "required": [
261
+ "interfaceVersion",
262
+ "compatibilityRule"
263
+ ],
264
+ "properties": {
265
+ "interfaceVersion": {
266
+ "const": 1
267
+ },
268
+ "compatibilityRule": {
269
+ "type": "string",
270
+ "minLength": 1
271
+ }
272
+ },
273
+ "additionalProperties": true
274
+ }
275
+ }
276
+ }
@@ -0,0 +1,219 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://kfd.libkungfu.dev/schemas/kfd-2/trust-taxonomy.schema.json",
4
+ "title": "KFD-2 trust taxonomy",
5
+ "type": "object",
6
+ "required": [
7
+ "schemaVersion",
8
+ "contract",
9
+ "standard"
10
+ ],
11
+ "properties": {
12
+ "schemaVersion": {
13
+ "const": 1
14
+ },
15
+ "contract": {
16
+ "const": "kfd-2-trust-taxonomy"
17
+ },
18
+ "standard": {
19
+ "const": "kfd-2"
20
+ }
21
+ },
22
+ "additionalProperties": true,
23
+ "x-kfd": {
24
+ "contract": "kfd-2-trust-taxonomy",
25
+ "schemaVersion": 1,
26
+ "allowedValues": {
27
+ "riskType": [
28
+ "natural-language-semantic-risk",
29
+ "external-fact-risk",
30
+ "partial-machine-coverage-risk",
31
+ "time-sensitive-state-risk",
32
+ "manual-review-risk"
33
+ ],
34
+ "trustImpact": [
35
+ "none",
36
+ "downgrade-warning",
37
+ "fail",
38
+ "unverifiable"
39
+ ],
40
+ "machineProvability": [
41
+ "machine-verifiable",
42
+ "partially-machine-verifiable",
43
+ "not-machine-verifiable",
44
+ "not-exhaustively-enumerable"
45
+ ],
46
+ "agentAction": [
47
+ "accept-with-warning",
48
+ "semantic-review-required",
49
+ "verify-external-facts",
50
+ "request-maintainer-review",
51
+ "open-kfd-extension-issue",
52
+ "fail-release"
53
+ ]
54
+ },
55
+ "extensionPolicy": {
56
+ "unknownValuePolicy": "schema-validation-fail",
57
+ "standardAction": "open-kfd-extension-issue",
58
+ "requestPath": {
59
+ "kind": "github-issue",
60
+ "repository": "https://github.com/kungfu-systems/kfd",
61
+ "issueUrl": "https://github.com/kungfu-systems/kfd/issues/new?title=KFD-2%20trust%20taxonomy%20extension%20request",
62
+ "appliesTo": [
63
+ "riskType",
64
+ "trustImpact",
65
+ "machineProvability",
66
+ "agentAction"
67
+ ]
68
+ }
69
+ }
70
+ },
71
+ "$defs": {
72
+ "riskType": {
73
+ "enum": [
74
+ "natural-language-semantic-risk",
75
+ "external-fact-risk",
76
+ "partial-machine-coverage-risk",
77
+ "time-sensitive-state-risk",
78
+ "manual-review-risk"
79
+ ]
80
+ },
81
+ "trustImpact": {
82
+ "enum": [
83
+ "none",
84
+ "downgrade-warning",
85
+ "fail",
86
+ "unverifiable"
87
+ ]
88
+ },
89
+ "machineProvability": {
90
+ "enum": [
91
+ "machine-verifiable",
92
+ "partially-machine-verifiable",
93
+ "not-machine-verifiable",
94
+ "not-exhaustively-enumerable"
95
+ ]
96
+ },
97
+ "agentAction": {
98
+ "enum": [
99
+ "accept-with-warning",
100
+ "semantic-review-required",
101
+ "verify-external-facts",
102
+ "request-maintainer-review",
103
+ "open-kfd-extension-issue",
104
+ "fail-release"
105
+ ]
106
+ },
107
+ "extensionRequest": {
108
+ "type": "object",
109
+ "required": [
110
+ "kind",
111
+ "repository",
112
+ "issueUrl"
113
+ ],
114
+ "properties": {
115
+ "kind": {
116
+ "const": "github-issue"
117
+ },
118
+ "repository": {
119
+ "const": "https://github.com/kungfu-systems/kfd"
120
+ },
121
+ "issueUrl": {
122
+ "type": "string",
123
+ "format": "uri"
124
+ },
125
+ "appliesTo": {
126
+ "type": "array",
127
+ "items": {
128
+ "enum": [
129
+ "riskType",
130
+ "trustImpact",
131
+ "machineProvability",
132
+ "agentAction"
133
+ ]
134
+ }
135
+ }
136
+ },
137
+ "additionalProperties": true
138
+ },
139
+ "residualRisk": {
140
+ "type": "object",
141
+ "required": [
142
+ "id",
143
+ "definedBy",
144
+ "riskType",
145
+ "trustImpact",
146
+ "machineProvability",
147
+ "agentAction",
148
+ "reason",
149
+ "owner"
150
+ ],
151
+ "properties": {
152
+ "id": {
153
+ "type": "string",
154
+ "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$"
155
+ },
156
+ "definedBy": {
157
+ "const": "https://kfd.libkungfu.dev/schemas/kfd-2/trust-taxonomy.schema.json#/$defs/residualRisk"
158
+ },
159
+ "riskType": {
160
+ "$ref": "#/$defs/riskType"
161
+ },
162
+ "trustImpact": {
163
+ "$ref": "#/$defs/trustImpact"
164
+ },
165
+ "machineProvability": {
166
+ "$ref": "#/$defs/machineProvability"
167
+ },
168
+ "agentAction": {
169
+ "$ref": "#/$defs/agentAction"
170
+ },
171
+ "reason": {
172
+ "type": "string",
173
+ "minLength": 1
174
+ },
175
+ "owner": {
176
+ "type": "string",
177
+ "minLength": 1
178
+ },
179
+ "extensionRequest": {
180
+ "$ref": "#/$defs/extensionRequest"
181
+ }
182
+ },
183
+ "additionalProperties": false
184
+ },
185
+ "downgradeReason": {
186
+ "type": "object",
187
+ "required": [
188
+ "id",
189
+ "riskType",
190
+ "trustImpact",
191
+ "reason"
192
+ ],
193
+ "properties": {
194
+ "id": {
195
+ "type": "string",
196
+ "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$"
197
+ },
198
+ "riskType": {
199
+ "$ref": "#/$defs/riskType"
200
+ },
201
+ "trustImpact": {
202
+ "$ref": "#/$defs/trustImpact"
203
+ },
204
+ "reason": {
205
+ "type": "string",
206
+ "minLength": 1
207
+ },
208
+ "agentAction": {
209
+ "$ref": "#/$defs/agentAction"
210
+ },
211
+ "source": {
212
+ "type": "string",
213
+ "minLength": 1
214
+ }
215
+ },
216
+ "additionalProperties": false
217
+ }
218
+ }
219
+ }