macwarden 0.0.0-stage → 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 (79) hide show
  1. package/CHANGELOG.md +107 -0
  2. package/LICENSE +21 -0
  3. package/README.md +199 -2
  4. package/SECURITY.md +104 -0
  5. package/dist/bin.js +21 -0
  6. package/dist/bounded-file.js +1 -0
  7. package/dist/cancellation.js +1 -0
  8. package/dist/caveat-address.js +1 -0
  9. package/dist/cli.js +1 -0
  10. package/dist/command-result.js +1 -0
  11. package/dist/commands/attenuate.js +1 -0
  12. package/dist/commands/bake/allocate.js +1 -0
  13. package/dist/commands/bake/index.js +1 -0
  14. package/dist/commands/bake/write-out.js +1 -0
  15. package/dist/commands/handlers.js +1 -0
  16. package/dist/commands/inspect.js +1 -0
  17. package/dist/commands/inventory.js +1 -0
  18. package/dist/commands/recommend.js +1 -0
  19. package/dist/commands/respond.js +1 -0
  20. package/dist/commands/revoke.js +1 -0
  21. package/dist/commands/rotate.js +1 -0
  22. package/dist/commands/scan.js +1 -0
  23. package/dist/commands/verify.js +1 -0
  24. package/dist/commands/watch.js +1 -0
  25. package/dist/credential-recognition.js +1 -0
  26. package/dist/decode/index.js +1 -0
  27. package/dist/decode/recognition.js +1 -0
  28. package/dist/environment.js +1 -0
  29. package/dist/errors.js +1 -0
  30. package/dist/grade/index.js +1 -0
  31. package/dist/grade/lnd-permissions.json +508 -0
  32. package/dist/grouped-runs.js +1 -0
  33. package/dist/input/index.js +1 -0
  34. package/dist/input/lndconnect.js +1 -0
  35. package/dist/lnd/grpc.js +1 -0
  36. package/dist/lnd/index.js +1 -0
  37. package/dist/lnd/middleware-proto.js +1 -0
  38. package/dist/lnd/tls-identity.js +1 -0
  39. package/dist/online.js +1 -0
  40. package/dist/output/index.js +1 -0
  41. package/dist/output/scan-formats.js +1 -0
  42. package/dist/process-error-context.js +1 -0
  43. package/dist/protected-path.js +1 -0
  44. package/dist/registry/index.js +1 -0
  45. package/dist/registry/process-domain.js +1 -0
  46. package/dist/report/access-review.js +1 -0
  47. package/dist/runtime.js +14274 -0
  48. package/dist/scan/agent-configs.js +1 -0
  49. package/dist/scan/git-history.js +1 -0
  50. package/dist/scan/ignore.js +1 -0
  51. package/dist/scan/index.js +1 -0
  52. package/dist/scan/mcp-context.js +1 -0
  53. package/dist/scan/nwc-match.js +1 -0
  54. package/dist/scan/patterns.js +1 -0
  55. package/dist/scan/redact.js +1 -0
  56. package/dist/secret-capability.js +1 -0
  57. package/dist/secret.js +1 -0
  58. package/dist/version.js +1 -0
  59. package/dist/watch/alert-throttle.js +1 -0
  60. package/dist/watch/alert.js +1 -0
  61. package/dist/watch/canary.js +1 -0
  62. package/dist/watch/output-queue.js +1 -0
  63. package/dist/watch/usage.js +1 -0
  64. package/package.json +69 -4
  65. package/rules/gitleaks.toml +30 -0
  66. package/rules/trufflehog.yaml +27 -0
  67. package/schemas/output/attenuate.schema.json +439 -0
  68. package/schemas/output/bake.schema.json +338 -0
  69. package/schemas/output/inspect.schema.json +174 -0
  70. package/schemas/output/inventory.schema.json +929 -0
  71. package/schemas/output/recommend.schema.json +471 -0
  72. package/schemas/output/registry-entry.schema.json +28 -0
  73. package/schemas/output/respond.schema.json +620 -0
  74. package/schemas/output/revoke.schema.json +368 -0
  75. package/schemas/output/rotate.schema.json +381 -0
  76. package/schemas/output/scan.schema.json +272 -0
  77. package/schemas/output/verify.schema.json +552 -0
  78. package/schemas/output/watch-event.schema.json +232 -0
  79. package/schemas/output/watch.schema.json +377 -0
