@agent-custody/receipts 0.14.0 → 0.15.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 (48) hide show
  1. package/README.md +33 -20
  2. package/dist/check.d.ts +10 -0
  3. package/dist/check.js +179 -3
  4. package/dist/cli.js +82 -11
  5. package/dist/config.d.ts +128 -1
  6. package/dist/config.js +92 -3
  7. package/dist/console.js +16 -7
  8. package/dist/deny-report.js +1 -1
  9. package/dist/door.d.ts +203 -0
  10. package/dist/door.js +712 -0
  11. package/dist/export.d.ts +39 -0
  12. package/dist/export.js +95 -0
  13. package/dist/gateway.js +53 -21
  14. package/dist/index.d.ts +6 -0
  15. package/dist/index.js +5 -0
  16. package/dist/issue.js +5 -65
  17. package/dist/lock.d.ts +12 -0
  18. package/dist/lock.js +124 -0
  19. package/dist/log.d.ts +11 -5
  20. package/dist/log.js +55 -42
  21. package/dist/opa-server.d.ts +34 -0
  22. package/dist/opa-server.js +93 -0
  23. package/dist/policy-rego.d.ts +30 -0
  24. package/dist/policy-rego.js +114 -0
  25. package/dist/pr-summary.d.ts +25 -0
  26. package/dist/pr-summary.js +87 -0
  27. package/dist/receipt.d.ts +3 -1
  28. package/dist/retention.d.ts +1 -1
  29. package/dist/retention.js +14 -4
  30. package/dist/sdk/index.js +10 -3
  31. package/dist/simulate.d.ts +3 -1
  32. package/dist/simulate.js +15 -7
  33. package/dist/verify.js +6 -3
  34. package/docs/configuration.md +3 -3
  35. package/docs/door-signals.md +66 -0
  36. package/docs/door.md +168 -0
  37. package/docs/github-action.md +164 -0
  38. package/docs/policies.md +112 -1
  39. package/docs/sdk.md +25 -9
  40. package/docs/tutorials.md +3 -0
  41. package/docs/usage.md +2 -2
  42. package/docs/verification.md +9 -2
  43. package/package.json +14 -13
  44. package/templates/claude-code.cedar +287 -10
  45. package/vectors/audit.json +27 -27
  46. package/vectors/canonical.json +5 -5
  47. package/vectors/merkle.json +123 -0
  48. package/vectors/receipts.json +1258 -1005
@@ -3,24 +3,81 @@
3
3
  // A pattern matches the text of the command. It is not a sandbox: it catches the plain form of each command.
4
4
  // Each rule has a `@reason`. The hook shows it to the agent and to the person who reads the session.
5
5
  // The `like` operator is case-sensitive, and `*` is its only wildcard, so each SQL keyword has a rule for each case.
6
+ // A rule id is the place of the rule in this file (policy1, policy2, and so on). Change a rule in place. Add a new rule
7
+ // at the end, so that an id keeps naming the same rule.
6
8
  permit(principal, action, resource);
7
9
 
8
10
  // Rewriting shared history.
9
11
  // `--force-with-lease` is a force push that fails when the remote has new commits. The policy allows it.
10
- // A `--force` flag matches anywhere after `git push`. A `-f` flag matches right after `git push` or at the end of the
11
- // command. A `-f` in the middle of a command is not matched, because `git push origin main && rm -f x` must pass.
12
+ // A force push has `--force`, `-f`, or a refspec that starts with `+`, such as `git push origin +main`. The push can
13
+ // be `git push` or `git -C <dir> push`.
14
+ // `like` cannot find where one shell command ends. So a flag counts in three cases: it is the first argument of the
15
+ // push, or no `&`, `|`, `;`, or newline follows the push, or one of them follows the flag. In
16
+ // `git push origin main && npm install --force` the flag comes after the operator, and the command passes. A chain with
17
+ // two operators after the push can be denied by mistake: `git push && npm install --force && echo done`.
18
+
12
19
  @reason("force push rewrites shared history (git push --force-with-lease is allowed)")
13
20
  forbid(principal, action == Action::"Bash", resource)
14
21
  when {
15
22
  context.args has command && (
16
- context.args.command like "*git push*--force *"
17
- || context.args.command like "*git push*--force"
23
+ context.args.command like "*git push --force *"
24
+ || context.args.command like "*git push --force"
18
25
  || context.args.command like "*git push -f*"
19
- || context.args.command like "*git push* -f"
26
+ || context.args.command like "*git push +*"
27
+ || context.args.command like "*git -* push --force *"
28
+ || context.args.command like "*git -* push --force"
29
+ || context.args.command like "*git -* push -f*"
30
+ || context.args.command like "*git -* push +*"
31
+ || (!(context.args.command like "*git push*&*" || context.args.command like "*git push*|*" || context.args.command like "*git push*;*" || context.args.command like "*git push*\n*") && (
32
+ context.args.command like "*git push* --force *"
33
+ || context.args.command like "*git push* --force"
34
+ || context.args.command like "*git push* -f*"
35
+ || context.args.command like "*git push* +*"
36
+ ))
37
+ || (!(context.args.command like "*git -* push*&*" || context.args.command like "*git -* push*|*" || context.args.command like "*git -* push*;*" || context.args.command like "*git -* push*\n*") && (
38
+ context.args.command like "*git -* push* --force *"
39
+ || context.args.command like "*git -* push* --force"
40
+ || context.args.command like "*git -* push* -f*"
41
+ || context.args.command like "*git -* push* +*"
42
+ ))
43
+ || context.args.command like "*git push* --force *&*"
44
+ || context.args.command like "*git push* --force&*"
45
+ || context.args.command like "*git push* -f*&*"
46
+ || context.args.command like "*git push* +*&*"
47
+ || context.args.command like "*git push* --force *|*"
48
+ || context.args.command like "*git push* --force|*"
49
+ || context.args.command like "*git push* -f*|*"
50
+ || context.args.command like "*git push* +*|*"
51
+ || context.args.command like "*git push* --force *;*"
52
+ || context.args.command like "*git push* --force;*"
53
+ || context.args.command like "*git push* -f*;*"
54
+ || context.args.command like "*git push* +*;*"
55
+ || context.args.command like "*git push* --force *\n*"
56
+ || context.args.command like "*git push* --force\n*"
57
+ || context.args.command like "*git push* -f*\n*"
58
+ || context.args.command like "*git push* +*\n*"
59
+ || context.args.command like "*git -* push* --force *&*"
60
+ || context.args.command like "*git -* push* --force&*"
61
+ || context.args.command like "*git -* push* -f*&*"
62
+ || context.args.command like "*git -* push* +*&*"
63
+ || context.args.command like "*git -* push* --force *|*"
64
+ || context.args.command like "*git -* push* --force|*"
65
+ || context.args.command like "*git -* push* -f*|*"
66
+ || context.args.command like "*git -* push* +*|*"
67
+ || context.args.command like "*git -* push* --force *;*"
68
+ || context.args.command like "*git -* push* --force;*"
69
+ || context.args.command like "*git -* push* -f*;*"
70
+ || context.args.command like "*git -* push* +*;*"
71
+ || context.args.command like "*git -* push* --force *\n*"
72
+ || context.args.command like "*git -* push* --force\n*"
73
+ || context.args.command like "*git -* push* -f*\n*"
74
+ || context.args.command like "*git -* push* +*\n*"
20
75
  )
21
76
  };
