@consiliency/contract 0.6.4 → 0.7.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.
- package/README.md +50 -2
- package/conformance/registries/authority-key-registry.test.json +48 -0
- package/conformance/vectors/authority-algorithm-confusion.json +1 -1
- package/conformance/vectors/authority-bad-signature.json +1 -1
- package/conformance/vectors/authority-cert-digest-mismatch.json +1 -1
- package/conformance/vectors/authority-chain-appended-still-verifies.json +1 -1
- package/conformance/vectors/authority-core-validity-expired.json +1 -1
- package/conformance/vectors/authority-forged-self-minted.json +1 -1
- package/conformance/vectors/authority-key-expired.json +1 -1
- package/conformance/vectors/authority-key-revoked.json +1 -1
- package/conformance/vectors/authority-missing-signature.json +1 -1
- package/conformance/vectors/authority-signer-approver-mismatch.json +1 -1
- package/conformance/vectors/authority-unknown-key-id.json +1 -1
- package/conformance/vectors/authority-valid.json +1 -1
- package/conformance/vectors/authority-wrong-key-valid-id.json +1 -1
- package/core/authority-canon/provenance.json +1 -1
- package/core/contract.json +24 -4
- package/core/registries/authority-key-registry.json +3 -3
- package/core/registries/protected-source-categories.json +86 -0
- package/core/schemas/git-discipline-protocol.schema.json +1 -1
- package/core/schemas/protected-source-category.schema.json +29 -0
- package/core/schemas/version-skew-protocol.schema.json +3 -3
- package/core/supervised-run/admitted-launch-envelope.schema.json +226 -0
- package/core/supervised-run/admitted-launch-envelope.v2.schema.json +880 -0
- package/core/supervised-run/conformance/README.md +55 -0
- package/core/supervised-run/conformance/README.v2.md +297 -0
- package/core/supervised-run/conformance/SHA256SUMS +10 -0
- package/core/supervised-run/conformance/envelope.v2.apply.vectors.json +1938 -0
- package/core/supervised-run/conformance/envelope.v2.canonical.vectors.json +2088 -0
- package/core/supervised-run/conformance/envelope.v2.vectors.json +16359 -0
- package/core/supervised-run/conformance/envelope.vectors.json +557 -0
- package/core/supervised-run/conformance/run-status.vectors.json +2150 -0
- package/core/supervised-run/provenance.json +116 -0
- package/core/supervised-run/run-status.schema.json +768 -0
- package/package.json +1 -1
- package/src/index.d.ts +3 -1
- package/src/index.js +8 -1
|
@@ -0,0 +1,880 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "urn:contract:admitted_launch_envelope.v2",
|
|
4
|
+
"title": "admitted_launch_envelope.v2 (provisional)",
|
|
5
|
+
"description": "What a harness receives after admission, and everything that determines the launch. Harness-neutral and language-neutral. Every digest is lowercase hex SHA-256; every locator is repository-relative or a declared name, never a host path. v2 keeps every v1 field with its v1 meaning and adds the required launch block, which binds by digest each input that determines what process starts and what it is given: instruction and reference bytes, the final argument vector, the executable and wrapper chain, the materialized workspace, the effective environment, the trusted policy and qualification evidence, the action, route and stdin delivery, the stopping policy and any conditional grants. A v1 envelope is not a v2 envelope; v1 stays frozen and both may be read side by side, selected by the schema field. Field types, required fields and closed enums are defined here; the semantic rules a schema cannot establish are under x-semantic-rules, evaluated in the stages of x-evaluation-order. Status: provisional until the owning contract revision completes; a change needs reconciliation with every consumer.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"required": [
|
|
9
|
+
"schema",
|
|
10
|
+
"envelope_digest",
|
|
11
|
+
"assignment_digest",
|
|
12
|
+
"units",
|
|
13
|
+
"workspace",
|
|
14
|
+
"enforcement",
|
|
15
|
+
"launch",
|
|
16
|
+
"obligations",
|
|
17
|
+
"executable_dependencies",
|
|
18
|
+
"caller_context",
|
|
19
|
+
"redaction_posture"
|
|
20
|
+
],
|
|
21
|
+
"properties": {
|
|
22
|
+
"schema": {
|
|
23
|
+
"const": "admitted_launch_envelope.v2"
|
|
24
|
+
},
|
|
25
|
+
"envelope_digest": {
|
|
26
|
+
"$ref": "#/$defs/sha256",
|
|
27
|
+
"description": "SHA-256 of the RFC 8785 (JCS) serialization, encoded as UTF-8, of this object with envelope_digest removed. Unchanged from v1."
|
|
28
|
+
},
|
|
29
|
+
"assignment_digest": {
|
|
30
|
+
"$ref": "#/$defs/sha256"
|
|
31
|
+
},
|
|
32
|
+
"units": {
|
|
33
|
+
"type": "object",
|
|
34
|
+
"additionalProperties": false,
|
|
35
|
+
"required": [
|
|
36
|
+
"target_unit_ids",
|
|
37
|
+
"readonly_neighbor_unit_ids",
|
|
38
|
+
"snapshot_ref",
|
|
39
|
+
"crosswalk_ref"
|
|
40
|
+
],
|
|
41
|
+
"properties": {
|
|
42
|
+
"target_unit_ids": {
|
|
43
|
+
"type": "array",
|
|
44
|
+
"minItems": 1,
|
|
45
|
+
"items": {
|
|
46
|
+
"$ref": "#/$defs/unit_id"
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
"readonly_neighbor_unit_ids": {
|
|
50
|
+
"type": "array",
|
|
51
|
+
"items": {
|
|
52
|
+
"$ref": "#/$defs/unit_id"
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
"snapshot_ref": {
|
|
56
|
+
"$ref": "#/$defs/sha256"
|
|
57
|
+
},
|
|
58
|
+
"crosswalk_ref": {
|
|
59
|
+
"$ref": "#/$defs/sha256",
|
|
60
|
+
"description": "Opaque reference to the reviewed correspondence of the subject project at the snapshot; identifies the project."
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
"workspace": {
|
|
65
|
+
"type": "object",
|
|
66
|
+
"additionalProperties": false,
|
|
67
|
+
"required": [
|
|
68
|
+
"kind",
|
|
69
|
+
"repo_relative_locators"
|
|
70
|
+
],
|
|
71
|
+
"properties": {
|
|
72
|
+
"kind": {
|
|
73
|
+
"enum": [
|
|
74
|
+
"separate_clone",
|
|
75
|
+
"separate_copy",
|
|
76
|
+
"git_worktree_of_protected",
|
|
77
|
+
"in_place"
|
|
78
|
+
]
|
|
79
|
+
},
|
|
80
|
+
"repo_relative_locators": {
|
|
81
|
+
"type": "array",
|
|
82
|
+
"items": {
|
|
83
|
+
"type": "string"
|
|
84
|
+
},
|
|
85
|
+
"description": "The write scope in the protected repository. Unchanged from v1."
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
},
|
|
89
|
+
"enforcement": {
|
|
90
|
+
"type": "object",
|
|
91
|
+
"additionalProperties": false,
|
|
92
|
+
"required": [
|
|
93
|
+
"tier",
|
|
94
|
+
"required_constraints"
|
|
95
|
+
],
|
|
96
|
+
"properties": {
|
|
97
|
+
"tier": {
|
|
98
|
+
"enum": [
|
|
99
|
+
"provider_readonly_patch_return_audit",
|
|
100
|
+
"post_write_audit_only",
|
|
101
|
+
"os_enforced"
|
|
102
|
+
]
|
|
103
|
+
},
|
|
104
|
+
"required_constraints": {
|
|
105
|
+
"type": "array",
|
|
106
|
+
"uniqueItems": true,
|
|
107
|
+
"items": {
|
|
108
|
+
"enum": [
|
|
109
|
+
"write_scope",
|
|
110
|
+
"write_prevention",
|
|
111
|
+
"command_denial",
|
|
112
|
+
"network_denial"
|
|
113
|
+
]
|
|
114
|
+
},
|
|
115
|
+
"description": "Constraints the admitted run must have. write_prevention is new in v2; see x-constraint-semantics."
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
},
|
|
119
|
+
"launch": {
|
|
120
|
+
"type": "object",
|
|
121
|
+
"additionalProperties": false,
|
|
122
|
+
"required": [
|
|
123
|
+
"action",
|
|
124
|
+
"transport_id",
|
|
125
|
+
"stdin",
|
|
126
|
+
"instructions",
|
|
127
|
+
"references",
|
|
128
|
+
"argv",
|
|
129
|
+
"executable_chain",
|
|
130
|
+
"workspace_state",
|
|
131
|
+
"environment",
|
|
132
|
+
"trusted_policy",
|
|
133
|
+
"stop"
|
|
134
|
+
],
|
|
135
|
+
"properties": {
|
|
136
|
+
"action": {
|
|
137
|
+
"enum": [
|
|
138
|
+
"execution",
|
|
139
|
+
"review"
|
|
140
|
+
],
|
|
141
|
+
"description": "What the worker is launched to do. The same argument vector can take a different route, isolation or deadline depending on the action, so it is bound and never inferred from argv."
|
|
142
|
+
},
|
|
143
|
+
"transport_id": {
|
|
144
|
+
"$ref": "#/$defs/identifier",
|
|
145
|
+
"description": "Identifier of the route the harness selected to start the worker, as named in its trusted policy. Bound so that no fallback route is taken after admission."
|
|
146
|
+
},
|
|
147
|
+
"stdin": {
|
|
148
|
+
"enum": [
|
|
149
|
+
"input",
|
|
150
|
+
"devnull"
|
|
151
|
+
],
|
|
152
|
+
"description": "input: the worker's standard input is a pipe carrying exactly the instruction bytes in one write at start, then end of file. devnull: the worker's standard input is empty. Interactive terminal delivery is not representable in v2 (x-not-bound.interactive_terminal); no transport label or grant can stand in for either mode."
|
|
153
|
+
},
|
|
154
|
+
"instructions": {
|
|
155
|
+
"type": "object",
|
|
156
|
+
"additionalProperties": false,
|
|
157
|
+
"required": [
|
|
158
|
+
"sha256",
|
|
159
|
+
"byte_length",
|
|
160
|
+
"source"
|
|
161
|
+
],
|
|
162
|
+
"properties": {
|
|
163
|
+
"sha256": {
|
|
164
|
+
"$ref": "#/$defs/sha256",
|
|
165
|
+
"description": "SHA-256 of the exact instruction bytes as delivered, never of re-serialized text."
|
|
166
|
+
},
|
|
167
|
+
"byte_length": {
|
|
168
|
+
"$ref": "#/$defs/byte_length"
|
|
169
|
+
},
|
|
170
|
+
"source": {
|
|
171
|
+
"anyOf": [
|
|
172
|
+
{
|
|
173
|
+
"type": "null"
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
"$ref": "#/$defs/source_locator"
|
|
177
|
+
}
|
|
178
|
+
],
|
|
179
|
+
"description": "The captured source of the instruction bytes, or null only for genuinely inline instructions: the bytes are the whole stdin input or exactly one worker argument."
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
},
|
|
183
|
+
"references": {
|
|
184
|
+
"type": "array",
|
|
185
|
+
"items": {
|
|
186
|
+
"$ref": "#/$defs/reference"
|
|
187
|
+
},
|
|
188
|
+
"description": "Ordered list of every other byte sequence the route consumes: exactly one baseline, plus each consumed context and configuration file (prompt context, output schemas, tool settings, files discovered from the working directory). A file name in argv does not bind its contents; its bytes must be listed here. A source may be outside the workspace, under a declared root or behind a descriptor; it is never copied into the workspace to fit."
|
|
189
|
+
},
|
|
190
|
+
"argv": {
|
|
191
|
+
"type": "object",
|
|
192
|
+
"additionalProperties": false,
|
|
193
|
+
"required": [
|
|
194
|
+
"canonical_form",
|
|
195
|
+
"sha256",
|
|
196
|
+
"element_count"
|
|
197
|
+
],
|
|
198
|
+
"properties": {
|
|
199
|
+
"canonical_form": {
|
|
200
|
+
"const": "rfc8785_array_of_strings"
|
|
201
|
+
},
|
|
202
|
+
"sha256": {
|
|
203
|
+
"$ref": "#/$defs/sha256",
|
|
204
|
+
"description": "SHA-256 of the UTF-8 RFC 8785 serialization of the final ordered argument vector passed to the operating system to start the outermost entry of executable_chain; see x-digest-forms.rfc8785_array_of_strings and x-process-boundary."
|
|
205
|
+
},
|
|
206
|
+
"element_count": {
|
|
207
|
+
"type": "integer",
|
|
208
|
+
"minimum": 1
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
},
|
|
212
|
+
"executable_chain": {
|
|
213
|
+
"type": "array",
|
|
214
|
+
"minItems": 1,
|
|
215
|
+
"items": {
|
|
216
|
+
"$ref": "#/$defs/chain_entry"
|
|
217
|
+
},
|
|
218
|
+
"description": "Every wrapper in invocation order (outermost first), then the executable, last. Each entry binds its own file; one wrapper's digest never stands in for another entry."
|
|
219
|
+
},
|
|
220
|
+
"workspace_state": {
|
|
221
|
+
"type": "object",
|
|
222
|
+
"additionalProperties": false,
|
|
223
|
+
"required": [
|
|
224
|
+
"base_commit",
|
|
225
|
+
"content_form",
|
|
226
|
+
"content_sha256",
|
|
227
|
+
"cwd",
|
|
228
|
+
"target_map"
|
|
229
|
+
],
|
|
230
|
+
"properties": {
|
|
231
|
+
"base_commit": {
|
|
232
|
+
"anyOf": [
|
|
233
|
+
{
|
|
234
|
+
"type": "string",
|
|
235
|
+
"pattern": "^([0-9a-f]{40}|[0-9a-f]{64})$"
|
|
236
|
+
},
|
|
237
|
+
{
|
|
238
|
+
"type": "null"
|
|
239
|
+
}
|
|
240
|
+
],
|
|
241
|
+
"description": "Full commit id the workspace was materialized from, or null for a copy that has no commit. A commit alone never binds the workspace; content_sha256 does."
|
|
242
|
+
},
|
|
243
|
+
"content_form": {
|
|
244
|
+
"const": "rfc8785_tree_manifest"
|
|
245
|
+
},
|
|
246
|
+
"content_sha256": {
|
|
247
|
+
"$ref": "#/$defs/sha256",
|
|
248
|
+
"description": "Digest of the materialized source tree at launch, including every overlay on top of base_commit (staged, unstaged and untracked files); see x-digest-forms.rfc8785_tree_manifest. Its definition does not depend on cwd."
|
|
249
|
+
},
|
|
250
|
+
"cwd": {
|
|
251
|
+
"$ref": "#/$defs/cwd_locator",
|
|
252
|
+
"description": "The effective working directory of the worker after every declared transformation (x-process-boundary). A view_root cwd needs a bound filesystem_view grant that declares the root; content_sha256 stays the digest of the source tree, wherever the cwd is."
|
|
253
|
+
},
|
|
254
|
+
"target_map": {
|
|
255
|
+
"type": "array",
|
|
256
|
+
"items": {
|
|
257
|
+
"$ref": "#/$defs/target_mapping"
|
|
258
|
+
},
|
|
259
|
+
"description": "Ordered mapping from workspace locators to the protected-repository locators a returned change may target."
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
},
|
|
263
|
+
"environment": {
|
|
264
|
+
"type": "object",
|
|
265
|
+
"additionalProperties": false,
|
|
266
|
+
"required": [
|
|
267
|
+
"canonical_form",
|
|
268
|
+
"map_sha256",
|
|
269
|
+
"policy"
|
|
270
|
+
],
|
|
271
|
+
"properties": {
|
|
272
|
+
"canonical_form": {
|
|
273
|
+
"const": "rfc8785_redacted_environment"
|
|
274
|
+
},
|
|
275
|
+
"map_sha256": {
|
|
276
|
+
"$ref": "#/$defs/sha256",
|
|
277
|
+
"description": "SHA-256 of the UTF-8 RFC 8785 serialization of the redacted environment object of x-environment-commitment: the non-secret name-to-value map plus the sorted names of the secret variables present. No secret value, and no digest of one, enters it."
|
|
278
|
+
},
|
|
279
|
+
"policy": {
|
|
280
|
+
"type": "object",
|
|
281
|
+
"additionalProperties": false,
|
|
282
|
+
"required": [
|
|
283
|
+
"id",
|
|
284
|
+
"sha256"
|
|
285
|
+
],
|
|
286
|
+
"properties": {
|
|
287
|
+
"id": {
|
|
288
|
+
"$ref": "#/$defs/identifier"
|
|
289
|
+
},
|
|
290
|
+
"sha256": {
|
|
291
|
+
"$ref": "#/$defs/sha256",
|
|
292
|
+
"description": "Raw-byte SHA-256 of the environment policy: how the effective worker environment is built (inherited, scrubbed, scratch-relocated or constructed) and the trusted classification of every variable as non-secret or as secret with its credential source. A policy name alone never binds values."
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
},
|
|
297
|
+
"description": "The effective environment of the worker after every declared transformation (x-process-boundary), committed without secret values (x-environment-commitment)."
|
|
298
|
+
},
|
|
299
|
+
"trusted_policy": {
|
|
300
|
+
"type": "object",
|
|
301
|
+
"additionalProperties": false,
|
|
302
|
+
"required": [
|
|
303
|
+
"config_sha256",
|
|
304
|
+
"template_sha256",
|
|
305
|
+
"qualification_sha256"
|
|
306
|
+
],
|
|
307
|
+
"properties": {
|
|
308
|
+
"config_sha256": {
|
|
309
|
+
"$ref": "#/$defs/sha256",
|
|
310
|
+
"description": "Raw-byte SHA-256 of the trusted harness configuration consumed for this launch (bounds, roots, timeout maximum, stopping thresholds such as heartbeat and quiet intervals)."
|
|
311
|
+
},
|
|
312
|
+
"template_sha256": {
|
|
313
|
+
"$ref": "#/$defs/sha256",
|
|
314
|
+
"description": "Raw-byte SHA-256 of the closed argument template the final argv was produced from."
|
|
315
|
+
},
|
|
316
|
+
"qualification_sha256": {
|
|
317
|
+
"anyOf": [
|
|
318
|
+
{
|
|
319
|
+
"$ref": "#/$defs/sha256"
|
|
320
|
+
},
|
|
321
|
+
{
|
|
322
|
+
"type": "null"
|
|
323
|
+
}
|
|
324
|
+
],
|
|
325
|
+
"description": "Raw-byte SHA-256 of the qualification evidence this route was admitted against, or null when there is none. Null is never written as an empty string. See x-route-qualification: under every defined tier, null is refused with route_not_qualified."
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
},
|
|
329
|
+
"stop": {
|
|
330
|
+
"type": "object",
|
|
331
|
+
"additionalProperties": false,
|
|
332
|
+
"required": [
|
|
333
|
+
"timeout_seconds",
|
|
334
|
+
"deadline_action"
|
|
335
|
+
],
|
|
336
|
+
"properties": {
|
|
337
|
+
"timeout_seconds": {
|
|
338
|
+
"type": "integer",
|
|
339
|
+
"minimum": 1,
|
|
340
|
+
"maximum": 3600,
|
|
341
|
+
"description": "Wall-clock bound in whole seconds from process start. The schema caps it at 3600; the trusted configuration may declare a lower maximum (timeout_over_declared_max)."
|
|
342
|
+
},
|
|
343
|
+
"deadline_action": {
|
|
344
|
+
"enum": [
|
|
345
|
+
"terminate_process_group",
|
|
346
|
+
"not_armed"
|
|
347
|
+
],
|
|
348
|
+
"description": "terminate_process_group: at the deadline the harness terminates the worker's process group and records termination {reason: timed_out, by: harness}. not_armed: no wall-clock deadline is armed and stopping follows the policy bound by trusted_policy.config_sha256; allowed for action review only."
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
},
|
|
352
|
+
"grants": {
|
|
353
|
+
"type": "object",
|
|
354
|
+
"additionalProperties": false,
|
|
355
|
+
"properties": {
|
|
356
|
+
"filesystem_view_sha256": {
|
|
357
|
+
"$ref": "#/$defs/grant_commitment"
|
|
358
|
+
},
|
|
359
|
+
"descriptor_capabilities_sha256": {
|
|
360
|
+
"$ref": "#/$defs/grant_commitment"
|
|
361
|
+
},
|
|
362
|
+
"dependency_projection_sha256": {
|
|
363
|
+
"$ref": "#/$defs/grant_commitment"
|
|
364
|
+
},
|
|
365
|
+
"supervisor_identity_sha256": {
|
|
366
|
+
"$ref": "#/$defs/grant_commitment"
|
|
367
|
+
},
|
|
368
|
+
"egress_policy_sha256": {
|
|
369
|
+
"$ref": "#/$defs/grant_commitment"
|
|
370
|
+
}
|
|
371
|
+
},
|
|
372
|
+
"minProperties": 1,
|
|
373
|
+
"description": "Optional. Present only when the route applies these grants. Each value commits to the exact effective grant for this run, in an explicit canonical_form (x-digest-forms.grant_digest). A grant is a bound launch input, not evidence of enforcement: it never changes the tier's constraint mapping. A grant the tier does not list, or that the single matching qualification record does not cover with the same form and digest, is refused with grant_unqualified. See x-grant-coverage."
|
|
374
|
+
}
|
|
375
|
+
}
|
|
376
|
+
},
|
|
377
|
+
"obligations": {
|
|
378
|
+
"type": "object",
|
|
379
|
+
"additionalProperties": false,
|
|
380
|
+
"required": [
|
|
381
|
+
"definition_digests"
|
|
382
|
+
],
|
|
383
|
+
"properties": {
|
|
384
|
+
"definition_digests": {
|
|
385
|
+
"type": "array",
|
|
386
|
+
"items": {
|
|
387
|
+
"$ref": "#/$defs/sha256"
|
|
388
|
+
}
|
|
389
|
+
}
|
|
390
|
+
}
|
|
391
|
+
},
|
|
392
|
+
"executable_dependencies": {
|
|
393
|
+
"type": "object",
|
|
394
|
+
"additionalProperties": false,
|
|
395
|
+
"required": [
|
|
396
|
+
"declared",
|
|
397
|
+
"admitted_dependency_digest"
|
|
398
|
+
],
|
|
399
|
+
"properties": {
|
|
400
|
+
"declared": {
|
|
401
|
+
"type": "boolean"
|
|
402
|
+
},
|
|
403
|
+
"admitted_dependency_digest": {
|
|
404
|
+
"anyOf": [
|
|
405
|
+
{
|
|
406
|
+
"$ref": "#/$defs/sha256"
|
|
407
|
+
},
|
|
408
|
+
{
|
|
409
|
+
"type": "null"
|
|
410
|
+
}
|
|
411
|
+
]
|
|
412
|
+
}
|
|
413
|
+
}
|
|
414
|
+
},
|
|
415
|
+
"caller_context": {
|
|
416
|
+
"type": "object",
|
|
417
|
+
"description": "Opaque. Echoed back byte-for-byte (JCS) in every record that carries it; never interpreted by the harness or the workbench reader, and never a source of any launch input. Opaque means no application interpretation, dispatch, policy selection, launch-input derivation or alternate identity semantics; it does not exempt its bytes from JSON validity, canonicalization or the envelope-wide secret-safety rule, and that generic validation is not interpretation. It is one public, non-secret payload: its producer must not supply secret values or secret-derived digests (x-environment-commitment.no_secret_values_anywhere)."
|
|
418
|
+
},
|
|
419
|
+
"redaction_posture": {
|
|
420
|
+
"const": "digests_and_repo_relative_locators_only"
|
|
421
|
+
}
|
|
422
|
+
},
|
|
423
|
+
"$defs": {
|
|
424
|
+
"sha256": {
|
|
425
|
+
"type": "string",
|
|
426
|
+
"pattern": "^[0-9a-f]{64}$"
|
|
427
|
+
},
|
|
428
|
+
"unit_id": {
|
|
429
|
+
"type": "string",
|
|
430
|
+
"minLength": 1,
|
|
431
|
+
"maxLength": 200
|
|
432
|
+
},
|
|
433
|
+
"identifier": {
|
|
434
|
+
"type": "string",
|
|
435
|
+
"pattern": "^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$"
|
|
436
|
+
},
|
|
437
|
+
"byte_length": {
|
|
438
|
+
"type": "integer",
|
|
439
|
+
"minimum": 0
|
|
440
|
+
},
|
|
441
|
+
"reference": {
|
|
442
|
+
"type": "object",
|
|
443
|
+
"additionalProperties": false,
|
|
444
|
+
"required": [
|
|
445
|
+
"role",
|
|
446
|
+
"sha256",
|
|
447
|
+
"byte_length",
|
|
448
|
+
"source"
|
|
449
|
+
],
|
|
450
|
+
"properties": {
|
|
451
|
+
"role": {
|
|
452
|
+
"enum": [
|
|
453
|
+
"baseline",
|
|
454
|
+
"context",
|
|
455
|
+
"config"
|
|
456
|
+
]
|
|
457
|
+
},
|
|
458
|
+
"sha256": {
|
|
459
|
+
"$ref": "#/$defs/sha256",
|
|
460
|
+
"description": "SHA-256 of the exact bytes."
|
|
461
|
+
},
|
|
462
|
+
"byte_length": {
|
|
463
|
+
"$ref": "#/$defs/byte_length"
|
|
464
|
+
},
|
|
465
|
+
"source": {
|
|
466
|
+
"$ref": "#/$defs/source_locator"
|
|
467
|
+
}
|
|
468
|
+
}
|
|
469
|
+
},
|
|
470
|
+
"chain_entry": {
|
|
471
|
+
"type": "object",
|
|
472
|
+
"additionalProperties": false,
|
|
473
|
+
"required": [
|
|
474
|
+
"role",
|
|
475
|
+
"locator_kind",
|
|
476
|
+
"locator",
|
|
477
|
+
"sha256"
|
|
478
|
+
],
|
|
479
|
+
"properties": {
|
|
480
|
+
"role": {
|
|
481
|
+
"enum": [
|
|
482
|
+
"wrapper",
|
|
483
|
+
"executable"
|
|
484
|
+
]
|
|
485
|
+
},
|
|
486
|
+
"locator_kind": {
|
|
487
|
+
"enum": [
|
|
488
|
+
"repo_relative",
|
|
489
|
+
"declared"
|
|
490
|
+
],
|
|
491
|
+
"description": "repo_relative: a locator in the workspace. declared: a name the trusted configuration resolves through its own configured search paths; the host path is never published."
|
|
492
|
+
},
|
|
493
|
+
"locator": {
|
|
494
|
+
"type": "string"
|
|
495
|
+
},
|
|
496
|
+
"sha256": {
|
|
497
|
+
"$ref": "#/$defs/sha256",
|
|
498
|
+
"description": "SHA-256 of the raw bytes of the resolved file. A script's digest does not cover its interpreter or package closure; those are bound by executable_dependencies and the dependency_projection grant."
|
|
499
|
+
}
|
|
500
|
+
}
|
|
501
|
+
},
|
|
502
|
+
"target_mapping": {
|
|
503
|
+
"type": "object",
|
|
504
|
+
"additionalProperties": false,
|
|
505
|
+
"required": [
|
|
506
|
+
"workspace_locator",
|
|
507
|
+
"protected_locator"
|
|
508
|
+
],
|
|
509
|
+
"properties": {
|
|
510
|
+
"workspace_locator": {
|
|
511
|
+
"type": "string"
|
|
512
|
+
},
|
|
513
|
+
"protected_locator": {
|
|
514
|
+
"type": "string"
|
|
515
|
+
}
|
|
516
|
+
}
|
|
517
|
+
},
|
|
518
|
+
"relative_path": {
|
|
519
|
+
"type": "string",
|
|
520
|
+
"description": "A portable relative path; see x-locator-grammar. Lexical violations are locator_not_repo_relative."
|
|
521
|
+
},
|
|
522
|
+
"workspace_source": {
|
|
523
|
+
"type": "object",
|
|
524
|
+
"additionalProperties": false,
|
|
525
|
+
"required": [
|
|
526
|
+
"namespace",
|
|
527
|
+
"path"
|
|
528
|
+
],
|
|
529
|
+
"properties": {
|
|
530
|
+
"namespace": {
|
|
531
|
+
"const": "workspace"
|
|
532
|
+
},
|
|
533
|
+
"path": {
|
|
534
|
+
"$ref": "#/$defs/relative_path"
|
|
535
|
+
}
|
|
536
|
+
}
|
|
537
|
+
},
|
|
538
|
+
"declared_root_source": {
|
|
539
|
+
"type": "object",
|
|
540
|
+
"additionalProperties": false,
|
|
541
|
+
"required": [
|
|
542
|
+
"namespace",
|
|
543
|
+
"root",
|
|
544
|
+
"path"
|
|
545
|
+
],
|
|
546
|
+
"properties": {
|
|
547
|
+
"namespace": {
|
|
548
|
+
"const": "declared_root"
|
|
549
|
+
},
|
|
550
|
+
"root": {
|
|
551
|
+
"$ref": "#/$defs/identifier",
|
|
552
|
+
"description": "A root the trusted configuration declares; its physical location stays local."
|
|
553
|
+
},
|
|
554
|
+
"path": {
|
|
555
|
+
"$ref": "#/$defs/relative_path"
|
|
556
|
+
}
|
|
557
|
+
}
|
|
558
|
+
},
|
|
559
|
+
"descriptor_source": {
|
|
560
|
+
"type": "object",
|
|
561
|
+
"additionalProperties": false,
|
|
562
|
+
"required": [
|
|
563
|
+
"namespace",
|
|
564
|
+
"descriptor"
|
|
565
|
+
],
|
|
566
|
+
"properties": {
|
|
567
|
+
"namespace": {
|
|
568
|
+
"const": "descriptor"
|
|
569
|
+
},
|
|
570
|
+
"descriptor": {
|
|
571
|
+
"$ref": "#/$defs/identifier",
|
|
572
|
+
"description": "An opaque descriptor identity resolved by the bound descriptor_capabilities grant."
|
|
573
|
+
}
|
|
574
|
+
}
|
|
575
|
+
},
|
|
576
|
+
"source_locator": {
|
|
577
|
+
"anyOf": [
|
|
578
|
+
{
|
|
579
|
+
"$ref": "#/$defs/workspace_source"
|
|
580
|
+
},
|
|
581
|
+
{
|
|
582
|
+
"$ref": "#/$defs/declared_root_source"
|
|
583
|
+
},
|
|
584
|
+
{
|
|
585
|
+
"$ref": "#/$defs/descriptor_source"
|
|
586
|
+
}
|
|
587
|
+
],
|
|
588
|
+
"description": "Where the bytes are read from, by logical identity only; see x-launch-semantics.source_resolution."
|
|
589
|
+
},
|
|
590
|
+
"workspace_cwd": {
|
|
591
|
+
"type": "object",
|
|
592
|
+
"additionalProperties": false,
|
|
593
|
+
"required": [
|
|
594
|
+
"namespace",
|
|
595
|
+
"path"
|
|
596
|
+
],
|
|
597
|
+
"properties": {
|
|
598
|
+
"namespace": {
|
|
599
|
+
"const": "workspace"
|
|
600
|
+
},
|
|
601
|
+
"path": {
|
|
602
|
+
"$ref": "#/$defs/relative_path",
|
|
603
|
+
"description": "Relative to the source tree root; exactly '.' is the root."
|
|
604
|
+
}
|
|
605
|
+
}
|
|
606
|
+
},
|
|
607
|
+
"view_root_cwd": {
|
|
608
|
+
"type": "object",
|
|
609
|
+
"additionalProperties": false,
|
|
610
|
+
"required": [
|
|
611
|
+
"namespace",
|
|
612
|
+
"root",
|
|
613
|
+
"path"
|
|
614
|
+
],
|
|
615
|
+
"properties": {
|
|
616
|
+
"namespace": {
|
|
617
|
+
"const": "view_root"
|
|
618
|
+
},
|
|
619
|
+
"root": {
|
|
620
|
+
"$ref": "#/$defs/identifier",
|
|
621
|
+
"description": "A root declared by the bound filesystem_view grant."
|
|
622
|
+
},
|
|
623
|
+
"path": {
|
|
624
|
+
"$ref": "#/$defs/relative_path",
|
|
625
|
+
"description": "Relative to that root; exactly '.' is the root."
|
|
626
|
+
}
|
|
627
|
+
}
|
|
628
|
+
},
|
|
629
|
+
"cwd_locator": {
|
|
630
|
+
"anyOf": [
|
|
631
|
+
{
|
|
632
|
+
"$ref": "#/$defs/workspace_cwd"
|
|
633
|
+
},
|
|
634
|
+
{
|
|
635
|
+
"$ref": "#/$defs/view_root_cwd"
|
|
636
|
+
}
|
|
637
|
+
]
|
|
638
|
+
},
|
|
639
|
+
"grant_commitment": {
|
|
640
|
+
"type": "object",
|
|
641
|
+
"additionalProperties": false,
|
|
642
|
+
"required": [
|
|
643
|
+
"canonical_form",
|
|
644
|
+
"sha256"
|
|
645
|
+
],
|
|
646
|
+
"properties": {
|
|
647
|
+
"canonical_form": {
|
|
648
|
+
"enum": [
|
|
649
|
+
"raw_bytes",
|
|
650
|
+
"rfc8785"
|
|
651
|
+
],
|
|
652
|
+
"description": "raw_bytes: SHA-256 of the exact grant document bytes loaded. rfc8785: SHA-256 of the UTF-8 RFC 8785 serialization of the in-memory grant structure, ordered lists kept in order."
|
|
653
|
+
},
|
|
654
|
+
"sha256": {
|
|
655
|
+
"$ref": "#/$defs/sha256"
|
|
656
|
+
}
|
|
657
|
+
}
|
|
658
|
+
}
|
|
659
|
+
},
|
|
660
|
+
"x-canonicalization": "RFC 8785 (JCS), encoded as UTF-8: object members sorted by the UTF-16 code units of their names; strings with only the RFC 8785 escapes (quotation mark, reverse solidus, \\b \\f \\n \\r \\t, other controls as lowercase \\u00xx); numbers in ECMAScript Number-to-String form. Every value that enters a commitment must first pass the v2 input boundary, checked on the raw input before parsing loses evidence and again on in-memory values before commitment: valid UTF-8; no duplicate object member names (every valid member name, __proto__ included, is an ordinary member); no lone surrogate in any string or name. Parse JSON numbers as finite IEEE-754 binary64 values using round-to-nearest, ties-to-even. An integer-valued number MUST lie in the inclusive range -9007199254740991 through 9007199254740991. Apply this restriction to the numeric value regardless of token spelling, including decimal-point and exponent forms, and to in-memory values before commitment; a host arbitrary-precision integer is range-checked before conversion. Reject an out-of-range integer; never round, stringify or coerce it into admission. Non-integral finite binary64 numbers remain supported and use RFC 8785 serialization; negative zero serializes as 0. This is a deliberately narrower v2 admission profile, not a claim that RFC 8785 disallows larger doubles; large opaque identifiers can be strings. Input outside the boundary is never coerced: a launch input is refused with launch_input_unbound, and an envelope that cannot be serialized cannot verify its envelope_digest.",
|
|
661
|
+
"x-digest-forms": {
|
|
662
|
+
"envelope_digest": "SHA-256 of the UTF-8 RFC 8785 serialization of the envelope with envelope_digest removed.",
|
|
663
|
+
"raw_bytes": "instructions.sha256, references[].sha256, executable_chain[].sha256, environment.policy.sha256 and every trusted_policy digest are SHA-256 of the exact bytes the harness reads and uses, never of a re-parsed or re-serialized form; byte_length is the number of those bytes. Grants state their own form (grant_digest).",
|
|
664
|
+
"rfc8785_array_of_strings": "The final ordered argument vector passed to the operating system to start the outermost entry of executable_chain, after every rewrite (materialized paths, inserted output paths, prompt moved to stdin), element 0 included: a JSON array of strings, serialized by RFC 8785 and encoded as UTF-8, then hashed. Never a shell command string, a pre-rewrite template or an unordered set. An element that is not a string, contains NUL or is not valid Unicode cannot be bound: launch_input_unbound. element_count is the array length. A digest of any other serialization (whitespace, ASCII-escaped characters, another order) does not match.",
|
|
665
|
+
"rfc8785_tree_manifest": "Capture walks the source tree root without following any symlink. The root-level path '.git' and everything under it are excluded without descending into or following it, whether it is a directory, a file or a symlink; a nested '.git' (for example sub/.git) is ordinary content. Directories are not entries. Every other object yields one [path, kind, sha256] entry: path is relative to the root, '/'-separated and must satisfy x-locator-grammar; kind is 'executable_file' for a regular file whose POSIX mode has any of 0o111 set, 'file' for any other regular file, or 'symlink'; sha256 is of the raw file bytes, or of the exact raw link-target bytes for a symlink, which are never dereferenced, normalized or re-encoded. Entries are sorted by the UTF-8 bytes of path; the digest is SHA-256 of the UTF-8 RFC 8785 serialization of that array. Capture is refused with launch_input_unbound when an object is of any other type (fifo, socket, device), a path is not valid Unicode or not grammatical, two objects have the same path, or a regular file's mode is unavailable (a platform without reliable POSIX mode metadata refuses rather than inventing one). The capture listing must be structurally consistent: no represented file, symlink or other non-directory object may be a proper path-segment ancestor of another listed path, whatever the listing order (directories may be implicit). Such a listing is refused with launch_input_unbound. Capture and workspace joins never traverse a symlink ancestor, even when its target would stay inside the root. The root '.git' exclusion applies first.",
|
|
666
|
+
"environment_map": "SHA-256 of the UTF-8 RFC 8785 serialization of the redacted environment object of x-environment-commitment, built from the effective worker environment and the classification in the bound environment policy.",
|
|
667
|
+
"grant_digest": "Each grant states its canonical_form. raw_bytes: SHA-256 of the exact bytes of the grant document the harness loads and applies. rfc8785: SHA-256 of the UTF-8 RFC 8785 serialization of the in-memory grant structure the harness applies, ordered lists (egress rules, mounts) kept in order. The digest is compared with the same captured object that is applied; the form is never guessed. Run-specific resources (output directories, mounts, descriptors) are named by logical identity, purpose and access; their host paths, socket paths and descriptor numbers stay local."
|
|
668
|
+
},
|
|
669
|
+
"x-launch-semantics": {
|
|
670
|
+
"capture_once": "Every launch digest is computed from one captured object (bytes, array, map, tree, grant), and that same object is what the harness starts the worker with. A digest that is not compared with the object actually used binds nothing.",
|
|
671
|
+
"recheck_before_start": "Admission and launch may be separated in time. Immediately before the process starts, the harness recomputes every launch digest from what it is about to use; any difference is refused under the launch-material stage of x-evaluation-order with worker_invocations 0.",
|
|
672
|
+
"stdin": "With stdin input, the instruction bytes are written once, at start, to a pipe that is then closed; with devnull, nothing. No terminal, no delayed or repeated write, no prompt response and no framing bytes.",
|
|
673
|
+
"stop": "terminate_process_group is measured on a monotonic clock from process start. Stopping thresholds such as heartbeat and quiet intervals are part of the trusted configuration bound by config_sha256, never an ambient default.",
|
|
674
|
+
"caller_context": "No launch input is ever taken from caller_context.",
|
|
675
|
+
"no_fallback": "After admission the harness never selects another route, transport, executable, environment, policy or deadline than the bound one; a needed change means a new envelope and a new admission.",
|
|
676
|
+
"source_resolution": "workspace sources are paths in the captured source tree: the tree must hold exactly one regular-file or executable-file entry at that path, with the same digest, and the bytes delivered or read are that captured object. declared_root sources resolve through roots declared in the trusted configuration bound by config_sha256. descriptor sources resolve through the bound descriptor_capabilities grant, which must list the descriptor. Resolved bytes are captured, hashed and rechecked before start; a root, descriptor or source that cannot be resolved, or that escapes its root, is launch_input_unbound. Sources are never copied into the workspace to satisfy the schema.",
|
|
677
|
+
"executable_chain": "A repo_relative chain entry must be the single regular-file or executable-file entry at that path in the captured source tree, with the same digest as the entry. A declared entry resolves through the trusted configuration's search paths.",
|
|
678
|
+
"cwd": "The working directory is resolved and rechecked locally before start, including symlink escape. A view_root cwd needs the bound filesystem_view grant, which declares the root. A directory identity does not bind files the worker discovers from it: every file a route discovers from its working directory must be bound as a reference, or the launch is unbound.",
|
|
679
|
+
"inline_instructions": "A null instruction source is valid only when the instruction bytes are the whole stdin input or exactly one worker argument.",
|
|
680
|
+
"caller_context_content": "caller_context is validated generically like every other envelope value (JSON validity, canonicalization, secret safety) and otherwise left uninterpreted; a secret-free payload is echoed unchanged, and rotating an authorized credential with the same payload leaves the envelope unchanged."
|
|
681
|
+
},
|
|
682
|
+
"x-not-bound": {
|
|
683
|
+
"credential_bytes": "Secret values are deliberately outside every public commitment, and so is any digest of them (x-environment-commitment). What is bound is each secret variable's presence, destination and authorized credential source. A credential delivered by descriptor is bound by the descriptor_capabilities grant.",
|
|
684
|
+
"admitting_implementation": "The identity of the admitting validator or codec is not part of the envelope; it is the harness's own trusted implementation.",
|
|
685
|
+
"attempt_identity": "Run and attempt ids are not in the envelope; supervised_run_status binds them to envelope_digest in its result binding.",
|
|
686
|
+
"interactive_terminal": "Interactive terminal delivery (a pseudo-terminal, prompt responses, paste framing, input sent after the worker has produced output) is not representable in v2. Routes that need it are out of scope and refused; no transport label or descriptor grant can make stdin input or devnull describe it."
|
|
687
|
+
},
|
|
688
|
+
"x-enforcement-tiers": {
|
|
689
|
+
"provider_readonly_patch_return_audit": {
|
|
690
|
+
"status": "defined",
|
|
691
|
+
"qualification": "required",
|
|
692
|
+
"workspace_kinds": [
|
|
693
|
+
"separate_clone",
|
|
694
|
+
"separate_copy"
|
|
695
|
+
],
|
|
696
|
+
"constraints": {
|
|
697
|
+
"write_scope": "checked_before_apply",
|
|
698
|
+
"write_prevention": "not_enforced",
|
|
699
|
+
"command_denial": "not_enforced",
|
|
700
|
+
"network_denial": "not_enforced"
|
|
701
|
+
},
|
|
702
|
+
"grant_kinds": [
|
|
703
|
+
"filesystem_view_sha256",
|
|
704
|
+
"descriptor_capabilities_sha256",
|
|
705
|
+
"dependency_projection_sha256",
|
|
706
|
+
"supervisor_identity_sha256",
|
|
707
|
+
"egress_policy_sha256"
|
|
708
|
+
],
|
|
709
|
+
"semantics": "The worker runs in a separate clone or copy, asked by its provider's own mode to run read-only. Its changes return as proposal bytes, which always pass the write_scope apply check before anything reaches the protected repository, even when required_constraints is empty, followed by a post-run audit of the separate workspace.",
|
|
710
|
+
"limits": "Read-only is the provider's own enforcement, not operating-system confinement. During the run nothing prevents writes, commands or network use by the worker or by a same-login process; a tool-action refusal is detection, not prevention. The tier says what a qualified route provides; it does not qualify any installed tool."
|
|
711
|
+
},
|
|
712
|
+
"post_write_audit_only": {
|
|
713
|
+
"status": "defined",
|
|
714
|
+
"qualification": "required",
|
|
715
|
+
"workspace_kinds": [
|
|
716
|
+
"separate_clone",
|
|
717
|
+
"separate_copy",
|
|
718
|
+
"git_worktree_of_protected",
|
|
719
|
+
"in_place"
|
|
720
|
+
],
|
|
721
|
+
"constraints": {
|
|
722
|
+
"write_scope": "not_enforced",
|
|
723
|
+
"write_prevention": "not_enforced",
|
|
724
|
+
"command_denial": "not_enforced",
|
|
725
|
+
"network_denial": "not_enforced"
|
|
726
|
+
},
|
|
727
|
+
"grant_kinds": [
|
|
728
|
+
"filesystem_view_sha256",
|
|
729
|
+
"descriptor_capabilities_sha256",
|
|
730
|
+
"dependency_projection_sha256",
|
|
731
|
+
"supervisor_identity_sha256",
|
|
732
|
+
"egress_policy_sha256"
|
|
733
|
+
],
|
|
734
|
+
"semantics": "Writes are detected by an audit after they happen. Applies when the workspace is not a separate clone or copy, for example a git worktree of the protected repository, which shares its object store and refs.",
|
|
735
|
+
"limits": "Detects after the write only; prevents nothing. The tier says what a qualified route provides; it does not qualify any installed tool."
|
|
736
|
+
},
|
|
737
|
+
"os_enforced": {
|
|
738
|
+
"status": "reserved",
|
|
739
|
+
"qualification": "not_admissible",
|
|
740
|
+
"workspace_kinds": [],
|
|
741
|
+
"constraints": {
|
|
742
|
+
"write_scope": "not_enforced",
|
|
743
|
+
"write_prevention": "not_enforced",
|
|
744
|
+
"command_denial": "not_enforced",
|
|
745
|
+
"network_denial": "not_enforced"
|
|
746
|
+
},
|
|
747
|
+
"grant_kinds": [],
|
|
748
|
+
"semantics": "Reserved. No semantics are defined yet.",
|
|
749
|
+
"limits": "An envelope that names it is refused with tier_unqualified, whatever qualification evidence it carries."
|
|
750
|
+
}
|
|
751
|
+
},
|
|
752
|
+
"x-constraint-semantics": {
|
|
753
|
+
"write_scope": "No change outside workspace.repo_relative_locators reaches the protected repository. Where a tier maps write_scope to checked_before_apply, the check is part of the tier and runs whether or not required_constraints lists write_scope: that list adds demands, it never disables a tier guarantee. After the worker finishes, the checker must: take the worker's changes only as the returned proposal bytes, never by reading or copying the separate workspace into the protected repository; verify the proposal-bytes digest recorded for the attempt; attribute every entry of the proposal to a path; map each touched path (both sides of a rename or copy) through launch.workspace_state.target_map and require it inside workspace.repo_relative_locators; refuse any added or changed symlink, submodule entry or file mode; and apply all of it or none of it against the protected state bound at launch, refusing a stale base. Rejection is a work outcome (x-apply-outcomes), not a run state: the attempt has already run, so its journal follows running -> finished with a valid termination and result binding, and no proposal byte is applied. A post-launch refused terminal is refused_after_launch under supervised_run_status. Write prevention during the run is the separate write_prevention constraint.",
|
|
754
|
+
"write_prevention": "During the run the worker cannot write outside the scope anywhere, in the workspace or on the host. No defined tier provides it, so requiring it is refused with constraint_unsupported.",
|
|
755
|
+
"command_denial": "The worker cannot run commands outside an allowed set during the run.",
|
|
756
|
+
"network_denial": "The worker cannot open network connections during the run. An egress_policy grant binds the policy applied; it does not make network_denial enforced under any defined tier."
|
|
757
|
+
},
|
|
758
|
+
"x-route-qualification": {
|
|
759
|
+
"rule": "A tier describes semantics and limits. It is not evidence that an installed tool honours them. Admission under a defined tier needs qualification evidence for the specific route, and unqualified means refused: there is no fallback tier and no warn-only admission.",
|
|
760
|
+
"route_key": "A route is: enforcement.tier, launch.action, launch.transport_id, the ordered launch.executable_chain (locator_kind, locator and sha256 of each entry), launch.trusted_policy.template_sha256 and launch.trusted_policy.qualification_sha256.",
|
|
761
|
+
"records": "The validator holds its qualification records itself, independently of the envelope, as it holds the expected authority values. The envelope only names the evidence it was admitted against. A record also lists, per grant kind, the {canonical_form, sha256} its evidence covers, and the credential sources it authorizes.",
|
|
762
|
+
"matching": "Admission needs exactly one held record that matches every part of the route key. Zero matches, or two or more (byte-identical duplicates included), is route_not_qualified, decided before any grant check; records are never selected by order, merged or searched for a covering one. qualification_sha256 null is route_not_qualified. Any change to a part (another build of any chain entry, another wrapper, template, action, transport or tier) needs its own evidence; evidence never carries over.",
|
|
763
|
+
"evidence": "For its route, the evidence must show that each constraint the tier maps to checked_before_apply is honoured, that each grant it covers is applied as bound, and that the tier's stated limits hold. Its format is outside this contract; here it is an opaque raw-byte digest.",
|
|
764
|
+
"reserved_tiers": "A reserved tier is refused with tier_unqualified, whatever evidence is named.",
|
|
765
|
+
"probes": "Qualification probes are trusted auxiliary work done before admission. They are not worker invocations and not part of the launch chain, and they never mutate captured material without a recapture and recheck. A worker started under the name of a probe is a launch, and is refused if not admitted."
|
|
766
|
+
},
|
|
767
|
+
"x-evaluation-order": {
|
|
768
|
+
"rule": "Diagnostics are evaluated stage by stage, in this order. Within a stage every applicable diagnostic is reported; the first stage that reports any diagnostic ends evaluation, so later stages are not evaluated. Vectors expect exactly the diagnostics of that first reporting stage.",
|
|
769
|
+
"stages": [
|
|
770
|
+
[
|
|
771
|
+
"envelope_schema_invalid"
|
|
772
|
+
],
|
|
773
|
+
[
|
|
774
|
+
"envelope_digest_mismatch"
|
|
775
|
+
],
|
|
776
|
+
[
|
|
777
|
+
"authority_foreign",
|
|
778
|
+
"authority_baseline_stale"
|
|
779
|
+
],
|
|
780
|
+
[
|
|
781
|
+
"locator_not_repo_relative",
|
|
782
|
+
"raw_output_in_record",
|
|
783
|
+
"dependency_digest_required",
|
|
784
|
+
"workspace_source_inconsistent",
|
|
785
|
+
"executable_chain_invalid",
|
|
786
|
+
"baseline_reference_required",
|
|
787
|
+
"target_map_outside_scope"
|
|
788
|
+
],
|
|
789
|
+
[
|
|
790
|
+
"tier_unqualified"
|
|
791
|
+
],
|
|
792
|
+
[
|
|
793
|
+
"route_not_qualified"
|
|
794
|
+
],
|
|
795
|
+
[
|
|
796
|
+
"constraint_unsupported",
|
|
797
|
+
"workspace_not_separate_copy",
|
|
798
|
+
"grant_unqualified",
|
|
799
|
+
"stop_policy_unbounded",
|
|
800
|
+
"timeout_over_declared_max"
|
|
801
|
+
],
|
|
802
|
+
[
|
|
803
|
+
"launch_instructions_mismatch",
|
|
804
|
+
"launch_reference_mismatch",
|
|
805
|
+
"launch_argv_mismatch",
|
|
806
|
+
"launch_executable_mismatch",
|
|
807
|
+
"launch_workspace_mismatch",
|
|
808
|
+
"launch_environment_mismatch",
|
|
809
|
+
"launch_policy_mismatch",
|
|
810
|
+
"launch_timeout_mismatch",
|
|
811
|
+
"launch_input_unbound"
|
|
812
|
+
]
|
|
813
|
+
]
|
|
814
|
+
},
|
|
815
|
+
"x-semantic-rules": {
|
|
816
|
+
"envelope_schema_invalid": "the envelope does not validate against this schema.",
|
|
817
|
+
"envelope_digest_mismatch": "envelope_digest does not equal the SHA-256 of the UTF-8 RFC 8785 serialization of the envelope without envelope_digest (x-canonicalization).",
|
|
818
|
+
"authority_foreign": "assignment_digest or units.crosswalk_ref differs from the injected validator's independently expected values (another assignment, repository or project), even when the envelope self-verifies.",
|
|
819
|
+
"authority_baseline_stale": "units.snapshot_ref differs from the independently expected snapshot while assignment and crosswalk match, even when the envelope self-verifies.",
|
|
820
|
+
"locator_not_repo_relative": "a locator violates x-locator-grammar: workspace.repo_relative_locators, every workspace and declared_root source path, every repo_relative executable_chain locator, both locators of each target_map entry, and every cwd path (which may also be exactly '.').",
|
|
821
|
+
"raw_output_in_record": "a string outside caller_context contains a line break or control character, or exceeds 512 characters.",
|
|
822
|
+
"dependency_digest_required": "executable dependencies are declared without an admitted dependency digest.",
|
|
823
|
+
"workspace_source_inconsistent": "workspace.kind is separate_clone or git_worktree_of_protected and launch.workspace_state.base_commit is null.",
|
|
824
|
+
"executable_chain_invalid": "the last launch.executable_chain entry is not the executable, an earlier entry is not a wrapper, or a declared locator does not match the identifier pattern of $defs.identifier.",
|
|
825
|
+
"baseline_reference_required": "launch.references does not contain exactly one entry with role baseline.",
|
|
826
|
+
"target_map_outside_scope": "a launch.workspace_state.target_map protected_locator is neither equal to nor under an entry of workspace.repo_relative_locators.",
|
|
827
|
+
"tier_unqualified": "the tier is reserved (x-enforcement-tiers status reserved).",
|
|
828
|
+
"route_not_qualified": "launch.trusted_policy.qualification_sha256 is null, or the validator does not hold exactly one qualification record matching every part of the route key in x-route-qualification (zero or several matches).",
|
|
829
|
+
"constraint_unsupported": "a required constraint maps to not_enforced under the declared tier; refused with {constraint, tier}, never silently weakened. A grant never changes this mapping.",
|
|
830
|
+
"workspace_not_separate_copy": "the workspace kind is not permitted for the declared tier.",
|
|
831
|
+
"grant_unqualified": "against the single matching qualification record: a launch.grants member the tier's grant_kinds do not list or that the record does not cover with the same canonical_form and sha256; a dependency_projection grant while executable_dependencies.declared is false; a descriptor source without a descriptor_capabilities grant or a view_root cwd without a filesystem_view grant; or a secret environment variable whose credential source, as classified by the bound environment policy, the record does not authorize.",
|
|
832
|
+
"stop_policy_unbounded": "launch.action is execution and launch.stop.deadline_action is not_armed.",
|
|
833
|
+
"timeout_over_declared_max": "launch.stop.timeout_seconds exceeds the timeout maximum declared by the validator's trusted configuration.",
|
|
834
|
+
"launch_instructions_mismatch": "the instruction bytes captured and about to be delivered do not have launch.instructions.sha256, or their UTF-8 byte count is not launch.instructions.byte_length; a workspace source is not the single file entry at that path in the captured tree with the same digest; with stdin input the single start write is not exactly those bytes; or a null source is not genuinely inline (neither the stdin input nor exactly one worker argument).",
|
|
835
|
+
"launch_reference_mismatch": "the captured reference bytes differ from launch.references in order, role, source, digest or length, a reference is missing or added, or a workspace source is not the single file entry at that path in the captured tree with the same digest.",
|
|
836
|
+
"launch_argv_mismatch": "the SHA-256 of the UTF-8 RFC 8785 serialization of the argument vector about to start the outermost chain entry differs from launch.argv.sha256, its length differs from element_count, or the worker argv differs from the one derived from it by the declared transformations.",
|
|
837
|
+
"launch_executable_mismatch": "the resolved file of any chain entry about to be run differs from launch.executable_chain in order, role, locator or raw-byte digest, an entry is missing or added, or a repo_relative entry is not the single file entry at that path in the captured tree with the same digest.",
|
|
838
|
+
"launch_workspace_mismatch": "the workspace about to be used differs from launch.workspace_state: another base commit, a tree-manifest digest other than content_sha256, another target map, or an effective worker cwd other than the bound one (including one that differs from the cwd derived by the declared transformations).",
|
|
839
|
+
"launch_environment_mismatch": "the redacted environment object built from the effective worker environment and the bound classification does not have map_sha256, the policy is not launch.environment.policy by id and raw-byte digest, or the worker environment differs from the one derived by the declared transformations.",
|
|
840
|
+
"launch_policy_mismatch": "the configuration, template or qualification bytes about to be used do not have the digests in launch.trusted_policy, an applied grant does not have its launch.grants digest in its stated canonical_form, or a grant is applied that launch.grants does not list.",
|
|
841
|
+
"launch_timeout_mismatch": "the deadline about to be armed differs from launch.stop: another timeout_seconds under terminate_process_group, any deadline under not_armed, a deadline that does not start at the first launch-chain process, or one restarted at a helper.",
|
|
842
|
+
"launch_input_unbound": "the harness would give the launch an input the launch block does not bind, or one the digest forms cannot represent: any stdin other than the bound mode (a terminal, a delayed or repeated write, bytes under devnull), a grant claiming an interactive terminal; a value taken from caller_context; an argument that is not a string, contains NUL or is not valid Unicode; an environment name or value that is not a valid string, a variable the policy does not classify, or a secret value or secret-derived digest found anywhere in committed material, the envelope and its caller_context included; a source tree that cannot be captured (unsupported entry, duplicate or ungrammatical path, missing mode, a non-directory ancestor of a listed path); a declared root, descriptor or source that cannot be resolved or escapes its root; a discovered working-directory file that is not a bound reference; a spawn environment or working directory not required by the declared transformations; or a qualification probe that mutated captured material or was itself the worker.",
|
|
843
|
+
"caller_context_interpreted": "an echoed caller_context differs from the envelope's caller_context.",
|
|
844
|
+
"refusal_zero_invocations": "every admission refusal above is recorded with zero launch-chain processes started and zero worker invocations, as state refused with worker_invocations 0 and refusal.reason equal to the first diagnostic of the first reporting stage of x-evaluation-order, in the listed order. Qualification probes are not counted (x-route-qualification.probes); a worker is never relabelled a probe."
|
|
845
|
+
},
|
|
846
|
+
"x-locator-grammar": {
|
|
847
|
+
"relative_path": "One or more '/'-separated segments. Every segment is non-empty and is neither '.' nor '..'. No ':' (no drive or scheme spelling), no backslash, no NUL or other control character, no leading or trailing '/', no repeated '/'. Invalid input is refused, never normalized.",
|
|
848
|
+
"cwd_path": "A cwd path is either exactly '.' (the root) or a relative_path.",
|
|
849
|
+
"applies_to": "workspace.repo_relative_locators, every workspace and declared_root source path, repo_relative executable_chain locators, both locators of each target_map entry, cwd paths, and source-tree capture paths.",
|
|
850
|
+
"identifiers": "Declared roots, descriptors, view roots, transports, policies and credential sources use the identifier grammar of $defs.identifier.",
|
|
851
|
+
"resolution": "A grammatical locator that resolves, through a symlink or otherwise, outside its root is refused at launch with launch_input_unbound."
|
|
852
|
+
},
|
|
853
|
+
"x-environment-commitment": {
|
|
854
|
+
"object": "The redacted environment object is {\"non_secret\": {name: value, ...}, \"secret_names\": [name, ...]}, closed. non_secret holds every non-secret variable of the effective worker environment; secret_names lists, sorted by UTF-16 code units and without duplicates, the secret variables actually present. The two have no name in common, and their union is exactly the effective environment.",
|
|
855
|
+
"classification": "The bound environment policy classifies every variable explicitly and in trust: non_secret, or secret with the identifier of its credential source. It is not a heuristic name scan. A present variable the policy does not classify fails closed: launch_input_unbound.",
|
|
856
|
+
"authorization": "Each secret variable present must come from a credential source the single matching qualification record authorizes; otherwise grant_unqualified. Its presence, delivery destination (the variable name) and authorization are bound; its value is not, and neither is any digest of it.",
|
|
857
|
+
"no_secret_values_anywhere": "No secret value, and no digest derived from one, may enter any commitment: not the envelope itself (every decoded member name and value, caller_context included, nested values and arrays included), not argv, references, instructions, policy, template, configuration or grant documents, nor a non-secret value. A known classified secret value or a value derived from it found there makes the launch unbindable: launch_input_unbound. caller_context is scanned as generic content, without assigning meanings to its fields, and is never redacted, dropped or rewritten to pass; if trusted policy cannot establish that the opaque payload is suitable for public commitment, the launch is refused. Matching known secrets is a regression mechanism, not a proof that arbitrary encodings or derivations are detectable: the trusted classification obligation still covers every derived form, not only one SHA-256 spelling. A value that contains a credential, such as a URL with a token, is secret as a whole; any non-secret routing part that determines the launch is bound separately (a non-secret variable or the egress grant).",
|
|
858
|
+
"values": "Names are non-empty and contain neither '=' nor NUL; names and values are strings of valid Unicode without NUL. Anything else is unbindable: launch_input_unbound. Hashing a JSON number does not make it an environment value.",
|
|
859
|
+
"unrepresentable": "If a route needs a particular secret value identity to be bound, that route is not representable in v2 and is refused. Credentials may also be delivered by descriptor, bound by the descriptor_capabilities grant.",
|
|
860
|
+
"confidentiality": "map_sha256 is an unsalted, unkeyed SHA-256 of deterministic, guessable non-secret content. It is a commitment, not confidentiality protection: anyone who can guess the non-secret values can confirm them. No salt or key is added."
|
|
861
|
+
},
|
|
862
|
+
"x-grant-coverage": "A qualification record covers a grant only by the same canonical_form and sha256 as the exact effective grant of this run. A record for a template or profile with placeholders does not cover a concrete per-run expansion; per-run evidence (for example a per-run attestation the validator holds) may. Coverage never comes from merging several records: exactly one record matches the route key (x-route-qualification), and only it is consulted.",
|
|
863
|
+
"x-apply-outcomes": {
|
|
864
|
+
"$comment": "Work outcomes of the write_scope apply check, outside supervised_run_status. Checked in this order; the first that applies is the outcome, and no protected byte changes.",
|
|
865
|
+
"proposal_digest_mismatch": "the returned proposal bytes do not have the digest recorded for the attempt.",
|
|
866
|
+
"proposal_unattributable": "an entry of the proposal cannot be attributed to a path and operation.",
|
|
867
|
+
"proposal_entry_unsupported": "an entry adds or changes a symlink, a submodule entry or a file mode.",
|
|
868
|
+
"proposal_out_of_scope": "a touched path, on either side of a rename or copy, has no target_map entry or maps outside workspace.repo_relative_locators.",
|
|
869
|
+
"proposal_stale": "an entry's base does not match the protected state bound at launch.",
|
|
870
|
+
"proposal_applied": "every check passed and the whole proposal was applied atomically."
|
|
871
|
+
},
|
|
872
|
+
"x-process-boundary": {
|
|
873
|
+
"launch_chain": "The launch chain is the processes started for this launch: the outermost executable_chain entry and every helper or wrapper it starts, down to the worker, the last entry.",
|
|
874
|
+
"argv": "launch.argv binds the argument vector passed to the operating system to start the outermost entry.",
|
|
875
|
+
"environment_and_cwd": "launch.environment and launch.workspace_state.cwd bind the effective worker environment and working directory, after every declared transformation.",
|
|
876
|
+
"transformations": "Every helper's argument consumption, environment additions and removals, and working-directory change are declared in the trusted template bound by template_sha256, in executable_chain order; supervisor and view grants bind the rest. The spawn environment and working directory are exactly what the declared transformations need: nothing ambient. The effective worker argv, environment and cwd are the verified result of applying those transformations; if that result cannot be derived and checked, the route is unbound.",
|
|
877
|
+
"deadline": "Under terminate_process_group the deadline starts when the first process of the launch chain starts, and the same monotonic expiry carries through every helper to the worker; it is never restarted.",
|
|
878
|
+
"zero_launch": "Every admission refusal happens with zero launch-chain processes started and zero worker invocations. A failure after the chain has started (for example a helper transformation failing before the worker) prevents the worker from starting and ends the already-started chain on the runtime lifecycle (running -> finished, termination failed_to_start), never as a refusal."
|
|
879
|
+
}
|
|
880
|
+
}
|