macwarden 1.0.1 → 1.1.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.
Files changed (76) hide show
  1. package/CHANGELOG.md +82 -0
  2. package/README.md +24 -8
  3. package/SECURITY.md +2 -2
  4. package/dist/bin.js +7 -1
  5. package/dist/bounded-file.js +1 -0
  6. package/dist/cancellation.js +1 -1
  7. package/dist/caveat-address.js +1 -1
  8. package/dist/cli.js +1 -1
  9. package/dist/commands/attenuate.js +1 -1
  10. package/dist/commands/bake/allocate.js +1 -1
  11. package/dist/commands/bake/index.js +1 -1
  12. package/dist/commands/bake/out-errors.js +1 -0
  13. package/dist/commands/bake/write-out.js +1 -1
  14. package/dist/commands/handlers.js +1 -1
  15. package/dist/commands/inspect.js +1 -1
  16. package/dist/commands/inventory.js +1 -1
  17. package/dist/commands/recommend.js +1 -1
  18. package/dist/commands/respond.js +1 -1
  19. package/dist/commands/revoke.js +1 -1
  20. package/dist/commands/rotate.js +1 -1
  21. package/dist/commands/scan.js +1 -1
  22. package/dist/commands/verify.js +1 -0
  23. package/dist/commands/watch.js +1 -1
  24. package/dist/credential-recognition.js +1 -1
  25. package/dist/decode/index.js +1 -1
  26. package/dist/decode/recognition.js +1 -1
  27. package/dist/environment.js +1 -1
  28. package/dist/errors.js +1 -1
  29. package/dist/grade/index.js +1 -1
  30. package/dist/grouped-runs.js +1 -1
  31. package/dist/input/index.js +1 -1
  32. package/dist/input/lndconnect.js +1 -1
  33. package/dist/instant.js +1 -0
  34. package/dist/lnd/grpc.js +1 -1
  35. package/dist/lnd/index.js +1 -1
  36. package/dist/lnd/middleware-proto.js +1 -1
  37. package/dist/lnd/tls-identity.js +1 -0
  38. package/dist/online.js +1 -1
  39. package/dist/output/index.js +1 -1
  40. package/dist/output/scan-formats.js +1 -1
  41. package/dist/process-error-context.js +1 -1
  42. package/dist/protected-path.js +1 -1
  43. package/dist/registry/index.js +1 -1
  44. package/dist/registry/process-domain.js +1 -1
  45. package/dist/report/access-review.js +1 -1
  46. package/dist/root-key-id.js +1 -0
  47. package/dist/runtime.js +3401 -947
  48. package/dist/scan/agent-configs.js +1 -1
  49. package/dist/scan/git-history.js +1 -1
  50. package/dist/scan/ignore.js +1 -1
  51. package/dist/scan/index.js +1 -1
  52. package/dist/scan/mcp-context.js +1 -1
  53. package/dist/scan/nwc-match.js +1 -1
  54. package/dist/scan/patterns.js +1 -1
  55. package/dist/scan/redact.js +1 -1
  56. package/dist/secret.js +1 -1
  57. package/dist/version.js +1 -1
  58. package/dist/watch/alert-throttle.js +1 -1
  59. package/dist/watch/alert.js +1 -1
  60. package/dist/watch/canary.js +1 -1
  61. package/dist/watch/output-queue.js +1 -1
  62. package/dist/watch/usage.js +1 -1
  63. package/package.json +2 -2
  64. package/schemas/output/attenuate.schema.json +30 -1
  65. package/schemas/output/bake.schema.json +28 -1
  66. package/schemas/output/inspect.schema.json +9 -2
  67. package/schemas/output/inventory.schema.json +63 -2
  68. package/schemas/output/macwarden.schema.json +329 -0
  69. package/schemas/output/recommend.schema.json +498 -0
  70. package/schemas/output/respond.schema.json +28 -1
  71. package/schemas/output/revoke.schema.json +28 -1
  72. package/schemas/output/rotate.schema.json +28 -1
  73. package/schemas/output/scan.schema.json +10 -3
  74. package/schemas/output/verify.schema.json +579 -0
  75. package/schemas/output/watch-event.schema.json +232 -0
  76. package/schemas/output/watch.schema.json +404 -0