22
77
 
23
78
  // Deleting the root directory or the home directory.
79
+ // The flags are -rf, -fr, -Rf, -fR, and the separate forms -r -f, -f -r, -R -f, -f -R. The target is the directory, the
80
+ // directory with more arguments after it, or all its files (`/*`). The home directory may be quoted: `"$HOME"`.
24
81
  @reason("rm -rf on the root directory")
25
82
  forbid(principal, action == Action::"Bash", resource)
26
83
  when {
@@ -31,6 +88,24 @@ when {
31
88
  || context.args.command like "*rm -fr /"
32
89
  || context.args.command like "*rm -fr / *"
33
90
  || context.args.command like "*rm -fr /\*"
91
+ || context.args.command like "*rm -Rf /"
92
+ || context.args.command like "*rm -Rf / *"
93
+ || context.args.command like "*rm -Rf /\*"
94
+ || context.args.command like "*rm -fR /"
95
+ || context.args.command like "*rm -fR / *"
96
+ || context.args.command like "*rm -fR /\*"
97
+ || context.args.command like "*rm -r -f /"
98
+ || context.args.command like "*rm -r -f / *"
99
+ || context.args.command like "*rm -r -f /\*"
100
+ || context.args.command like "*rm -f -r /"
101
+ || context.args.command like "*rm -f -r / *"
102
+ || context.args.command like "*rm -f -r /\*"
103
+ || context.args.command like "*rm -R -f /"
104
+ || context.args.command like "*rm -R -f / *"
105
+ || context.args.command like "*rm -R -f /\*"
106
+ || context.args.command like "*rm -f -R /"
107
+ || context.args.command like "*rm -f -R / *"
108
+ || context.args.command like "*rm -f -R /\*"
34
109
  )
35
110
  };
36
111
 
@@ -48,6 +123,36 @@ when {
48
123
  || context.args.command like "*rm -fr ~/"
49
124
  || context.args.command like "*rm -fr ~/ *"
50
125
  || context.args.command like "*rm -fr ~/\*"
126
+ || context.args.command like "*rm -Rf ~"
127
+ || context.args.command like "*rm -Rf ~ *"
128
+ || context.args.command like "*rm -Rf ~/"
129
+ || context.args.command like "*rm -Rf ~/ *"
130
+ || context.args.command like "*rm -Rf ~/\*"
131
+ || context.args.command like "*rm -fR ~"
132
+ || context.args.command like "*rm -fR ~ *"
133
+ || context.args.command like "*rm -fR ~/"
134
+ || context.args.command like "*rm -fR ~/ *"
135
+ || context.args.command like "*rm -fR ~/\*"
136
+ || context.args.command like "*rm -r -f ~"
137
+ || context.args.command like "*rm -r -f ~ *"
138
+ || context.args.command like "*rm -r -f ~/"
139
+ || context.args.command like "*rm -r -f ~/ *"
140
+ || context.args.command like "*rm -r -f ~/\*"
141
+ || context.args.command like "*rm -f -r ~"
142
+ || context.args.command like "*rm -f -r ~ *"
143
+ || context.args.command like "*rm -f -r ~/"
144
+ || context.args.command like "*rm -f -r ~/ *"
145
+ || context.args.command like "*rm -f -r ~/\*"
146
+ || context.args.command like "*rm -R -f ~"
147
+ || context.args.command like "*rm -R -f ~ *"
148
+ || context.args.command like "*rm -R -f ~/"
149
+ || context.args.command like "*rm -R -f ~/ *"
150
+ || context.args.command like "*rm -R -f ~/\*"
151
+ || context.args.command like "*rm -f -R ~"
152
+ || context.args.command like "*rm -f -R ~ *"
153
+ || context.args.command like "*rm -f -R ~/"
154
+ || context.args.command like "*rm -f -R ~/ *"
155
+ || context.args.command like "*rm -f -R ~/\*"
51
156
  )
52
157
  };
53
158
 
