macwarden 1.0.1 → 1.1.0

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