@@ -0,0 +1,579 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://github.com/ZilverZtream/macwarden/blob/main/schemas/output/verify.schema.json",
4
+ "title": "macwarden verify --json output",
5
+ "description": "Normative source: SPEC.md, Commands > 11. verify. The facts of the credential, as inspect reports them, plus LND's answer. Exit 1 (ok: true) when the credential is accepted or the rejection is not conclusive; exit 0 when LND conclusively rejects it.",
6
+ "type": "object",
7
+ "additionalProperties": false,
8
+ "required": [
9
+ "schema",
10
+ "command",
11
+ "ok",
12
+ "warnings",
13
+ "result",
14
+ "error"
15
+ ],
16
+ "properties": {
17
+ "schema": {
18
+ "const": 1
19
+ },
20
+ "command": {
21
+ "const": "verify"
22
+ },
23
+ "ok": {
24
+ "type": "boolean"
25
+ },
26
+ "warnings": {
27
+ "type": "array",
28
+ "items": {
29
+ "$ref": "#/$defs/warning"
30
+ }
31
+ },
32
+ "result": {
33
+ "oneOf": [
34
+ {
35
+ "type": "null"
36
+ },
37
+ {
38
+ "$ref": "#/$defs/result"
39
+ },
40
+ {
41
+ "$ref": "#/$defs/help"
42
+ }
43
+ ]
44
+ },
45
+ "error": {
46
+ "oneOf": [
47
+ {
48
+ "type": "null"
49
+ },
50
+ {
51
+ "$ref": "#/$defs/error"
52
+ }
53
+ ]
54
+ }
55
+ },
56
+ "allOf": [
57
+ {
58
+ "if": {
59
+ "properties": {
60
+ "ok": {
61
+ "const": true
62
+ }
63
+ },
64
+ "required": [
65
+ "ok"
66
+ ]
67
+ },
68
+ "then": {
69
+ "properties": {
70
+ "result": {
71
+ "oneOf": [
72
+ {
73
+ "$ref": "#/$defs/result"
74
+ },
75
+ {
76
+ "$ref": "#/$defs/help"
77
+ }
78
+ ]
79
+ },
80
+ "error": {
81
+ "type": "null"
82
+ }
83
+ }
84
+ },
85
+ "else": {
86
+ "properties": {
87
+ "result": {
88
+ "type": "null"
89
+ },
90
+ "error": {
91
+ "$ref": "#/$defs/error"
92
+ }
93
+ }
94
+ }
95
+ }
96
+ ],
97
+ "$defs": {
98
+ "error": {
99
+ "type": "object",
100
+ "additionalProperties": false,
101
+ "required": [
102
+ "code",
103
+ "step",
104
+ "message"
105
+ ],
106
+ "properties": {
107
+ "code": {
108
+ "type": "integer",
109
+ "minimum": 1,
110
+ "maximum": 8
111
+ },
112
+ "step": {
113
+ "type": [
114
+ "string",
115
+ "null"
116
+ ],
117
+ "minLength": 1
118
+ },
119
+ "message": {
120
+ "type": "string",
121
+ "minLength": 1
122
+ }
123
+ }
124
+ },
125
+ "warning": {
126
+ "oneOf": [
127
+ {
128
+ "type": "string",
129
+ "minLength": 1
130
+ },
131
+ {
132
+ "type": "object",
133
+ "additionalProperties": false,
134
+ "required": [
135
+ "code",
136
+ "message"
137
+ ],
138
+ "properties": {
139
+ "code": {
140
+ "type": "string",
141
+ "minLength": 1
142
+ },
143
+ "message": {
144
+ "type": "string"
145
+ }
146
+ }
147
+ }
148
+ ]
149
+ },
150
+ "rootKeyId": {
151
+ "type": "string",
152
+ "pattern": "^(0|[1-9][0-9]{0,19})$",
153
+ "description": "uint64 as a canonical decimal string (range up to 18446744073709551615 is enforced by the decoder)."
154
+ },
155
+ "grade": {
156
+ "enum": [
157
+ "ADMIN",
158
+ "SPEND",
159
+ "OPERATE",
160
+ "RECEIVE",
161
+ "READ",
162
+ "UNASSESSED"
163
+ ]
164
+ },
165
+ "registryEntry": {
166
+ "type": "object",
167
+ "required": [
168
+ "nodePubkey",
169
+ "label",
170
+ "rootKeyId",
171
+ "permissions",
172
+ "caveats",
173
+ "grade",
174
+ "fingerprint",
175
+ "outPath",
176
+ "createdAt",
177
+ "verified",
178
+ "status",
179
+ "revokedAt",
180
+ "revokeEvidence",
181
+ "replaces",
182
+ "replacedBy"
183
+ ],
184
+ "additionalProperties": false,
185
+ "properties": {
186
+ "nodePubkey": {
187
+ "type": "string",
188
+ "pattern": "^0[23][0-9a-fA-F]{64}$"
189
+ },
190
+ "label": {
191
+ "type": [
192
+ "string",
193
+ "null"
194
+ ],
195
+ "pattern": "^[A-Za-z][A-Za-z0-9._-]{0,63}$"
196
+ },
197
+ "rootKeyId": {
198
+ "type": "string",
199
+ "pattern": "^(0|[1-9][0-9]*)$"
200
+ },
201
+ "permissions": {
202
+ "type": "array",
203
+ "items": {
204
+ "type": "string"
205
+ }
206
+ },
207
+ "caveats": {
208
+ "type": "array",
209
+ "items": {
210
+ "type": "object"
211
+ }
212
+ },
213
+ "grade": {
214
+ "enum": [
215
+ "ADMIN",
216
+ "SPEND",
217
+ "OPERATE",
218
+ "RECEIVE",
219
+ "READ",
220
+ "UNASSESSED"
221
+ ]
222
+ },
223
+ "fingerprint": {
224
+ "type": [
225
+ "string",
226
+ "null"
227
+ ],
228
+ "pattern": "^fp:[0-9a-f]{16}$"
229
+ },
230
+ "outPath": {
231
+ "type": [
232
+ "string",
233
+ "null"
234
+ ]
235
+ },
236
+ "createdAt": {
237
+ "type": "string"
238
+ },
239
+ "verified": {
240
+ "type": "boolean"
241
+ },
242
+ "status": {
243
+ "enum": [
244
+ "active",
245
+ "revoked"
246
+ ]
247
+ },
248
+ "revokedAt": {
249
+ "type": [
250
+ "string",
251
+ "null"
252
+ ]
253
+ },
254
+ "revokeEvidence": {
255
+ "enum": [
256
+ "rejected",
257
+ "by-id-only",
258
+ null
259
+ ]
260
+ },
261
+ "replaces": {
262
+ "type": [
263
+ "string",
264
+ "null"
265
+ ],
266
+ "pattern": "^(0|[1-9][0-9]*)$"
267
+ },
268
+ "replacedBy": {
269
+ "type": [
270
+ "string",
271
+ "null"
272
+ ],
273
+ "pattern": "^(0|[1-9][0-9]*)$"
274
+ }
275
+ },
276
+ "allOf": [
277
+ {
278
+ "if": {
279
+ "properties": {
280
+ "fingerprint": {
281
+ "type": "null"
282
+ }
283
+ }
284
+ },
285
+ "then": {
286
+ "properties": {
287
+ "verified": {
288
+ "const": false
289
+ },
290
+ "outPath": {
291
+ "type": "null"
292
+ }
293
+ }
294
+ }
295
+ }
296
+ ]
297
+ },
298
+ "fingerprint": {
299
+ "type": "string",
300
+ "pattern": "^fp:[0-9a-f]{16}$"
301
+ },
302
+ "caveat": {
303
+ "type": "object",
304
+ "additionalProperties": false,
305
+ "required": [
306
+ "type",
307
+ "value"
308
+ ],
309
+ "properties": {
310
+ "type": {
311
+ "enum": [
312
+ "time-before",
313
+ "ipaddr",
314
+ "iprange",
315
+ "lnd-custom",
316
+ "third-party",
317
+ "unknown"
318
+ ]
319
+ },
320
+ "value": {
321
+ "type": "string"
322
+ },
323
+ "expired": {
324
+ "type": "boolean"
325
+ }
326
+ },
327
+ "if": {
328
+ "properties": {
329
+ "type": {
330
+ "const": "time-before"
331
+ }
332
+ }
333
+ },
334
+ "else": {
335
+ "properties": {
336
+ "expired": false
337
+ }
338
+ }
339
+ },
340
+ "macaroonWarning": {
341
+ "enum": [
342
+ "root-key-0",
343
+ "trailing-bytes",
344
+ "bad-time-before",
345
+ "identifier-exceeds-bounds",
346
+ "caveats-exceed-bounds",
347
+ "unassessed-uri",
348
+ "unassessed-permission",
349
+ "no-permissions",
350
+ "preimage-exposure"
351
+ ]
352
+ },
353
+ "help": {
354
+ "type": "object",
355
+ "additionalProperties": false,
356
+ "required": [
357
+ "usage"
358
+ ],
359
+ "properties": {
360
+ "usage": {
361
+ "type": "array",
362
+ "minItems": 1,
363
+ "items": {
364
+ "type": "string",
365
+ "pattern": "^macwarden verify "
366
+ }
367
+ }
368
+ }
369
+ },
370
+ "result": {
371
+ "type": "object",
372
+ "additionalProperties": false,
373
+ "required": [
374
+ "fingerprint",
375
+ "location",
376
+ "rootKeyId",
377
+ "permissions",
378
+ "caveats",
379
+ "grade",
380
+ "reasons",
381
+ "warnings",
382
+ "unassessed",
383
+ "snapshot",
384
+ "node",
385
+ "status",
386
+ "rejection",
387
+ "conclusive",
388
+ "rootKeyListed",
389
+ "ownCredential",
390
+ "canBake",
391
+ "registry",
392
+ "guidance"
393
+ ],
394
+ "properties": {
395
+ "fingerprint": {
396
+ "$ref": "#/$defs/fingerprint"
397
+ },
398
+ "location": {
399
+ "type": [
400
+ "string",
401
+ "null"
402
+ ]
403
+ },
404
+ "rootKeyId": {
405
+ "$ref": "#/$defs/rootKeyId"
406
+ },
407
+ "permissions": {
408
+ "type": "array",
409
+ "items": {
410
+ "type": "string"
411
+ }
412
+ },
413
+ "caveats": {
414
+ "type": "array",
415
+ "items": {
416
+ "$ref": "#/$defs/caveat"
417
+ }
418
+ },
419
+ "grade": {
420
+ "$ref": "#/$defs/grade"
421
+ },
422
+ "reasons": {
423
+ "type": "array",
424
+ "items": {
425
+ "type": "string"
426
+ },
427
+ "uniqueItems": true
428
+ },
429
+ "warnings": {
430
+ "type": "array",
431
+ "items": {
432
+ "$ref": "#/$defs/macaroonWarning"
433
+ },
434
+ "uniqueItems": true
435
+ },
436
+ "unassessed": {
437
+ "type": "array",
438
+ "items": {
439
+ "type": "string"
440
+ },
441
+ "uniqueItems": true
442
+ },
443
+ "snapshot": {
444
+ "type": "string",
445
+ "minLength": 1,
446
+ "description": "LND version the bundled permission snapshot came from, e.g. 0.21.4-beta."
447
+ },
448
+ "node": {
449
+ "type": "object",
450
+ "additionalProperties": false,
451
+ "required": [
452
+ "pubkey",
453
+ "alias",
454
+ "network"
455
+ ],
456
+ "properties": {
457
+ "pubkey": {
458
+ "type": "string",
459
+ "pattern": "^0[23][0-9a-fA-F]{64}$"
460
+ },
461
+ "alias": {
462
+ "type": "string"
463
+ },
464
+ "network": {
465
+ "type": "string"
466
+ }
467
+ }
468
+ },
469
+ "status": {
470
+ "enum": [
471
+ "accepted",
472
+ "rejected"
473
+ ]
474
+ },
475
+ "rejection": {
476
+ "enum": [
477
+ "root-key-missing",
478
+ "signature-mismatch",
479
+ "expired",
480
+ "other",
481
+ null
482
+ ]
483
+ },
484
+ "conclusive": {
485
+ "type": "boolean"
486
+ },
487
+ "rootKeyListed": {
488
+ "type": [
489
+ "boolean",
490
+ "null"
491
+ ]
492
+ },
493
+ "ownCredential": {
494
+ "type": "boolean"
495
+ },
496
+ "canBake": {
497
+ "type": "boolean"
498
+ },
499
+ "registry": {
500
+ "oneOf": [
501
+ {
502
+ "type": "null"
503
+ },
504
+ {
505
+ "type": "object",
506
+ "additionalProperties": false,
507
+ "required": [
508
+ "label",
509
+ "status",
510
+ "match"
511
+ ],
512
+ "properties": {
513
+ "label": {
514
+ "type": [
515
+ "string",
516
+ "null"
517
+ ]
518
+ },
519
+ "status": {
520
+ "enum": [
521
+ "active",
522
+ "revoked"
523
+ ]
524
+ },
525
+ "match": {
526
+ "enum": [
527
+ "fingerprint",
528
+ "root-key-id"
529
+ ]
530
+ }
531
+ }
532
+ }
533
+ ]
534
+ },
535
+ "guidance": {
536
+ "type": "array",
537
+ "minItems": 1,
538
+ "items": {
539
+ "type": "string",
540
+ "minLength": 1
541
+ }
542
+ }
543
+ },
544
+ "allOf": [
545
+ {
546
+ "if": {
547
+ "properties": {
548
+ "status": {
549
+ "const": "accepted"
550
+ }
551
+ }
552
+ },
553
+ "then": {
554
+ "properties": {
555
+ "rejection": {
556
+ "const": null
557
+ },
558
+ "conclusive": {
559
+ "const": true
560
+ }
561
+ }
562
+ },
563
+ "else": {
564
+ "properties": {
565
+ "rejection": {
566
+ "enum": [
567
+ "root-key-missing",
568
+ "signature-mismatch",
569
+ "expired",
570
+ "other"
571
+ ]
572
+ }
573
+ }
574
+ }
575
+ }
576
+ ]
577
+ }
578
+ }
579
+ }