@@ -60,21 +165,193 @@ when {
60
165
  || context.args.command like "*rm -rf $HOME/"
61
166
  || context.args.command like "*rm -rf $HOME/ *"
62
167
  || context.args.command like "*rm -rf $HOME/\*"
63
- || context.args.command like "*rm -fr $HOME"
64
- || context.args.command like "*rm -fr $HOME *"
65
- || context.args.command like "*rm -fr $HOME/"
66
- || context.args.command like "*rm -fr $HOME/ *"
67
- || context.args.command like "*rm -fr $HOME/\*"
68
168
  || context.args.command like "*rm -rf ${HOME}"
69
169
  || context.args.command like "*rm -rf ${HOME} *"
70
170
  || context.args.command like "*rm -rf ${HOME}/"
71
171
  || context.args.command like "*rm -rf ${HOME}/ *"
72
172
  || context.args.command like "*rm -rf ${HOME}/\*"
173
+ || context.args.command like "*rm -rf \"$HOME\""
174
+ || context.args.command like "*rm -rf \"$HOME\" *"
175
+ || context.args.command like "*rm -rf \"$HOME\"/"
176
+ || context.args.command like "*rm -rf \"$HOME\"/ *"
177
+ || context.args.command like "*rm -rf \"$HOME\"/\*"
178
+ || context.args.command like "*rm -rf \"${HOME}\""
179
+ || context.args.command like "*rm -rf \"${HOME}\" *"
180
+ || context.args.command like "*rm -rf \"${HOME}\"/"
181
+ || context.args.command like "*rm -rf \"${HOME}\"/ *"
182
+ || context.args.command like "*rm -rf \"${HOME}\"/\*"
183
+ || context.args.command like "*rm -rf \"$HOME/\""
184
+ || context.args.command like "*rm -rf \"$HOME/\" *"
185
+ || context.args.command like "*rm -rf \"${HOME}/\""
186
+ || context.args.command like "*rm -rf \"${HOME}/\" *"
187
+ || context.args.command like "*rm -fr $HOME"
188
+ || context.args.command like "*rm -fr $HOME *"
189
+ || context.args.command like "*rm -fr $HOME/"
190
+ || context.args.command like "*rm -fr $HOME/ *"
191
+ || context.args.command like "*rm -fr $HOME/\*"
73
192
  || context.args.command like "*rm -fr ${HOME}"
74
193
  || context.args.command like "*rm -fr ${HOME} *"
75
194
  || context.args.command like "*rm -fr ${HOME}/"
76
195
  || context.args.command like "*rm -fr ${HOME}/ *"
77
196
  || context.args.command like "*rm -fr ${HOME}/\*"
197
+ || context.args.command like "*rm -fr \"$HOME\""
198
+ || context.args.command like "*rm -fr \"$HOME\" *"
199
+ || context.args.command like "*rm -fr \"$HOME\"/"
200
+ || context.args.command like "*rm -fr \"$HOME\"/ *"
201
+ || context.args.command like "*rm -fr \"$HOME\"/\*"
202
+ || context.args.command like "*rm -fr \"${HOME}\""
203
+ || context.args.command like "*rm -fr \"${HOME}\" *"
204
+ || context.args.command like "*rm -fr \"${HOME}\"/"
205
+ || context.args.command like "*rm -fr \"${HOME}\"/ *"
206
+ || context.args.command like "*rm -fr \"${HOME}\"/\*"
207
+ || context.args.command like "*rm -fr \"$HOME/\""
208
+ || context.args.command like "*rm -fr \"$HOME/\" *"
209
+ || context.args.command like "*rm -fr \"${HOME}/\""
210
+ || context.args.command like "*rm -fr \"${HOME}/\" *"
211
+ || context.args.command like "*rm -Rf $HOME"
212
+ || context.args.command like "*rm -Rf $HOME *"
213
+ || context.args.command like "*rm -Rf $HOME/"
214
+ || context.args.command like "*rm -Rf $HOME/ *"
215
+ || context.args.command like "*rm -Rf $HOME/\*"
216
+ || context.args.command like "*rm -Rf ${HOME}"
217
+ || context.args.command like "*rm -Rf ${HOME} *"
218
+ || context.args.command like "*rm -Rf ${HOME}/"
219
+ || context.args.command like "*rm -Rf ${HOME}/ *"
220
+ || context.args.command like "*rm -Rf ${HOME}/\*"
221
+ || context.args.command like "*rm -Rf \"$HOME\""
222
+ || context.args.command like "*rm -Rf \"$HOME\" *"
223
+ || context.args.command like "*rm -Rf \"$HOME\"/"
224
+ || context.args.command like "*rm -Rf \"$HOME\"/ *"
225
+ || context.args.command like "*rm -Rf \"$HOME\"/\*"
226
+ || context.args.command like "*rm -Rf \"${HOME}\""
227
+ || context.args.command like "*rm -Rf \"${HOME}\" *"
228
+ || context.args.command like "*rm -Rf \"${HOME}\"/"
229
+ || context.args.command like "*rm -Rf \"${HOME}\"/ *"
230
+ || context.args.command like "*rm -Rf \"${HOME}\"/\*"
231
+ || context.args.command like "*rm -Rf \"$HOME/\""
232
+ || context.args.command like "*rm -Rf \"$HOME/\" *"
233
+ || context.args.command like "*rm -Rf \"${HOME}/\""
234
+ || context.args.command like "*rm -Rf \"${HOME}/\" *"
235
+ || context.args.command like "*rm -fR $HOME"
236
+ || context.args.command like "*rm -fR $HOME *"
237
+ || context.args.command like "*rm -fR $HOME/"
238
+ || context.args.command like "*rm -fR $HOME/ *"
239
+ || context.args.command like "*rm -fR $HOME/\*"
240
+ || context.args.command like "*rm -fR ${HOME}"
241
+ || context.args.command like "*rm -fR ${HOME} *"
242
+ || context.args.command like "*rm -fR ${HOME}/"
243
+ || context.args.command like "*rm -fR ${HOME}/ *"
244
+ || context.args.command like "*rm -fR ${HOME}/\*"
245
+ || context.args.command like "*rm -fR \"$HOME\""
246
+ || context.args.command like "*rm -fR \"$HOME\" *"
247
+ || context.args.command like "*rm -fR \"$HOME\"/"
248
+ || context.args.command like "*rm -fR \"$HOME\"/ *"
249
+ || context.args.command like "*rm -fR \"$HOME\"/\*"
250
+ || context.args.command like "*rm -fR \"${HOME}\""
251
+ || context.args.command like "*rm -fR \"${HOME}\" *"
252
+ || context.args.command like "*rm -fR \"${HOME}\"/"
253
+ || context.args.command like "*rm -fR \"${HOME}\"/ *"
254
+ || context.args.command like "*rm -fR \"${HOME}\"/\*"
255
+ || context.args.command like "*rm -fR \"$HOME/\""
256
+ || context.args.command like "*rm -fR \"$HOME/\" *"
257
+ || context.args.command like "*rm -fR \"${HOME}/\""
258
+ || context.args.command like "*rm -fR \"${HOME}/\" *"
259
+ || context.args.command like "*rm -r -f $HOME"
260
+ || context.args.command like "*rm -r -f $HOME *"
261
+ || context.args.command like "*rm -r -f $HOME/"
262
+ || context.args.command like "*rm -r -f $HOME/ *"
263
+ || context.args.command like "*rm -r -f $HOME/\*"
264
+ || context.args.command like "*rm -r -f ${HOME}"
265
+ || context.args.command like "*rm -r -f ${HOME} *"
266
+ || context.args.command like "*rm -r -f ${HOME}/"
267
+ || context.args.command like "*rm -r -f ${HOME}/ *"
268
+ || context.args.command like "*rm -r -f ${HOME}/\*"
269
+ || context.args.command like "*rm -r -f \"$HOME\""
270
+ || context.args.command like "*rm -r -f \"$HOME\" *"
271
+ || context.args.command like "*rm -r -f \"$HOME\"/"
272
+ || context.args.command like "*rm -r -f \"$HOME\"/ *"
273
+ || context.args.command like "*rm -r -f \"$HOME\"/\*"
274
+ || context.args.command like "*rm -r -f \"${HOME}\""
275
+ || context.args.command like "*rm -r -f \"${HOME}\" *"
276
+ || context.args.command like "*rm -r -f \"${HOME}\"/"
277
+ || context.args.command like "*rm -r -f \"${HOME}\"/ *"
278
+ || context.args.command like "*rm -r -f \"${HOME}\"/\*"
279
+ || context.args.command like "*rm -r -f \"$HOME/\""
280
+ || context.args.command like "*rm -r -f \"$HOME/\" *"
281
+ || context.args.command like "*rm -r -f \"${HOME}/\""
282
+ || context.args.command like "*rm -r -f \"${HOME}/\" *"
283
+ || context.args.command like "*rm -f -r $HOME"
284
+ || context.args.command like "*rm -f -r $HOME *"
285
+ || context.args.command like "*rm -f -r $HOME/"
286
+ || context.args.command like "*rm -f -r $HOME/ *"
287
+ || context.args.command like "*rm -f -r $HOME/\*"
288
+ || context.args.command like "*rm -f -r ${HOME}"
289
+ || context.args.command like "*rm -f -r ${HOME} *"
290
+ || context.args.command like "*rm -f -r ${HOME}/"
291
+ || context.args.command like "*rm -f -r ${HOME}/ *"
292
+ || context.args.command like "*rm -f -r ${HOME}/\*"
293
+ || context.args.command like "*rm -f -r \"$HOME\""
294
+ || context.args.command like "*rm -f -r \"$HOME\" *"
295
+ || context.args.command like "*rm -f -r \"$HOME\"/"
296
+ || context.args.command like "*rm -f -r \"$HOME\"/ *"
297
+ || context.args.command like "*rm -f -r \"$HOME\"/\*"
298
+ || context.args.command like "*rm -f -r \"${HOME}\""
299
+ || context.args.command like "*rm -f -r \"${HOME}\" *"
300
+ || context.args.command like "*rm -f -r \"${HOME}\"/"
301
+ || context.args.command like "*rm -f -r \"${HOME}\"/ *"
302
+ || context.args.command like "*rm -f -r \"${HOME}\"/\*"
303
+ || context.args.command like "*rm -f -r \"$HOME/\""
304
+ || context.args.command like "*rm -f -r \"$HOME/\" *"
305
+ || context.args.command like "*rm -f -r \"${HOME}/\""
306
+ || context.args.command like "*rm -f -r \"${HOME}/\" *"
307
+ || context.args.command like "*rm -R -f $HOME"
308
+ || context.args.command like "*rm -R -f $HOME *"
309
+ || context.args.command like "*rm -R -f $HOME/"
310
+ || context.args.command like "*rm -R -f $HOME/ *"
311
+ || context.args.command like "*rm -R -f $HOME/\*"
312
+ || context.args.command like "*rm -R -f ${HOME}"
313
+ || context.args.command like "*rm -R -f ${HOME} *"
314
+ || context.args.command like "*rm -R -f ${HOME}/"
315
+ || context.args.command like "*rm -R -f ${HOME}/ *"
316
+ || context.args.command like "*rm -R -f ${HOME}/\*"
317
+ || context.args.command like "*rm -R -f \"$HOME\""
318
+ || context.args.command like "*rm -R -f \"$HOME\" *"
319
+ || context.args.command like "*rm -R -f \"$HOME\"/"
320
+ || context.args.command like "*rm -R -f \"$HOME\"/ *"
321
+ || context.args.command like "*rm -R -f \"$HOME\"/\*"
322
+ || context.args.command like "*rm -R -f \"${HOME}\""
323
+ || context.args.command like "*rm -R -f \"${HOME}\" *"
324
+ || context.args.command like "*rm -R -f \"${HOME}\"/"
325
+ || context.args.command like "*rm -R -f \"${HOME}\"/ *"
326
+ || context.args.command like "*rm -R -f \"${HOME}\"/\*"
327
+ || context.args.command like "*rm -R -f \"$HOME/\""
328
+ || context.args.command like "*rm -R -f \"$HOME/\" *"
329
+ || context.args.command like "*rm -R -f \"${HOME}/\""
330
+ || context.args.command like "*rm -R -f \"${HOME}/\" *"
331
+ || context.args.command like "*rm -f -R $HOME"
332
+ || context.args.command like "*rm -f -R $HOME *"
333
+ || context.args.command like "*rm -f -R $HOME/"
334
+ || context.args.command like "*rm -f -R $HOME/ *"
335
+ || context.args.command like "*rm -f -R $HOME/\*"
336
+ || context.args.command like "*rm -f -R ${HOME}"
337
+ || context.args.command like "*rm -f -R ${HOME} *"
338
+ || context.args.command like "*rm -f -R ${HOME}/"
339
+ || context.args.command like "*rm -f -R ${HOME}/ *"
340
+ || context.args.command like "*rm -f -R ${HOME}/\*"
341
+ || context.args.command like "*rm -f -R \"$HOME\""
342
+ || context.args.command like "*rm -f -R \"$HOME\" *"
343
+ || context.args.command like "*rm -f -R \"$HOME\"/"
344
+ || context.args.command like "*rm -f -R \"$HOME\"/ *"
345
+ || context.args.command like "*rm -f -R \"$HOME\"/\*"
346
+ || context.args.command like "*rm -f -R \"${HOME}\""
347
+ || context.args.command like "*rm -f -R \"${HOME}\" *"
348
+ || context.args.command like "*rm -f -R \"${HOME}\"/"
349
+ || context.args.command like "*rm -f -R \"${HOME}\"/ *"
350
+ || context.args.command like "*rm -f -R \"${HOME}\"/\*"
351
+ || context.args.command like "*rm -f -R \"$HOME/\""
352
+ || context.args.command like "*rm -f -R \"$HOME/\" *"
353
+ || context.args.command like "*rm -f -R \"${HOME}/\""
354
+ || context.args.command like "*rm -f -R \"${HOME}/\" *"
78
355
  )