@@ -0,0 +1 @@
1
+ export {api40_agentConfigCandidates as agentConfigCandidates, api40_discoverAgentConfigs as discoverAgentConfigs, api40_defaultAgentConfigEnvironment as defaultAgentConfigEnvironment} from "../runtime.js";
@@ -0,0 +1 @@
1
+ export {api41_nonLocalPath as nonLocalPath, api41_locateRepository as locateRepository, api41_gitEnvironment as gitEnvironment, api41_assertWorkTree as assertWorkTree, api41_isShallowRepository as isShallowRepository, api41_historyEntries as historyEntries, api41_blobSizes as blobSizes, api41_readBlobs as readBlobs, api41_GitHistoryError as GitHistoryError, api41_MODE_REGULAR as MODE_REGULAR, api41_MODE_SYMLINK as MODE_SYMLINK, api41_MODE_OTHER as MODE_OTHER, api41_GIT_IDLE_TIMEOUT_MS as GIT_IDLE_TIMEOUT_MS, api41_MAX_HISTORY_ENTRIES as MAX_HISTORY_ENTRIES, api41_PINNED_CONFIG as PINNED_CONFIG, api41_PREFLIGHT_LIMITS as PREFLIGHT_LIMITS} from "../runtime.js";
@@ -0,0 +1 @@
1
+ export {api42_parseIgnoreFile as parseIgnoreFile, api42_IgnoreFileError as IgnoreFileError} from "../runtime.js";
@@ -0,0 +1 @@
1
+ export {api43_scan as scan, api43_IgnoreFileError as IgnoreFileError, api43_GitHistoryError as GitHistoryError, api43_FINDINGS_LIMIT as FINDINGS_LIMIT, api43_ALSO_AT_EXAMPLES as ALSO_AT_EXAMPLES, api43_HISTORY_DEDUP_WORK_LIMIT as HISTORY_DEDUP_WORK_LIMIT, api43_FindingsLimitError as FindingsLimitError, api43_SCAN_CONCURRENCY as SCAN_CONCURRENCY, api43_readBounded as readBounded} from "../runtime.js";
@@ -0,0 +1 @@
1
+ export {api44_mcpServerStringSpans as mcpServerStringSpans, api44_withinSpans as withinSpans, api44_MAX_DEPTH as MAX_DEPTH} from "../runtime.js";
@@ -0,0 +1 @@
1
+ export {api45_nwcMatches as nwcMatches, api45_replaceNwc as replaceNwc, api45_nwcUnescaped as nwcUnescaped} from "../runtime.js";
@@ -0,0 +1 @@
1
+ export {api46_macaroonHex as macaroonHex, api46_macaroonBase64 as macaroonBase64, api46_lndconnect as lndconnect, api46_nwc as nwc} from "../runtime.js";
@@ -0,0 +1 @@
1
+ export {api47_redactDecoded as redactDecoded, api47_redactPath as redactPath, api47_collectNwcSecrets as collectNwcSecrets, api47_knownSecretRedactor as knownSecretRedactor, api47_redactKnownSecrets as redactKnownSecrets} from "../runtime.js";
@@ -0,0 +1 @@
1
+ export { Secret } from './secret.js';
package/dist/secret.js ADDED
@@ -0,0 +1 @@
1
+ export {api48_Secret as Secret} from "./runtime.js";
@@ -0,0 +1 @@
1
+ export {api49_macwardenVersion as macwardenVersion} from "./runtime.js";
@@ -0,0 +1 @@
1
+ export {api50_createAlertThrottle as createAlertThrottle, api50_createAlertRunner as createAlertRunner, api50_ALERT_WINDOW_MS as ALERT_WINDOW_MS, api50_MAX_TRACKED_CANARIES as MAX_TRACKED_CANARIES} from "../runtime.js";
@@ -0,0 +1 @@
1
+ export {api51_reapAlertGroups as reapAlertGroups, api51_alertCleanupDone as alertCleanupDone, api51_runAlertCommand as runAlertCommand, api51_ALERT_TIMEOUT_MS as ALERT_TIMEOUT_MS, api51_ALERT_KILL_MS as ALERT_KILL_MS, api51_ALERT_GRACE_MS as ALERT_GRACE_MS, api51_ALERT_CLEANUP_MS as ALERT_CLEANUP_MS} from "../runtime.js";
@@ -0,0 +1 @@
1
+ export {api52_canaryConfigPath as canaryConfigPath, api52_newCaveatName as newCaveatName, api52_newCondition as newCondition, api52_canaryCondition as canaryCondition, api52_readCanaryConfig as readCanaryConfig, api52_ensureCanaryConfig as ensureCanaryConfig, api52_canaryEntries as canaryEntries, api52_isCanary as isCanary, api52_CANARY_FILE_LIMIT as CANARY_FILE_LIMIT} from "../runtime.js";
@@ -0,0 +1 @@
1
+ export {api53_retryable as retryable, api53_fdWriter as fdWriter, api53_createOutputQueue as createOutputQueue, api53_OUTPUT_LIMIT_BYTES as OUTPUT_LIMIT_BYTES} from "../runtime.js";
@@ -0,0 +1 @@
1
+ export {api54_usagePath as usagePath, api54_readUsage as readUsage, api54_writeUsage as writeUsage, api54_USAGE_LIMIT as USAGE_LIMIT, api54_CANARY_LIMIT as CANARY_LIMIT, api54_COVERAGE_LIMIT as COVERAGE_LIMIT, api54_SPAN_LIMIT as SPAN_LIMIT, api54_USAGE_FILE_LIMIT as USAGE_FILE_LIMIT, api54_UsageFileError as UsageFileError, api54_UsageStore as UsageStore} from "../runtime.js";
package/package.json CHANGED
@@ -1,6 +1,71 @@
1
1
  {
2
2
  "name": "macwarden",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "1.1.0",
4
+ "description": "Lightning credential hygiene for LND: inspect, scan (incl. git history), inventory, bake, revoke, rotate and attenuate macaroons",
5
+ "keywords": [
6
+ "lightning",
7
+ "lnd",
8
+ "macaroon",
9
+ "bitcoin",
10
+ "secret-scanning",
11
+ "credentials",
12
+ "nwc",
13
+ "security"
14
+ ],
15
+ "homepage": "https://github.com/ZilverZtream/macwarden#readme",
16
+ "bugs": {
17
+ "url": "https://github.com/ZilverZtream/macwarden/issues"
18
+ },
19
+ "repository": {
20
+ "type": "git",
21
+ "url": "git+https://github.com/ZilverZtream/macwarden.git"
22
+ },
23
+ "type": "module",
24
+ "bin": {
25
+ "macwarden": "dist/bin.js"
26
+ },
27
+ "files": [
28
+ "dist/",
29
+ "schemas/output/",
30
+ "rules/gitleaks.toml",
31
+ "rules/trufflehog.yaml",
32
+ "README.md",
33
+ "SECURITY.md",
34
+ "LICENSE",
35
+ "CHANGELOG.md"
36
+ ],
37
+ "publishConfig": {
38
+ "provenance": true
39
+ },
40
+ "engines": {
41
+ "node": "^22.23.2 || ^24.18.1 || >=26.5.1"
42
+ },
43
+ "license": "MIT",
44
+ "scripts": {
45
+ "pretest": "npm run build",
46
+ "test": "vitest run --project product",
47
+ "test:harness": "vitest run --project harness-docs",
48
+ "test:related": "vitest related --run",
49
+ "test:full": "node scripts/full-validation.mjs",
50
+ "lint": "eslint .",
51
+ "prebuild": "node scripts/build.mjs",
52
+ "build": "tsc -p tsconfig.json && tsc -p tsconfig.test.json",
53
+ "postbuild": "node scripts/build.mjs --copy-permissions",
54
+ "prepack": "npm run build",
55
+ "test:oracle": "node scripts/later.mjs CP-002 vitest.oracle.config.ts && vitest run --config vitest.oracle.config.ts",
56
+ "test:gitleaks": "node scripts/later.mjs CP-013 vitest.gitleaks.config.ts && vitest run --config vitest.gitleaks.config.ts",
57
+ "fixture:up": "node scripts/later.mjs CP-004 test/fixture/fixture.mjs && node test/fixture/fixture.mjs up",
58
+ "fixture:down": "node scripts/later.mjs CP-004 test/fixture/fixture.mjs && node test/fixture/fixture.mjs down"
59
+ },
60
+ "devDependencies": {
61
+ "typescript": "6.0.3",
62
+ "vitest": "5.0.3",
63
+ "vite": "8.3.2",
64
+ "eslint": "10.11.0",
65
+ "@eslint/js": "10.0.1",
66
+ "typescript-eslint": "8.71.0",
67
+ "@types/node": "22.20.5",
68
+ "globals": "17.13.0",
69
+ "ajv": "8.20.0"
70
+ }
71
+ }
@@ -0,0 +1,30 @@
1
+ # Always run gitleaks with --redact. Without --redact, gitleaks prints and stores the matched credential.
2
+ # These rules add to gitleaks' built-in rules ([extend] useDefault = true); a custom config without it
3
+ # replaces them. Keywords are a case-insensitive prefilter checked before each regex.
4
+
5
+ [extend]
6
+ useDefault = true
7
+
8
+ [[rules]]
9
+ id = 'macwarden-macaroon-hex'
10
+ description = 'LND macaroon (location lnd) in hex'
11
+ regex = '''(?i)0201036c6e6402[0-9a-f]{40,}'''
12
+ keywords = ['0201036c6e6402']
13
+
14
+ [[rules]]
15
+ id = 'macwarden-macaroon-base64'
16
+ description = 'LND macaroon (location lnd) in base64 or base64url'
17
+ regex = '''AgEDbG5kA[A-Za-z0-9+/_-]{40,}={0,2}'''
18
+ keywords = ['agedbg5ka']
19
+
20
+ [[rules]]
21
+ id = 'macwarden-lndconnect'
22
+ description = 'lndconnect URI, which embeds an LND macaroon'
23
+ regex = '''(?i)lndconnect://[^\s"'<>]+'''
24
+ keywords = ['lndconnect://']
25
+
26
+ [[rules]]
27
+ id = 'macwarden-nwc'
28
+ description = 'Nostr Wallet Connect (NIP-47) URI with a secret'
29
+ regex = '''(?i)(?:nostr\+walletconnect|nostrwalletconnect):(?://)?[0-9a-f]{64}/?\?[^\s"'<>]*?secret=[0-9a-f]{64}(?:[^0-9a-f]|$)'''
30
+ keywords = ['walletconnect']
@@ -0,0 +1,27 @@
1
+ # macwarden detectors as TruffleHog custom detectors.
2
+ # Usage: trufflehog filesystem . --config rules/trufflehog.yaml --no-verification
3
+ # trufflehog git file://. --config rules/trufflehog.yaml --no-verification
4
+ # The regexes are byte-identical to SPEC.md and rules/gitleaks.toml (a test enforces it).
5
+ # TruffleHog prints matched secrets in its output: store its results only where a
6
+ # leaked Lightning credential may be read, and rotate anything it finds (macwarden rotate).
7
+ detectors:
8
+ - name: macwarden-macaroon-hex
9
+ keywords:
10
+ - '0201036c6e6402'
11
+ regex:
12
+ macaroon: '(?i)0201036c6e6402[0-9a-f]{40,}'
13
+ - name: macwarden-macaroon-base64
14
+ keywords:
15
+ - 'AgEDbG5kA'
16
+ regex:
17
+ macaroon: 'AgEDbG5kA[A-Za-z0-9+/_-]{40,}={0,2}'
18
+ - name: macwarden-lndconnect
19
+ keywords:
20
+ - 'lndconnect://'
21
+ regex:
22
+ uri: '(?i)lndconnect://[^\s"''<>]+'
23
+ - name: macwarden-nwc
24
+ keywords:
25
+ - 'walletconnect'
26
+ regex:
27
+ uri: '(?i)(?:nostr\+walletconnect|nostrwalletconnect):(?://)?[0-9a-f]{64}/?\?[^\s"''<>]*?secret=[0-9a-f]{64}(?:[^0-9a-f]|$)'
@@ -0,0 +1,439 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://github.com/ZilverZtream/macwarden/blob/main/schemas/output/attenuate.schema.json",
4
+ "title": "macwarden attenuate --json output",
5
+ "description": "Normative source: SPEC.md, Commands > 7. attenuate. The facts of the attenuated copy, as inspect reports them, plus the caveats added.",
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": "attenuate"
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
+ "dryRun",
358
+ "out",
359
+ "parentFingerprint",
360
+ "added"
361
+ ],
362
+ "properties": {
363
+ "fingerprint": {
364
+ "$ref": "#/$defs/fingerprint"
365
+ },
366
+ "location": {
367
+ "type": [
368
+ "string",
369
+ "null"
370
+ ]
371
+ },
372
+ "rootKeyId": {
373
+ "$ref": "#/$defs/rootKeyId"
374
+ },
375
+ "permissions": {
376
+ "type": "array",
377
+ "items": {
378
+ "type": "string"
379
+ }
380
+ },
381
+ "caveats": {
382
+ "type": "array",
383
+ "items": {
384
+ "$ref": "#/$defs/caveat"
385
+ }
386
+ },
387
+ "grade": {
388
+ "$ref": "#/$defs/grade"
389
+ },
390
+ "reasons": {
391
+ "type": "array",
392
+ "items": {
393
+ "type": "string"
394
+ },
395
+ "uniqueItems": true
396
+ },
397
+ "warnings": {
398
+ "type": "array",
399
+ "items": {
400
+ "$ref": "#/$defs/macaroonWarning"
401
+ },
402
+ "uniqueItems": true
403
+ },
404
+ "unassessed": {
405
+ "type": "array",
406
+ "items": {
407
+ "type": "string"
408
+ },
409
+ "uniqueItems": true
410
+ },
411
+ "snapshot": {
412
+ "type": "string",
413
+ "minLength": 1,
414
+ "description": "LND version the bundled permission snapshot came from, e.g. 0.21.4-beta."
415
+ },
416
+ "dryRun": {
417
+ "type": "boolean"
418
+ },
419
+ "out": {
420
+ "type": [
421
+ "string",
422
+ "null"
423
+ ]
424
+ },
425
+ "parentFingerprint": {
426
+ "type": "string",
427
+ "pattern": "^fp:[0-9a-f]{16}$"
428
+ },
429
+ "added": {
430
+ "type": "array",
431
+ "minItems": 1,
432
+ "items": {
433
+ "type": "string"
434
+ }
435
+ }
436
+ }
437
+ }
438
+ }
439
+ }