79
356
  };
80
357
 
@@ -7,26 +7,26 @@
7
7
  "description": "The tree head from the first remote receipt and the log's later head, with the proof the log served.",
8
8
  "older": {
9
9
  "payloadType": "application/vnd.agent-custody.treehead+json",
10
- "payload": "eyJsb2ciOiJ2ZWN0b3JzLWxvZyIsInJvb3RIYXNoIjoiNTJhOWM4YThkZGIzN2M1NTE5NjUzOTNkYjc0OTQ0MzJkYTNkNDI4M2IzMDBmZmVmZTVjMDRhZjdhZDA5ODllZCIsInRpbWVzdGFtcCI6IjIwMjYtMTAtMjRUMjE6NDM6MTYuNjU1WiIsInRyZWVTaXplIjoxfQ==",
10
+ "payload": "eyJsb2ciOiJ2ZWN0b3JzLWxvZyIsInJvb3RIYXNoIjoiMjk5YTk4YjA3NTFkNzdiN2UyNzgxZGU2MzMwMzhkYWZmYjYxYmEwM2FhZWJhZjZiMDE3ZGI3OTE5ZTk4ZDliNCIsInRpbWVzdGFtcCI6IjIwMjYtMTEtMDFUMTA6MTA6MDMuMzQzWiIsInRyZWVTaXplIjoxfQ==",
11
11
  "signatures": [
12
12
  {
13
- "keyid": "7218437659a7b9b522de300ad9b9e6a8d0f0cb0aef7dc1237a040efb405ce00d",
14
- "sig": "p157640WqSaZVAlE7YwWiwFiW/HcI8HRXjV7ejMtCKr63+18OMiOQtYuJeelZjNCRV347Jnx+yvCsecN6yKnDA=="
13
+ "keyid": "c4de6d4c1616938f8c8c679ebed89781d2fa1565d536032d9054f6c73461df57",
14
+ "sig": "jPpTYFCQs7cl08hkhs/5J6oMD3BPqbuO97znCbfjBKquXlpmtC+HEb/dhmC0BeJdsi3v3UiMyFJvZT2ffzrfBA=="
15
15
  }
16
16
  ]
17
17
  },
18
18
  "newer": {
19
19
  "payloadType": "application/vnd.agent-custody.treehead+json",
20
- "payload": "eyJsb2ciOiJ2ZWN0b3JzLWxvZyIsInJvb3RIYXNoIjoiZmFmNWFjNzFlOTM5ZDE1ODA2MjgxNmVmNGUxZGFjY2E0YjA4OTBhZjliZjQ4NjliNGE1YmRkNmE1MWIwOWQ4ZiIsInRpbWVzdGFtcCI6IjIwMjYtMTAtMjRUMjE6NDM6MTYuNjYxWiIsInRyZWVTaXplIjoyfQ==",
20
+ "payload": "eyJsb2ciOiJ2ZWN0b3JzLWxvZyIsInJvb3RIYXNoIjoiN2E3MWJlOTczY2JkODY5N2M3OGQxMDk0MDQ0MzA0YzNhYzMyZTZkNmNlNGNlNmEwNzI5ZjZjOGE5MTYxZDIzZCIsInRpbWVzdGFtcCI6IjIwMjYtMTEtMDFUMTA6MTA6MDMuMzQ4WiIsInRyZWVTaXplIjoyfQ==",
21
21
  "signatures": [
22
22
  {
23
- "keyid": "7218437659a7b9b522de300ad9b9e6a8d0f0cb0aef7dc1237a040efb405ce00d",
24
- "sig": "N0MdqFI31VxcLPpPsewFqRI0h+UqMLiI2KNRFxkow2+GcAnEbj3cBegykfQ+PbfqIvolvEq5y3Zf9hJ2ONCKCw=="
23
+ "keyid": "c4de6d4c1616938f8c8c679ebed89781d2fa1565d536032d9054f6c73461df57",
24
+ "sig": "UbFM1MwVOvPUQsFzVAAxWBNkvIiJBKAey/q5ta5e6nR1Hfk1nGcFvjgqxUB02rPr7PZTZ9Q0eOMXPq1SnJbuCA=="
25
25
  }
26
26
  ]
27
27
  },
28
28
  "proof": [
29
- "02c80901df5441cc3211b76b815a783f35b8d8b6bf6c9f967333d316be6a6e5e"
29
+ "2b8ebb8443eaff76abdec18e26dbaf2aecf78dabf94b4c8a08acfe4f7ca541c5"
30
30
  ],
31
31
  "keys": [
32
32
  "log"
@@ -41,26 +41,26 @@
41
41
  "description": "The same heads the wrong way round.",
42
42
  "older": {
43
43
  "payloadType": "application/vnd.agent-custody.treehead+json",
44
- "payload": "eyJsb2ciOiJ2ZWN0b3JzLWxvZyIsInJvb3RIYXNoIjoiZmFmNWFjNzFlOTM5ZDE1ODA2MjgxNmVmNGUxZGFjY2E0YjA4OTBhZjliZjQ4NjliNGE1YmRkNmE1MWIwOWQ4ZiIsInRpbWVzdGFtcCI6IjIwMjYtMTAtMjRUMjE6NDM6MTYuNjYxWiIsInRyZWVTaXplIjoyfQ==",
44
+ "payload": "eyJsb2ciOiJ2ZWN0b3JzLWxvZyIsInJvb3RIYXNoIjoiN2E3MWJlOTczY2JkODY5N2M3OGQxMDk0MDQ0MzA0YzNhYzMyZTZkNmNlNGNlNmEwNzI5ZjZjOGE5MTYxZDIzZCIsInRpbWVzdGFtcCI6IjIwMjYtMTEtMDFUMTA6MTA6MDMuMzQ4WiIsInRyZWVTaXplIjoyfQ==",
45
45
  "signatures": [
46
46
  {
47
- "keyid": "7218437659a7b9b522de300ad9b9e6a8d0f0cb0aef7dc1237a040efb405ce00d",
48
- "sig": "N0MdqFI31VxcLPpPsewFqRI0h+UqMLiI2KNRFxkow2+GcAnEbj3cBegykfQ+PbfqIvolvEq5y3Zf9hJ2ONCKCw=="
47
+ "keyid": "c4de6d4c1616938f8c8c679ebed89781d2fa1565d536032d9054f6c73461df57",
48
+ "sig": "UbFM1MwVOvPUQsFzVAAxWBNkvIiJBKAey/q5ta5e6nR1Hfk1nGcFvjgqxUB02rPr7PZTZ9Q0eOMXPq1SnJbuCA=="
49
49
  }
50
50
  ]
51
51
  },
52
52
  "newer": {
53
53
  "payloadType": "application/vnd.agent-custody.treehead+json",
54
- "payload": "eyJsb2ciOiJ2ZWN0b3JzLWxvZyIsInJvb3RIYXNoIjoiNTJhOWM4YThkZGIzN2M1NTE5NjUzOTNkYjc0OTQ0MzJkYTNkNDI4M2IzMDBmZmVmZTVjMDRhZjdhZDA5ODllZCIsInRpbWVzdGFtcCI6IjIwMjYtMTAtMjRUMjE6NDM6MTYuNjU1WiIsInRyZWVTaXplIjoxfQ==",
54
+ "payload": "eyJsb2ciOiJ2ZWN0b3JzLWxvZyIsInJvb3RIYXNoIjoiMjk5YTk4YjA3NTFkNzdiN2UyNzgxZGU2MzMwMzhkYWZmYjYxYmEwM2FhZWJhZjZiMDE3ZGI3OTE5ZTk4ZDliNCIsInRpbWVzdGFtcCI6IjIwMjYtMTEtMDFUMTA6MTA6MDMuMzQzWiIsInRyZWVTaXplIjoxfQ==",
55
55
  "signatures": [
56
56
  {
57
- "keyid": "7218437659a7b9b522de300ad9b9e6a8d0f0cb0aef7dc1237a040efb405ce00d",
58
- "sig": "p157640WqSaZVAlE7YwWiwFiW/HcI8HRXjV7ejMtCKr63+18OMiOQtYuJeelZjNCRV347Jnx+yvCsecN6yKnDA=="
57
+ "keyid": "c4de6d4c1616938f8c8c679ebed89781d2fa1565d536032d9054f6c73461df57",
58
+ "sig": "jPpTYFCQs7cl08hkhs/5J6oMD3BPqbuO97znCbfjBKquXlpmtC+HEb/dhmC0BeJdsi3v3UiMyFJvZT2ffzrfBA=="
59
59
  }
60
60
  ]
61
61
  },
62
62
  "proof": [
63
- "02c80901df5441cc3211b76b815a783f35b8d8b6bf6c9f967333d316be6a6e5e"
63
+ "2b8ebb8443eaff76abdec18e26dbaf2aecf78dabf94b4c8a08acfe4f7ca541c5"
64
64
  ],
65
65
  "keys": [
66
66
  "log"
@@ -77,26 +77,26 @@
77
77
  "description": "Tree heads checked against the app key, which did not sign them.",
78
78
  "older": {
79
79
  "payloadType": "application/vnd.agent-custody.treehead+json",
80
- "payload": "eyJsb2ciOiJ2ZWN0b3JzLWxvZyIsInJvb3RIYXNoIjoiNTJhOWM4YThkZGIzN2M1NTE5NjUzOTNkYjc0OTQ0MzJkYTNkNDI4M2IzMDBmZmVmZTVjMDRhZjdhZDA5ODllZCIsInRpbWVzdGFtcCI6IjIwMjYtMTAtMjRUMjE6NDM6MTYuNjU1WiIsInRyZWVTaXplIjoxfQ==",
80
+ "payload": "eyJsb2ciOiJ2ZWN0b3JzLWxvZyIsInJvb3RIYXNoIjoiMjk5YTk4YjA3NTFkNzdiN2UyNzgxZGU2MzMwMzhkYWZmYjYxYmEwM2FhZWJhZjZiMDE3ZGI3OTE5ZTk4ZDliNCIsInRpbWVzdGFtcCI6IjIwMjYtMTEtMDFUMTA6MTA6MDMuMzQzWiIsInRyZWVTaXplIjoxfQ==",
81
81
  "signatures": [
82
82
  {
83
- "keyid": "7218437659a7b9b522de300ad9b9e6a8d0f0cb0aef7dc1237a040efb405ce00d",
84
- "sig": "p157640WqSaZVAlE7YwWiwFiW/HcI8HRXjV7ejMtCKr63+18OMiOQtYuJeelZjNCRV347Jnx+yvCsecN6yKnDA=="
83
+ "keyid": "c4de6d4c1616938f8c8c679ebed89781d2fa1565d536032d9054f6c73461df57",
84
+ "sig": "jPpTYFCQs7cl08hkhs/5J6oMD3BPqbuO97znCbfjBKquXlpmtC+HEb/dhmC0BeJdsi3v3UiMyFJvZT2ffzrfBA=="
85
85
  }
86
86
  ]
87
87
  },
88
88
  "newer": {
89
89
  "payloadType": "application/vnd.agent-custody.treehead+json",
90
- "payload": "eyJsb2ciOiJ2ZWN0b3JzLWxvZyIsInJvb3RIYXNoIjoiZmFmNWFjNzFlOTM5ZDE1ODA2MjgxNmVmNGUxZGFjY2E0YjA4OTBhZjliZjQ4NjliNGE1YmRkNmE1MWIwOWQ4ZiIsInRpbWVzdGFtcCI6IjIwMjYtMTAtMjRUMjE6NDM6MTYuNjYxWiIsInRyZWVTaXplIjoyfQ==",
90
+ "payload": "eyJsb2ciOiJ2ZWN0b3JzLWxvZyIsInJvb3RIYXNoIjoiN2E3MWJlOTczY2JkODY5N2M3OGQxMDk0MDQ0MzA0YzNhYzMyZTZkNmNlNGNlNmEwNzI5ZjZjOGE5MTYxZDIzZCIsInRpbWVzdGFtcCI6IjIwMjYtMTEtMDFUMTA6MTA6MDMuMzQ4WiIsInRyZWVTaXplIjoyfQ==",
91
91
  "signatures": [
92
92
  {
93
- "keyid": "7218437659a7b9b522de300ad9b9e6a8d0f0cb0aef7dc1237a040efb405ce00d",
94
- "sig": "N0MdqFI31VxcLPpPsewFqRI0h+UqMLiI2KNRFxkow2+GcAnEbj3cBegykfQ+PbfqIvolvEq5y3Zf9hJ2ONCKCw=="
93
+ "keyid": "c4de6d4c1616938f8c8c679ebed89781d2fa1565d536032d9054f6c73461df57",
94
+ "sig": "UbFM1MwVOvPUQsFzVAAxWBNkvIiJBKAey/q5ta5e6nR1Hfk1nGcFvjgqxUB02rPr7PZTZ9Q0eOMXPq1SnJbuCA=="
95
95
  }
96
96
  ]
97
97
  },
98
98
  "proof": [
99
- "02c80901df5441cc3211b76b815a783f35b8d8b6bf6c9f967333d316be6a6e5e"
99
+ "2b8ebb8443eaff76abdec18e26dbaf2aecf78dabf94b4c8a08acfe4f7ca541c5"
100
100
  ],
101
101
  "keys": [
102
102
  "app"
@@ -114,21 +114,21 @@
114
114
  "description": "A proof with a hash removed.",
115
115
  "older": {
116
116
  "payloadType": "application/vnd.agent-custody.treehead+json",
117
- "payload": "eyJsb2ciOiJ2ZWN0b3JzLWxvZyIsInJvb3RIYXNoIjoiNTJhOWM4YThkZGIzN2M1NTE5NjUzOTNkYjc0OTQ0MzJkYTNkNDI4M2IzMDBmZmVmZTVjMDRhZjdhZDA5ODllZCIsInRpbWVzdGFtcCI6IjIwMjYtMTAtMjRUMjE6NDM6MTYuNjU1WiIsInRyZWVTaXplIjoxfQ==",
117
+ "payload": "eyJsb2ciOiJ2ZWN0b3JzLWxvZyIsInJvb3RIYXNoIjoiMjk5YTk4YjA3NTFkNzdiN2UyNzgxZGU2MzMwMzhkYWZmYjYxYmEwM2FhZWJhZjZiMDE3ZGI3OTE5ZTk4ZDliNCIsInRpbWVzdGFtcCI6IjIwMjYtMTEtMDFUMTA6MTA6MDMuMzQzWiIsInRyZWVTaXplIjoxfQ==",
118
118
  "signatures": [
119
119
  {
120
- "keyid": "7218437659a7b9b522de300ad9b9e6a8d0f0cb0aef7dc1237a040efb405ce00d",
121
- "sig": "p157640WqSaZVAlE7YwWiwFiW/HcI8HRXjV7ejMtCKr63+18OMiOQtYuJeelZjNCRV347Jnx+yvCsecN6yKnDA=="
120
+ "keyid": "c4de6d4c1616938f8c8c679ebed89781d2fa1565d536032d9054f6c73461df57",
121
+ "sig": "jPpTYFCQs7cl08hkhs/5J6oMD3BPqbuO97znCbfjBKquXlpmtC+HEb/dhmC0BeJdsi3v3UiMyFJvZT2ffzrfBA=="
122
122
  }
123
123
  ]
124
124
  },
125
125
  "newer": {
126
126
  "payloadType": "application/vnd.agent-custody.treehead+json",
127
- "payload": "eyJsb2ciOiJ2ZWN0b3JzLWxvZyIsInJvb3RIYXNoIjoiZmFmNWFjNzFlOTM5ZDE1ODA2MjgxNmVmNGUxZGFjY2E0YjA4OTBhZjliZjQ4NjliNGE1YmRkNmE1MWIwOWQ4ZiIsInRpbWVzdGFtcCI6IjIwMjYtMTAtMjRUMjE6NDM6MTYuNjYxWiIsInRyZWVTaXplIjoyfQ==",
127
+ "payload": "eyJsb2ciOiJ2ZWN0b3JzLWxvZyIsInJvb3RIYXNoIjoiN2E3MWJlOTczY2JkODY5N2M3OGQxMDk0MDQ0MzA0YzNhYzMyZTZkNmNlNGNlNmEwNzI5ZjZjOGE5MTYxZDIzZCIsInRpbWVzdGFtcCI6IjIwMjYtMTEtMDFUMTA6MTA6MDMuMzQ4WiIsInRyZWVTaXplIjoyfQ==",
128
128
  "signatures": [
129
129
  {
130
- "keyid": "7218437659a7b9b522de300ad9b9e6a8d0f0cb0aef7dc1237a040efb405ce00d",
131
- "sig": "N0MdqFI31VxcLPpPsewFqRI0h+UqMLiI2KNRFxkow2+GcAnEbj3cBegykfQ+PbfqIvolvEq5y3Zf9hJ2ONCKCw=="
130
+ "keyid": "c4de6d4c1616938f8c8c679ebed89781d2fa1565d536032d9054f6c73461df57",
131
+ "sig": "UbFM1MwVOvPUQsFzVAAxWBNkvIiJBKAey/q5ta5e6nR1Hfk1nGcFvjgqxUB02rPr7PZTZ9Q0eOMXPq1SnJbuCA=="
132
132
  }
133
133
  ]
134
134
  },
@@ -53,18 +53,18 @@
53
53
  }
54
54
  ],
55
55
  "keyid": {
56
- "publicKeyPem": "-----BEGIN PUBLIC KEY-----\nMCowBQYDK2VwAyEAE1GO+bv5vEy6uyagTf6Cx4AqW6oK611ZiuhsebVQyAw=\n-----END PUBLIC KEY-----\n",
57
- "keyid": "1110dfb85d3cc62d08cbf0cf04c40428795879d7ed443a377e20b37419a337dd"
56
+ "publicKeyPem": "-----BEGIN PUBLIC KEY-----\nMCowBQYDK2VwAyEAEj8F+jbisOb9+9zlHGSGBI14LeUTnJG1DuQXfOiWuRQ=\n-----END PUBLIC KEY-----\n",
57
+ "keyid": "7a94ecb793868213306a0aff643ced9c6ff265503ab77e9cfb149b8208400eb9"
58
58
  },
59
59
  "dsse": {
60
- "publicKeyPem": "-----BEGIN PUBLIC KEY-----\nMCowBQYDK2VwAyEAE1GO+bv5vEy6uyagTf6Cx4AqW6oK611ZiuhsebVQyAw=\n-----END PUBLIC KEY-----\n",
60
+ "publicKeyPem": "-----BEGIN PUBLIC KEY-----\nMCowBQYDK2VwAyEAEj8F+jbisOb9+9zlHGSGBI14LeUTnJG1DuQXfOiWuRQ=\n-----END PUBLIC KEY-----\n",
61
61
  "envelope": {
62
62
  "payloadType": "application/vnd.example+json",
63
63
  "payload": "eyJoZWxsbyI6IndvcmxkIn0=",
64
64
  "signatures": [
65
65
  {
66
- "keyid": "1110dfb85d3cc62d08cbf0cf04c40428795879d7ed443a377e20b37419a337dd",
67
- "sig": "dbMD0AfxaklCHox+9e+EuxQveMfznxuxQ69AQxsECjO9FWOiuTylr/p0EnWUXnHEBoMj+DptPgAISqGEF9+RAQ=="
66
+ "keyid": "7a94ecb793868213306a0aff643ced9c6ff265503ab77e9cfb149b8208400eb9",
67
+ "sig": "k8FdQAn72W3S594mZvtnWX2UTROvZUIFg/R5OXPwpevPMEhrV29XHILvXo/C0vv3YsdVmkItAOK2rrW7HnDtBg=="
68
68
  }
69
69
  ]
70
70
  },
@@ -105,6 +105,43 @@
105
105
  ],
106
106
  "root": "0b007fb915eb9b2a146f54b1c86ec53b664f8e455b7660b0b6ee13edc0d921c0",
107
107
  "expected": true
108
+ },
109
+ {
110
+ "leafIndex": 2.5,
111
+ "treeSize": 7,
112
+ "leafHash": "fca89f57c9f8c8eb4047a7ff9d333acf9e0f3384b20b255bceab0f216dcca267",
113
+ "hashes": [
114
+ "f76836325aec5699d8d71f8e42e9d47c5c29b08059ba296384f7ca40ad3a40ae",
115
+ "60a53eed0de87a90c8e59427c59c46253c33a76a09502a51801300927b7e6bdc",
116
+ "8eae6bd3b3a07f1f75ee72a531629e6eb31e42e62f760e47de52a53c3641ef23"
117
+ ],
118
+ "root": "0b007fb915eb9b2a146f54b1c86ec53b664f8e455b7660b0b6ee13edc0d921c0",
119
+ "expected": false,
120
+ "description": "an index is an integer: leaf 2's own proof walks the same path from index 2.5 when the loop halves with floor"
121
+ },
122
+ {
123
+ "leafIndex": 0,
124
+ "treeSize": 7,
125
+ "hashes": [
126
+ "3145c409f259b7c53e32036090ff76751025a2498ba9823ef718cac50b4e616f\n",
127
+ "bd45ff28796704d88bdac51b1df553fda59837b616d6d1cb2114dbc3b087ff69",
128
+ "8eae6bd3b3a07f1f75ee72a531629e6eb31e42e62f760e47de52a53c3641ef23"
129
+ ],
130
+ "root": "0b007fb915eb9b2a146f54b1c86ec53b664f8e455b7660b0b6ee13edc0d921c0",
131
+ "expected": false,
132
+ "description": "a proof hash is exactly 64 lowercase hex digits: a trailing newline is refused"
133
+ },
134
+ {
135
+ "leafIndex": 0,
136
+ "treeSize": 7,
137
+ "hashes": [
138
+ "3145c409f259b7c53e32036090ff76751025a2498ba9823ef718cac50b4e616f",
139
+ "bd45ff28796704d88bdac51b1df553fda59837b616d6d1cb2114dbc3b087ff69",
140
+ "8eae6bd3b3a07f1f75ee72a531629e6eb31e42e62f760e47de52a53c3641ef23"
141
+ ],
142
+ "root": "0B007FB915EB9B2A146F54B1C86EC53B664F8E455B7660B0B6EE13EDC0D921C0",
143
+ "expected": false,
144
+ "description": "a root is 64 lowercase hex digits, as a signed tree head must carry it"
108
145
  }
109
146
  ],
110
147
  "consistency": [
@@ -195,6 +232,92 @@
195
232
  ],
196
233
  "expected": false,
197
234
  "description": "leaf 1 rewritten after the older head was taken"
235
+ },
236
+ {
237
+ "oldSize": 0,
238
+ "newSize": 7,
239
+ "oldRoot": "0b007fb915eb9b2a146f54b1c86ec53b664f8e455b7660b0b6ee13edc0d921c0",
240
+ "newRoot": "0b007fb915eb9b2a146f54b1c86ec53b664f8e455b7660b0b6ee13edc0d921c0",
241
+ "hashes": [],
242
+ "expected": false,
243
+ "description": "an old head of size 0 whose root is not the empty tree's root, sha256 of nothing"
244
+ },
245
+ {
246
+ "oldSize": 0,
247
+ "newSize": 7,
248
+ "oldRoot": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
249
+ "newRoot": "0b007fb915eb9b2a146f54b1c86ec53b664f8e455b7660b0b6ee13edc0d921c0",
250
+ "hashes": [
251
+ "305df59f9590c3c9ac63d2b2743c388e3792449078cebf7fb3dbe6471643b2b7"
252
+ ],
253
+ "expected": false,
254
+ "description": "RFC 9162 has no consistency proof from size 0: a hash beside the empty tree's root is refused"
255
+ },
256
+ {
257
+ "oldSize": 0,
258
+ "newSize": 7,
259
+ "oldRoot": "E3B0C44298FC1C149AFBF4C8996FB92427AE41E4649B934CA495991B7852B855",
260
+ "newRoot": "0b007fb915eb9b2a146f54b1c86ec53b664f8e455b7660b0b6ee13edc0d921c0",
261
+ "hashes": [],
262
+ "expected": false,
263
+ "description": "a root is 64 lowercase hex digits, as a signed tree head must carry it: the empty tree's root in uppercase is refused"
264
+ },
265
+ {
266
+ "oldSize": 0,
267
+ "newSize": 0,
268
+ "oldRoot": "abababababababababababababababababababababababababababababababab",
269
+ "newRoot": "abababababababababababababababababababababababababababababababab",
270
+ "hashes": [],
271
+ "expected": false,
272
+ "description": "two heads of size 0 with the same root that is not the empty tree's root"
273
+ },
274
+ {
275
+ "oldSize": 0,
276
+ "newSize": 0,
277
+ "oldRoot": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
278
+ "newRoot": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
279
+ "hashes": [],
280
+ "expected": true,
281
+ "description": "two heads of size 0, each with the empty tree's root"
282
+ },
283
+ {
284
+ "oldSize": 1.5,
285
+ "newSize": 7,
286
+ "oldRoot": "305df59f9590c3c9ac63d2b2743c388e3792449078cebf7fb3dbe6471643b2b7",
287
+ "newRoot": "0b007fb915eb9b2a146f54b1c86ec53b664f8e455b7660b0b6ee13edc0d921c0",
288
+ "hashes": [
289
+ "3145c409f259b7c53e32036090ff76751025a2498ba9823ef718cac50b4e616f",
290
+ "bd45ff28796704d88bdac51b1df553fda59837b616d6d1cb2114dbc3b087ff69",
291
+ "8eae6bd3b3a07f1f75ee72a531629e6eb31e42e62f760e47de52a53c3641ef23"
292
+ ],
293
+ "expected": false,
294
+ "description": "a size is an integer: the proof from size 1 also passes from 1.5 when the loop halves with floor"
295
+ },
296
+ {
297
+ "oldSize": 1,
298
+ "newSize": 6.5,
299
+ "oldRoot": "305df59f9590c3c9ac63d2b2743c388e3792449078cebf7fb3dbe6471643b2b7",
300
+ "newRoot": "0b007fb915eb9b2a146f54b1c86ec53b664f8e455b7660b0b6ee13edc0d921c0",
301
+ "hashes": [
302
+ "3145c409f259b7c53e32036090ff76751025a2498ba9823ef718cac50b4e616f",
303
+ "bd45ff28796704d88bdac51b1df553fda59837b616d6d1cb2114dbc3b087ff69",
304
+ "8eae6bd3b3a07f1f75ee72a531629e6eb31e42e62f760e47de52a53c3641ef23"
305
+ ],
306
+ "expected": false,
307
+ "description": "a size is an integer: the proof to size 7 also passes to 6.5"
308
+ },
309
+ {
310
+ "oldSize": 1,
311
+ "newSize": 7,
312
+ "oldRoot": "305df59f9590c3c9ac63d2b2743c388e3792449078cebf7fb3dbe6471643b2b7",
313
+ "newRoot": "0b007fb915eb9b2a146f54b1c86ec53b664f8e455b7660b0b6ee13edc0d921c0",
314
+ "hashes": [
315
+ "3145c409f259b7c53e32036090ff76751025a2498ba9823ef718cac50b4e616f\n",
316
+ "bd45ff28796704d88bdac51b1df553fda59837b616d6d1cb2114dbc3b087ff69",
317
+ "8eae6bd3b3a07f1f75ee72a531629e6eb31e42e62f760e47de52a53c3641ef23"
318
+ ],
319
+ "expected": false,
320
+ "description": "a proof hash is exactly 64 lowercase hex digits: a trailing newline is refused"
198
321
  }
199
322
  ]
200
323
  }