@chainpatrol/cli 0.10.0 → 0.12.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.
- package/CHANGELOG.md +64 -0
- package/README.md +2 -0
- package/dist/{breakdown-63FAOVL7.js → breakdown-KCTKQNDY.js} +1 -1
- package/dist/{check-7QDINQPT.js → check-P5JJJNEX.js} +1 -1
- package/dist/{chunk-BJISZ3CY.js → chunk-DJVB73FL.js} +1 -1
- package/dist/{chunk-Z76CUWSS.js → chunk-NQT77IB7.js} +62 -9
- package/dist/chunk-OSRFCVBT.js +382 -0
- package/dist/{chunk-R2DZGMGT.js → chunk-W42ITB5J.js} +1 -1
- package/dist/cli.js +486 -65
- package/dist/{completions-D6SOLU2D.js → completions-6C6KG5DH.js} +1 -1
- package/dist/{configs-update-2IOSKZH5.js → configs-update-3ZVXGADV.js} +1 -1
- package/dist/{create-EWS3SFCH.js → create-DFH2G7RH.js} +1 -1
- package/dist/{drift-Q3VG3XG3.js → drift-T74V2C3J.js} +1 -1
- package/dist/{found-22B7RZT5.js → found-EVXJZGYX.js} +1 -1
- package/dist/{healthcheck-C3AIMUJT.js → healthcheck-HZYEIIOR.js} +1 -1
- package/dist/{list-DNRWKM5O.js → list-23QQYAV5.js} +1 -1
- package/dist/list-EIVPGMWJ.js +82 -0
- package/dist/list-I7SBGA52.js +50 -0
- package/dist/{list-IA4CSOIY.js → list-IYJBKE2F.js} +1 -1
- package/dist/list-PBAXQSL5.js +85 -0
- package/dist/list-QUFY4IP7.js +146 -0
- package/dist/list-WJQT2XLE.js +143 -0
- package/dist/{list-HFWSMLGJ.js → list-WX5G3IOF.js} +2 -2
- package/dist/list-YCT6DYDI.js +89 -0
- package/dist/{list-SDBLGBVW.js → list-YRJPN4PI.js} +1 -1
- package/dist/{list-AYHDFSQG.js → list-ZFPML3ZR.js} +47 -3
- package/dist/{list-json-CEPGVUGF.js → list-json-T2Z7NV7G.js} +1 -1
- package/dist/organization-IIIOSTHF.js +75 -0
- package/dist/{run-WJGHJPXN.js → run-BHEXWBAS.js} +2 -2
- package/dist/{run-AQMJRFGL.js → run-CJGN6TX4.js} +1 -1
- package/dist/{run-YTWNQD5X.js → run-MSO6IXEV.js} +1 -1
- package/dist/search-WPSKQGUS.js +71 -0
- package/dist/{setup-skill-BLJLRCXL.js → setup-skill-FA4STSGA.js} +2 -2
- package/dist/{snapshot-C5MZWJTW.js → snapshot-ZWAHEG64.js} +1 -1
- package/dist/{summary-NQDZQEOD.js → summary-Y2LG6UJM.js} +1 -1
- package/dist/{validate-5DVPSXJP.js → validate-SM5DD7I2.js} +1 -1
- package/dist/whoami-DH5HVLFN.js +69 -0
- package/package.json +1 -1
- package/dist/chunk-RIKR2WFT.js +0 -174
package/dist/cli.js
CHANGED
|
@@ -13,8 +13,8 @@ import {
|
|
|
13
13
|
getCliVersion,
|
|
14
14
|
isSkillInstalled,
|
|
15
15
|
readInstalledSkillVersion
|
|
16
|
-
} from "./chunk-
|
|
17
|
-
import "./chunk-
|
|
16
|
+
} from "./chunk-W42ITB5J.js";
|
|
17
|
+
import "./chunk-NQT77IB7.js";
|
|
18
18
|
import {
|
|
19
19
|
DateTime
|
|
20
20
|
} from "./chunk-TFCNKBRC.js";
|
|
@@ -92,14 +92,31 @@ var HELP = {
|
|
|
92
92
|
usage: "chainpatrol logout"
|
|
93
93
|
},
|
|
94
94
|
asset: {
|
|
95
|
-
description: "Check
|
|
96
|
-
usage: "chainpatrol asset check
|
|
95
|
+
description: "Check asset status or list blocked/allowed assets across the global ChainPatrol blocklist.",
|
|
96
|
+
usage: "chainpatrol asset <check|list>",
|
|
97
97
|
examples: [
|
|
98
98
|
"chainpatrol asset check https://phish.example",
|
|
99
|
-
"chainpatrol asset
|
|
99
|
+
"chainpatrol asset list --asset-type URL --from 2026-05-01",
|
|
100
100
|
"chainpatrol --json asset check 0xabc123\u2026"
|
|
101
101
|
]
|
|
102
102
|
},
|
|
103
|
+
"asset list": {
|
|
104
|
+
description: "List assets in the global ChainPatrol blocklist for a given asset type. Defaults to BLOCKED assets updated in the last day. Use --from and --to to widen the window.",
|
|
105
|
+
usage: "chainpatrol asset list --asset-type <type> [--from ISO --to ISO] [filters]",
|
|
106
|
+
options: [
|
|
107
|
+
"--asset-type <type> Asset type: URL|ADDRESS|TWITTER|TELEGRAM|DISCORD|...",
|
|
108
|
+
"--type <type> Alias for --asset-type",
|
|
109
|
+
"--asset-status <s> Status filter: BLOCKED|ALLOWED|UNKNOWN (default BLOCKED)",
|
|
110
|
+
"--from <iso> Start date (YYYY-MM-DD)",
|
|
111
|
+
"--to <iso> End date (YYYY-MM-DD)",
|
|
112
|
+
"--per-page <n> Page size 1-10000 (default 100; --limit also accepted)",
|
|
113
|
+
"--next-page <cursor> Cursor returned from a previous response"
|
|
114
|
+
],
|
|
115
|
+
examples: [
|
|
116
|
+
"chainpatrol asset list --asset-type URL --from 2026-05-01 --to 2026-05-17",
|
|
117
|
+
"chainpatrol asset list --asset-type ADDRESS --per-page 500 --output csv"
|
|
118
|
+
]
|
|
119
|
+
},
|
|
103
120
|
"asset check": {
|
|
104
121
|
description: "Look up one or more assets (URL, domain, or crypto address) against the ChainPatrol blocklist and external feeds. Returns the aggregated status plus a per-source breakdown. Multiple assets can be passed as positional arguments or via repeated --asset; they are checked in parallel (concurrency 10).",
|
|
105
122
|
usage: "chainpatrol asset check <content> [<content> ...]",
|
|
@@ -127,17 +144,46 @@ var HELP = {
|
|
|
127
144
|
examples: ["chainpatrol configs list --org acme"]
|
|
128
145
|
},
|
|
129
146
|
detections: {
|
|
130
|
-
description: "Validate, run, and update detection configs.",
|
|
131
|
-
usage: "chainpatrol detections <healthcheck|validate|drift|run|configs>",
|
|
147
|
+
description: "Validate, run, list, and update detection configs and results.",
|
|
148
|
+
usage: "chainpatrol detections <healthcheck|validate|drift|run|list|configs>",
|
|
132
149
|
options: ["--org <slug> Organization slug"],
|
|
133
150
|
examples: [
|
|
134
151
|
"chainpatrol detections healthcheck --org acme --run",
|
|
135
152
|
"chainpatrol detections validate --org acme --min-results 5",
|
|
136
153
|
"chainpatrol detections drift --org acme --lookback-hours 168",
|
|
137
154
|
"chainpatrol detections run --org acme --source twitter",
|
|
155
|
+
"chainpatrol detections list --org acme --confidence medium,high",
|
|
138
156
|
"chainpatrol detections configs update --org acme --config-id 1 --enable"
|
|
139
157
|
]
|
|
140
158
|
},
|
|
159
|
+
"detections list": {
|
|
160
|
+
description: "List recent threat detection results for an organization. Returns human-readable confidence levels (none/low/medium/high) and report status. Filter parity with the app's detections view: source, confidence, asset status/type, brand, liveness, watchlist, reported, country, and deleted items.",
|
|
161
|
+
usage: "chainpatrol detections list --org <slug> [filters]",
|
|
162
|
+
options: [
|
|
163
|
+
"--org <slug> Organization slug",
|
|
164
|
+
"--limit <n> Page size 1-100 (default 50)",
|
|
165
|
+
"--cursor <n> Pagination cursor",
|
|
166
|
+
"--search <q> Search by threat content",
|
|
167
|
+
"--source <list> Comma list of detection source keys",
|
|
168
|
+
"--confidence <list> Comma list: none|low|medium|high",
|
|
169
|
+
"--asset-status <list> Comma list: BLOCKED|ALLOWED|UNKNOWN",
|
|
170
|
+
"--asset-type <list> Comma list of asset types",
|
|
171
|
+
"--brand <ids> Comma list of brand IDs",
|
|
172
|
+
"--liveness <list> Comma list: ALIVE|DEAD|UNKNOWN",
|
|
173
|
+
"--watchlist <list> Comma list: ENABLED|DISABLED",
|
|
174
|
+
"--reported <list> Comma list: reported|not_reported",
|
|
175
|
+
"--country-code <list> Comma list of 2-letter ISO country codes (e.g. US,GB)",
|
|
176
|
+
"--only-deleted Return only soft-deleted detections. Without this flag the endpoint returns both deleted and non-deleted (existing public-API behavior).",
|
|
177
|
+
"--from <iso> Start date (ISO 8601)",
|
|
178
|
+
"--to <iso> End date (ISO 8601)"
|
|
179
|
+
],
|
|
180
|
+
examples: [
|
|
181
|
+
"chainpatrol detections list --org acme --confidence medium,high",
|
|
182
|
+
"chainpatrol detections list --org acme --source twitter --liveness ALIVE",
|
|
183
|
+
"chainpatrol detections list --org acme --reported not_reported --watchlist ENABLED",
|
|
184
|
+
"chainpatrol detections list --org acme --brand 12,34 --country-code US,GB"
|
|
185
|
+
]
|
|
186
|
+
},
|
|
141
187
|
"detections healthcheck": {
|
|
142
188
|
description: "Run a health check across all detection configs for an org.",
|
|
143
189
|
usage: "chainpatrol detections healthcheck --org <slug> [options]",
|
|
@@ -207,12 +253,28 @@ var HELP = {
|
|
|
207
253
|
},
|
|
208
254
|
metrics: {
|
|
209
255
|
description: "Query organization metrics and breakdowns.",
|
|
210
|
-
usage: "chainpatrol metrics <summary|found|breakdown>",
|
|
256
|
+
usage: "chainpatrol metrics <summary|found|breakdown|organization>",
|
|
211
257
|
options: ["--org <slug> Organization slug"],
|
|
212
258
|
examples: [
|
|
213
259
|
"chainpatrol metrics summary --org acme --this-week",
|
|
214
260
|
"chainpatrol metrics found --org acme --from 2025-01-01 --to 2025-02-01",
|
|
215
|
-
"chainpatrol metrics breakdown --org acme --by day --this-week"
|
|
261
|
+
"chainpatrol metrics breakdown --org acme --by day --this-week",
|
|
262
|
+
"chainpatrol metrics organization --org acme --from 2025-01-01 --to 2025-02-01"
|
|
263
|
+
]
|
|
264
|
+
},
|
|
265
|
+
"metrics organization": {
|
|
266
|
+
description: "Get organization metrics via the documented GET /organization/metrics endpoint. Works with both API key auth (org derived from key) and session auth (pass --org).",
|
|
267
|
+
usage: "chainpatrol metrics organization [--org <slug>] [--from ISO --to ISO]",
|
|
268
|
+
options: [
|
|
269
|
+
"--org <slug> Organization slug (omit when using an API key)",
|
|
270
|
+
"--brand-slug <slug> Filter by brand slug (requires brands-metrics flag)",
|
|
271
|
+
"--from <iso> Start date (ISO 8601, e.g. 2026-01-01)",
|
|
272
|
+
"--to <iso> End date (ISO 8601)"
|
|
273
|
+
],
|
|
274
|
+
examples: [
|
|
275
|
+
"chainpatrol metrics organization --org acme",
|
|
276
|
+
"chainpatrol metrics organization --org acme --from 2026-01-01 --to 2026-02-01",
|
|
277
|
+
"CHAINPATROL_API_KEY=... chainpatrol metrics organization --json"
|
|
216
278
|
]
|
|
217
279
|
},
|
|
218
280
|
"metrics summary": {
|
|
@@ -248,11 +310,25 @@ var HELP = {
|
|
|
248
310
|
]
|
|
249
311
|
},
|
|
250
312
|
reports: {
|
|
251
|
-
description: "Create and
|
|
252
|
-
usage: "chainpatrol reports <create|list>",
|
|
313
|
+
description: "Create, list, and search reports from the terminal.",
|
|
314
|
+
usage: "chainpatrol reports <create|list|search>",
|
|
253
315
|
examples: [
|
|
254
316
|
'chainpatrol reports create --org acme --title "Phish" --asset "https://bad.site:BLOCKED"',
|
|
255
|
-
"chainpatrol reports list --org acme --limit 5"
|
|
317
|
+
"chainpatrol reports list --org acme --limit 5",
|
|
318
|
+
"chainpatrol reports search https://bad.site"
|
|
319
|
+
]
|
|
320
|
+
},
|
|
321
|
+
"reports search": {
|
|
322
|
+
description: "Search existing reports in your organization by asset contents. Useful to check for an existing report before creating a duplicate.",
|
|
323
|
+
usage: "chainpatrol reports search <content> [<content> ...]",
|
|
324
|
+
options: [
|
|
325
|
+
"--asset <content> Asset content (repeatable; alternative to positional args)",
|
|
326
|
+
"--reported-by-customer Match only customer-submitted reports",
|
|
327
|
+
"--no-reported-by-customer Match only non-customer reports"
|
|
328
|
+
],
|
|
329
|
+
examples: [
|
|
330
|
+
"chainpatrol reports search https://bad.site",
|
|
331
|
+
"chainpatrol reports search https://a.site https://b.site --reported-by-customer"
|
|
256
332
|
]
|
|
257
333
|
},
|
|
258
334
|
"reports create": {
|
|
@@ -275,16 +351,34 @@ var HELP = {
|
|
|
275
351
|
]
|
|
276
352
|
},
|
|
277
353
|
"reports list": {
|
|
278
|
-
description: "List recent reports for an organization.",
|
|
279
|
-
usage: "chainpatrol reports list --org <slug> [
|
|
354
|
+
description: "List recent reports for an organization with the same level of filtering as the app's Reports view.",
|
|
355
|
+
usage: "chainpatrol reports list --org <slug> [filters]",
|
|
280
356
|
options: [
|
|
281
|
-
"--org <slug>
|
|
282
|
-
"--limit <n>
|
|
283
|
-
"--cursor <id>
|
|
284
|
-
"--status <s>
|
|
285
|
-
"--search <q>
|
|
286
|
-
"--
|
|
287
|
-
"--
|
|
357
|
+
"--org <slug> Organization slug",
|
|
358
|
+
"--limit <n> Page size (1-20)",
|
|
359
|
+
"--cursor <id> Pagination cursor",
|
|
360
|
+
"--status <s> Filter by report status: TODO|IN_PROGRESS|CLOSED",
|
|
361
|
+
"--search <q> Search reports by title/description",
|
|
362
|
+
"--reporter-query <q> Search reports by reporter name (legacy)",
|
|
363
|
+
"--reported-by-customer Show only customer-submitted reports",
|
|
364
|
+
"--no-reported-by-customer Show only non-customer reports",
|
|
365
|
+
"--exclude-automation Exclude reports submitted by automation",
|
|
366
|
+
"--only-rejected Only reports whose latest review decision was REJECT",
|
|
367
|
+
"--review-status <list> Comma list: APPROVE|REJECT|SKIP|ESCALATE",
|
|
368
|
+
"--asset-type <list> Comma list of asset types (URL,TWITTER,...)",
|
|
369
|
+
"--brand <ids> Comma list of brand IDs",
|
|
370
|
+
"--country-code <list> Comma list of 2-letter ISO country codes",
|
|
371
|
+
"--reviewed-by-user-id <n> Only reports reviewed by a specific user ID",
|
|
372
|
+
"--from <iso> Filter by Report.createdAt >= ISO date",
|
|
373
|
+
"--to <iso> Filter by Report.createdAt <= ISO date",
|
|
374
|
+
"--updated-from <iso> Filter by Report.updatedAt >= ISO date",
|
|
375
|
+
"--updated-to <iso> Filter by Report.updatedAt <= ISO date"
|
|
376
|
+
],
|
|
377
|
+
examples: [
|
|
378
|
+
"chainpatrol reports list --org acme --status TODO --review-status REJECT",
|
|
379
|
+
"chainpatrol reports list --org acme --exclude-automation --reported-by-customer",
|
|
380
|
+
"chainpatrol reports list --org acme --from 2026-05-01 --updated-from 2026-05-10",
|
|
381
|
+
"chainpatrol reports list --org acme --brand 12,34 --country-code US,GB"
|
|
288
382
|
]
|
|
289
383
|
},
|
|
290
384
|
queues: {
|
|
@@ -295,6 +389,71 @@ var HELP = {
|
|
|
295
389
|
"chainpatrol queues snapshot --all"
|
|
296
390
|
]
|
|
297
391
|
},
|
|
392
|
+
threats: {
|
|
393
|
+
description: "List confirmed threats blocked by ChainPatrol.",
|
|
394
|
+
usage: "chainpatrol threats list [filters]",
|
|
395
|
+
examples: [
|
|
396
|
+
"chainpatrol threats list",
|
|
397
|
+
"chainpatrol threats list --from 2026-05-01 --asset-type URL"
|
|
398
|
+
]
|
|
399
|
+
},
|
|
400
|
+
"threats list": {
|
|
401
|
+
description: "List threats blocked by ChainPatrol. Org is derived from your API key. Defaults to the last 1 day. Use --from and --to to widen the window.",
|
|
402
|
+
usage: "chainpatrol threats list [filters]",
|
|
403
|
+
options: [
|
|
404
|
+
"--query <text> Search threat content (substring)",
|
|
405
|
+
"--from <iso> Start date (YYYY-MM-DD)",
|
|
406
|
+
"--to <iso> End date (YYYY-MM-DD)",
|
|
407
|
+
"--asset-type <list> Comma list (URL,TWITTER,TELEGRAM,...)",
|
|
408
|
+
"--sort-by <key> Sort key (e.g. blockedAt)",
|
|
409
|
+
"--sort-direction <dir> asc|desc",
|
|
410
|
+
"--per-page <n> Page size 1-100 (default 10)",
|
|
411
|
+
"--next-page <cursor> Cursor returned from a previous response"
|
|
412
|
+
],
|
|
413
|
+
examples: [
|
|
414
|
+
"chainpatrol threats list --from 2026-05-01 --asset-type URL",
|
|
415
|
+
"CHAINPATROL_API_KEY=... chainpatrol threats list --json"
|
|
416
|
+
]
|
|
417
|
+
},
|
|
418
|
+
takedowns: {
|
|
419
|
+
description: "List individual takedown records for an organization.",
|
|
420
|
+
usage: "chainpatrol takedowns list [--org <slug>] [filters]",
|
|
421
|
+
examples: [
|
|
422
|
+
"chainpatrol takedowns list --org acme",
|
|
423
|
+
"chainpatrol takedowns list --org acme --takedown-status TODO,IN_PROGRESS",
|
|
424
|
+
"chainpatrol takedowns list --org acme --from 2026-01-01 --to 2026-02-01 --per-page 50"
|
|
425
|
+
]
|
|
426
|
+
},
|
|
427
|
+
"takedowns list": {
|
|
428
|
+
description: "List takedowns for an organization with the same level of filtering as the app's Takedowns view. Defaults to takedowns updated in the last 30 days. Works with both API key auth (org derived from key) and session auth (pass --org).",
|
|
429
|
+
usage: "chainpatrol takedowns list [--org <slug>] [filters]",
|
|
430
|
+
options: [
|
|
431
|
+
"--org <slug> Organization slug (omit when using an API key)",
|
|
432
|
+
"--query <text> Search asset content (substring match)",
|
|
433
|
+
"--from <iso> Filter by Takedown.updatedAt >= ISO date",
|
|
434
|
+
"--to <iso> Filter by Takedown.updatedAt <= ISO date",
|
|
435
|
+
"--started-from <iso> Filter by `started at` >= ISO date (earliest IN_PROGRESS event)",
|
|
436
|
+
"--started-to <iso> Filter by `started at` <= ISO date",
|
|
437
|
+
"--asset-type <list> Comma list (URL,TWITTER,TELEGRAM,...)",
|
|
438
|
+
"--takedown-status <list> Comma list (TODO,IN_PROGRESS,COMPLETED,CANCELLED,PENDING_INPUT,...)",
|
|
439
|
+
"--liveness-status <list> Comma list (ALIVE,DEAD,UNKNOWN)",
|
|
440
|
+
"--brand <ids> Comma list of brand IDs",
|
|
441
|
+
"--assignee <ids> Comma list of assignee user IDs",
|
|
442
|
+
"--hide-automated-takedowns Hide takedowns handled by the platform-takedown automation",
|
|
443
|
+
"--hide-automated-liveness-checks Hide takedowns whose asset is checked for liveness automatically",
|
|
444
|
+
"--sort-by <key> Sort key: updatedAt|createdAt|takedownStatus|takedownUpdatedAt|assigneeId|brandId",
|
|
445
|
+
"--sort-direction <dir> asc|desc (default desc)",
|
|
446
|
+
"--per-page <n> Page size 1-100 (default 10; --limit also accepted)",
|
|
447
|
+
"--next-page <cursor> Cursor returned from a previous response"
|
|
448
|
+
],
|
|
449
|
+
examples: [
|
|
450
|
+
"chainpatrol takedowns list --org acme --takedown-status TODO,IN_PROGRESS",
|
|
451
|
+
"chainpatrol takedowns list --org acme --asset-type URL --liveness-status ALIVE",
|
|
452
|
+
"chainpatrol takedowns list --org acme --brand 12,34 --assignee 7",
|
|
453
|
+
"chainpatrol takedowns list --org acme --started-from 2026-04-01 --hide-automated-takedowns",
|
|
454
|
+
"CHAINPATROL_API_KEY=... chainpatrol takedowns list --json"
|
|
455
|
+
]
|
|
456
|
+
},
|
|
298
457
|
"queues snapshot": {
|
|
299
458
|
description: "Snapshot pending review proposals and open takedowns.",
|
|
300
459
|
usage: "chainpatrol queues snapshot [--org <slug>|--all] [--window-hours <n>]",
|
|
@@ -305,13 +464,43 @@ var HELP = {
|
|
|
305
464
|
]
|
|
306
465
|
},
|
|
307
466
|
orgs: {
|
|
308
|
-
description: "List organizations accessible to you
|
|
309
|
-
usage: "chainpatrol orgs list
|
|
467
|
+
description: "List organizations, their assets, and asset groups. Top-level `orgs list` lists organizations accessible to you; the nested subcommands operate on the org tied to your API key.",
|
|
468
|
+
usage: "chainpatrol orgs <list|assets list|asset-groups list>",
|
|
310
469
|
examples: [
|
|
311
470
|
"chainpatrol orgs list",
|
|
312
|
-
"chainpatrol orgs list --
|
|
471
|
+
"chainpatrol orgs assets list --asset-type URL",
|
|
472
|
+
"chainpatrol orgs asset-groups list"
|
|
473
|
+
]
|
|
474
|
+
},
|
|
475
|
+
"orgs assets": {
|
|
476
|
+
description: "List assets in your organization's allowlist.",
|
|
477
|
+
usage: "chainpatrol orgs assets list [filters]"
|
|
478
|
+
},
|
|
479
|
+
"orgs assets list": {
|
|
480
|
+
description: "List assets belonging to your organization's allowlist. Org is derived from your API key. Supports filtering by type, group, and search query.",
|
|
481
|
+
usage: "chainpatrol orgs assets list [filters]",
|
|
482
|
+
options: [
|
|
483
|
+
"--asset-type <type> Filter by asset type (URL, ADDRESS, ...)",
|
|
484
|
+
"--type <type> Alias for --asset-type",
|
|
485
|
+
"--group-id <n> Filter by group ID. Use -1 for ungrouped assets only",
|
|
486
|
+
"--query <text> Search asset content (substring)",
|
|
487
|
+
"--per-page <n> Page size 1-1000 (default 100; --limit also accepted)",
|
|
488
|
+
"--next-page <cursor> Cursor returned from a previous response"
|
|
489
|
+
],
|
|
490
|
+
examples: [
|
|
491
|
+
"chainpatrol orgs assets list --asset-type URL",
|
|
492
|
+
"chainpatrol orgs assets list --group-id 12 --per-page 250 --output csv"
|
|
313
493
|
]
|
|
314
494
|
},
|
|
495
|
+
"orgs asset-groups": {
|
|
496
|
+
description: "List asset groups in your organization.",
|
|
497
|
+
usage: "chainpatrol orgs asset-groups list"
|
|
498
|
+
},
|
|
499
|
+
"orgs asset-groups list": {
|
|
500
|
+
description: "List asset groups belonging to your organization with per-group asset counts. Org is derived from your API key.",
|
|
501
|
+
usage: "chainpatrol orgs asset-groups list",
|
|
502
|
+
examples: ["chainpatrol orgs asset-groups list --output csv"]
|
|
503
|
+
},
|
|
315
504
|
"orgs list": {
|
|
316
505
|
description: "List organizations with their subscription status and per-service active/automated flags. All filters compose with AND.",
|
|
317
506
|
usage: "chainpatrol orgs list [filters]",
|
|
@@ -390,6 +579,15 @@ var HELP = {
|
|
|
390
579
|
description: "Output a shell completion script.",
|
|
391
580
|
usage: "chainpatrol completions <zsh|bash>",
|
|
392
581
|
examples: ["chainpatrol completions zsh > _chainpatrol"]
|
|
582
|
+
},
|
|
583
|
+
whoami: {
|
|
584
|
+
description: "Show the current authenticated identity. With an API key, validates the key and reports the bound organization. With a session token, returns the logged-in user.",
|
|
585
|
+
usage: "chainpatrol whoami",
|
|
586
|
+
examples: [
|
|
587
|
+
"chainpatrol whoami",
|
|
588
|
+
"chainpatrol whoami --json",
|
|
589
|
+
"CHAINPATROL_API_KEY=... chainpatrol whoami"
|
|
590
|
+
]
|
|
393
591
|
}
|
|
394
592
|
};
|
|
395
593
|
function getCommandHelp(command2, subcommand2) {
|
|
@@ -414,14 +612,17 @@ function getTopLevelHelp() {
|
|
|
414
612
|
" Commands",
|
|
415
613
|
" login Authenticate with ChainPatrol",
|
|
416
614
|
" logout Clear stored credentials",
|
|
417
|
-
"
|
|
615
|
+
" whoami Show the current authenticated identity",
|
|
616
|
+
" asset Check or list assets in the global ChainPatrol blocklist",
|
|
418
617
|
" configs Manage detection configs",
|
|
419
|
-
" detections Validate, run, update detection configs",
|
|
618
|
+
" detections Validate, run, list, update detection configs and results",
|
|
420
619
|
" healthchecks List and run organization healthchecks",
|
|
421
620
|
" metrics Query organization metrics and breakdowns",
|
|
422
|
-
" reports Create and
|
|
621
|
+
" reports Create, list, and search reports from terminal",
|
|
423
622
|
" queues Snapshot operations review/takedown queues",
|
|
424
|
-
"
|
|
623
|
+
" takedowns List individual takedown records",
|
|
624
|
+
" threats List confirmed threats blocked by ChainPatrol",
|
|
625
|
+
" orgs List organizations, org assets, and asset groups",
|
|
425
626
|
" presets Run saved workflows for common jobs",
|
|
426
627
|
" setup Install Claude Code skill and shell completions",
|
|
427
628
|
" uninstall Remove Claude Code skill and shell completions",
|
|
@@ -592,11 +793,14 @@ var COMMANDS = [
|
|
|
592
793
|
"metrics",
|
|
593
794
|
"reports",
|
|
594
795
|
"queues",
|
|
796
|
+
"takedowns",
|
|
797
|
+
"threats",
|
|
595
798
|
"orgs",
|
|
596
799
|
"presets",
|
|
597
800
|
"setup",
|
|
598
801
|
"uninstall",
|
|
599
802
|
"completions",
|
|
803
|
+
"whoami",
|
|
600
804
|
"help"
|
|
601
805
|
];
|
|
602
806
|
function levenshtein(a, b) {
|
|
@@ -675,6 +879,35 @@ ${getTopLevelHelp()}
|
|
|
675
879
|
serviceAutomated: { type: "string" },
|
|
676
880
|
serviceManual: { type: "string" },
|
|
677
881
|
query: { type: "string" },
|
|
882
|
+
assetType: { type: "string" },
|
|
883
|
+
takedownStatus: { type: "string" },
|
|
884
|
+
livenessStatus: { type: "string" },
|
|
885
|
+
nextPage: { type: "string" },
|
|
886
|
+
sortBy: { type: "string" },
|
|
887
|
+
sortDirection: { type: "string" },
|
|
888
|
+
perPage: { type: "number" },
|
|
889
|
+
brandSlug: { type: "string" },
|
|
890
|
+
type: { type: "string" },
|
|
891
|
+
groupId: { type: "number" },
|
|
892
|
+
confidence: { type: "string" },
|
|
893
|
+
assetStatus: { type: "string" },
|
|
894
|
+
liveness: { type: "string" },
|
|
895
|
+
watchlist: { type: "string" },
|
|
896
|
+
reported: { type: "string" },
|
|
897
|
+
countryCode: { type: "string" },
|
|
898
|
+
onlyDeleted: { type: "boolean", default: false },
|
|
899
|
+
assignee: { type: "string" },
|
|
900
|
+
startedFrom: { type: "string" },
|
|
901
|
+
startedTo: { type: "string" },
|
|
902
|
+
hideAutomatedTakedowns: { type: "boolean" },
|
|
903
|
+
hideAutomatedLivenessChecks: { type: "boolean" },
|
|
904
|
+
reporterQuery: { type: "string" },
|
|
905
|
+
excludeAutomation: { type: "boolean" },
|
|
906
|
+
onlyRejected: { type: "boolean" },
|
|
907
|
+
reviewStatus: { type: "string" },
|
|
908
|
+
reviewedByUserId: { type: "number" },
|
|
909
|
+
updatedFrom: { type: "string" },
|
|
910
|
+
updatedTo: { type: "string" },
|
|
678
911
|
help: { type: "boolean", shortFlag: "h" },
|
|
679
912
|
version: { type: "boolean", shortFlag: "V" },
|
|
680
913
|
quiet: { type: "boolean", default: false, shortFlag: "q" },
|
|
@@ -765,26 +998,42 @@ function getConfigPatchFromSetFlags() {
|
|
|
765
998
|
return patch;
|
|
766
999
|
}
|
|
767
1000
|
function parseBrandIds() {
|
|
768
|
-
|
|
769
|
-
const values = cli.flags.brand.split(",").map((item) => item.trim()).filter(Boolean);
|
|
770
|
-
const ids = values.map((value) => Number(value)).filter((value) => !Number.isNaN(value));
|
|
771
|
-
return ids.length > 0 ? ids : void 0;
|
|
1001
|
+
return parseIntList(cli.flags.brand, "brand");
|
|
772
1002
|
}
|
|
773
1003
|
function parseAssetInputs() {
|
|
774
1004
|
return getRepeatedFlag("asset");
|
|
775
1005
|
}
|
|
1006
|
+
function parseCsvList(value) {
|
|
1007
|
+
if (!value) return void 0;
|
|
1008
|
+
const items = value.split(",").map((item) => item.trim()).filter(Boolean);
|
|
1009
|
+
return items.length > 0 ? items : void 0;
|
|
1010
|
+
}
|
|
1011
|
+
function parseIntList(value, flagName) {
|
|
1012
|
+
const items = parseCsvList(value);
|
|
1013
|
+
if (!items) return void 0;
|
|
1014
|
+
const parsed = items.map((item) => {
|
|
1015
|
+
const n = Number(item);
|
|
1016
|
+
if (!Number.isInteger(n) || n <= 0) {
|
|
1017
|
+
throw new Error(
|
|
1018
|
+
`--${flagName} expects positive integers; got '${item}'. Use comma-separated IDs (e.g. --${flagName} 12,34).`
|
|
1019
|
+
);
|
|
1020
|
+
}
|
|
1021
|
+
return n;
|
|
1022
|
+
});
|
|
1023
|
+
return parsed;
|
|
1024
|
+
}
|
|
776
1025
|
function parseAttachmentUrls() {
|
|
777
1026
|
const values = getRepeatedFlag("attachment-url").filter(Boolean);
|
|
778
1027
|
return values.length > 0 ? values : void 0;
|
|
779
1028
|
}
|
|
780
1029
|
async function handleConfigsList(org) {
|
|
781
1030
|
if (jsonMode) {
|
|
782
|
-
const { listConfigsJson } = await import("./list-json-
|
|
1031
|
+
const { listConfigsJson } = await import("./list-json-T2Z7NV7G.js");
|
|
783
1032
|
await listConfigsJson({ org });
|
|
784
1033
|
return;
|
|
785
1034
|
}
|
|
786
1035
|
const { render } = await import("ink");
|
|
787
|
-
const { default: ConfigsList } = await import("./list-
|
|
1036
|
+
const { default: ConfigsList } = await import("./list-IYJBKE2F.js");
|
|
788
1037
|
const { default: React } = await import("react");
|
|
789
1038
|
render(React.createElement(ConfigsList, { org }));
|
|
790
1039
|
}
|
|
@@ -884,7 +1133,7 @@ async function main() {
|
|
|
884
1133
|
const positionals = cli.input.slice(2);
|
|
885
1134
|
const flagAssets = parseAssetInputs();
|
|
886
1135
|
const contents = [...positionals, ...flagAssets];
|
|
887
|
-
const { runAssetCheck } = await import("./check-
|
|
1136
|
+
const { runAssetCheck } = await import("./check-P5JJJNEX.js");
|
|
888
1137
|
await runAssetCheck({
|
|
889
1138
|
contents,
|
|
890
1139
|
json: jsonMode,
|
|
@@ -893,15 +1142,29 @@ async function main() {
|
|
|
893
1142
|
});
|
|
894
1143
|
break;
|
|
895
1144
|
}
|
|
896
|
-
|
|
1145
|
+
if (subcommand === "list") {
|
|
1146
|
+
const { runAssetList } = await import("./list-PBAXQSL5.js");
|
|
1147
|
+
await runAssetList({
|
|
1148
|
+
type: cli.flags.type ?? cli.flags.assetType,
|
|
1149
|
+
status: cli.flags.assetStatus ?? cli.flags.status,
|
|
1150
|
+
from: cli.flags.from,
|
|
1151
|
+
to: cli.flags.to,
|
|
1152
|
+
perPage: cli.flags.perPage ?? cli.flags.limit,
|
|
1153
|
+
nextPage: cli.flags.nextPage,
|
|
1154
|
+
json: jsonMode,
|
|
1155
|
+
outputFormat: cliContext.outputFormat
|
|
1156
|
+
});
|
|
1157
|
+
break;
|
|
1158
|
+
}
|
|
1159
|
+
const hint = subcommand ? suggest(subcommand, ["check", "list"]) : null;
|
|
897
1160
|
throw new Error(
|
|
898
|
-
subcommand ? `Unknown subcommand: asset ${subcommand}${hint ? `. Did you mean "asset ${hint}"?` : ""}` : "Usage: chainpatrol asset check
|
|
1161
|
+
subcommand ? `Unknown subcommand: asset ${subcommand}${hint ? `. Did you mean "asset ${hint}"?` : ""}` : "Usage: chainpatrol asset <check|list>"
|
|
899
1162
|
);
|
|
900
1163
|
}
|
|
901
1164
|
case "detections": {
|
|
902
1165
|
const org = await resolveOrg();
|
|
903
1166
|
if (subcommand === "healthcheck") {
|
|
904
|
-
const { runDetectionsHealthcheck } = await import("./healthcheck-
|
|
1167
|
+
const { runDetectionsHealthcheck } = await import("./healthcheck-HZYEIIOR.js");
|
|
905
1168
|
await runDetectionsHealthcheck({
|
|
906
1169
|
org,
|
|
907
1170
|
source: cli.flags.source,
|
|
@@ -916,7 +1179,7 @@ async function main() {
|
|
|
916
1179
|
break;
|
|
917
1180
|
}
|
|
918
1181
|
if (subcommand === "validate") {
|
|
919
|
-
const { runDetectionsValidate } = await import("./validate-
|
|
1182
|
+
const { runDetectionsValidate } = await import("./validate-SM5DD7I2.js");
|
|
920
1183
|
await runDetectionsValidate({
|
|
921
1184
|
org,
|
|
922
1185
|
source: cli.flags.source,
|
|
@@ -931,7 +1194,7 @@ async function main() {
|
|
|
931
1194
|
break;
|
|
932
1195
|
}
|
|
933
1196
|
if (subcommand === "drift") {
|
|
934
|
-
const { runDetectionsDrift } = await import("./drift-
|
|
1197
|
+
const { runDetectionsDrift } = await import("./drift-T74V2C3J.js");
|
|
935
1198
|
await runDetectionsDrift({
|
|
936
1199
|
org,
|
|
937
1200
|
source: cli.flags.source,
|
|
@@ -945,7 +1208,7 @@ async function main() {
|
|
|
945
1208
|
break;
|
|
946
1209
|
}
|
|
947
1210
|
if (subcommand === "run") {
|
|
948
|
-
const { runDetectionsRun } = await import("./run-
|
|
1211
|
+
const { runDetectionsRun } = await import("./run-MSO6IXEV.js");
|
|
949
1212
|
await runDetectionsRun({
|
|
950
1213
|
org,
|
|
951
1214
|
configId: cli.flags.configId,
|
|
@@ -958,13 +1221,37 @@ async function main() {
|
|
|
958
1221
|
});
|
|
959
1222
|
break;
|
|
960
1223
|
}
|
|
1224
|
+
if (subcommand === "list") {
|
|
1225
|
+
const { runDetectionsList } = await import("./list-QUFY4IP7.js");
|
|
1226
|
+
await runDetectionsList({
|
|
1227
|
+
org,
|
|
1228
|
+
cursor: cli.flags.cursor,
|
|
1229
|
+
limit: cli.flags.limit,
|
|
1230
|
+
query: cli.flags.search ?? cli.flags.query,
|
|
1231
|
+
from: cli.flags.from,
|
|
1232
|
+
to: cli.flags.to,
|
|
1233
|
+
sources: parseCsvList(cli.flags.source),
|
|
1234
|
+
confidence: parseCsvList(cli.flags.confidence),
|
|
1235
|
+
assetStatus: parseCsvList(cli.flags.assetStatus),
|
|
1236
|
+
assetType: parseCsvList(cli.flags.assetType),
|
|
1237
|
+
brandIds: parseBrandIds(),
|
|
1238
|
+
liveness: parseCsvList(cli.flags.liveness),
|
|
1239
|
+
watchlist: parseCsvList(cli.flags.watchlist),
|
|
1240
|
+
reported: parseCsvList(cli.flags.reported),
|
|
1241
|
+
countryCodes: parseCsvList(cli.flags.countryCode),
|
|
1242
|
+
onlyDeleted: cli.flags.onlyDeleted,
|
|
1243
|
+
json: jsonMode,
|
|
1244
|
+
outputFormat: cliContext.outputFormat
|
|
1245
|
+
});
|
|
1246
|
+
break;
|
|
1247
|
+
}
|
|
961
1248
|
if (subcommand === "configs") {
|
|
962
1249
|
if (action === "list") {
|
|
963
1250
|
await handleConfigsList(org);
|
|
964
1251
|
break;
|
|
965
1252
|
}
|
|
966
1253
|
if (action === "run") {
|
|
967
|
-
const { runDetectionsRun } = await import("./run-
|
|
1254
|
+
const { runDetectionsRun } = await import("./run-MSO6IXEV.js");
|
|
968
1255
|
await runDetectionsRun({
|
|
969
1256
|
org,
|
|
970
1257
|
configId: cli.flags.configId,
|
|
@@ -982,7 +1269,7 @@ async function main() {
|
|
|
982
1269
|
throw new Error("detections configs update requires --config-id");
|
|
983
1270
|
}
|
|
984
1271
|
const configPatch = getConfigPatchFromSetFlags();
|
|
985
|
-
const { runDetectionsConfigsUpdate } = await import("./configs-update-
|
|
1272
|
+
const { runDetectionsConfigsUpdate } = await import("./configs-update-3ZVXGADV.js");
|
|
986
1273
|
await runDetectionsConfigsUpdate({
|
|
987
1274
|
org,
|
|
988
1275
|
configId: cli.flags.configId,
|
|
@@ -1001,15 +1288,35 @@ async function main() {
|
|
|
1001
1288
|
break;
|
|
1002
1289
|
}
|
|
1003
1290
|
}
|
|
1004
|
-
const hint = subcommand ? suggest(subcommand, [
|
|
1291
|
+
const hint = subcommand ? suggest(subcommand, [
|
|
1292
|
+
"healthcheck",
|
|
1293
|
+
"validate",
|
|
1294
|
+
"drift",
|
|
1295
|
+
"run",
|
|
1296
|
+
"list",
|
|
1297
|
+
"configs"
|
|
1298
|
+
]) : null;
|
|
1005
1299
|
throw new Error(
|
|
1006
|
-
subcommand ? `Unknown subcommand: detections ${subcommand}${hint ? `. Did you mean "detections ${hint}"?` : ""}` : "Usage: chainpatrol detections <healthcheck|validate|drift|run|configs>"
|
|
1300
|
+
subcommand ? `Unknown subcommand: detections ${subcommand}${hint ? `. Did you mean "detections ${hint}"?` : ""}` : "Usage: chainpatrol detections <healthcheck|validate|drift|run|list|configs>"
|
|
1007
1301
|
);
|
|
1008
1302
|
}
|
|
1009
1303
|
case "metrics": {
|
|
1304
|
+
if (subcommand === "organization" || subcommand === "org") {
|
|
1305
|
+
const org2 = await tryResolveOrg();
|
|
1306
|
+
const { runMetricsOrganization } = await import("./organization-IIIOSTHF.js");
|
|
1307
|
+
await runMetricsOrganization({
|
|
1308
|
+
org: org2,
|
|
1309
|
+
brandSlug: cli.flags.brandSlug,
|
|
1310
|
+
from: cli.flags.from,
|
|
1311
|
+
to: cli.flags.to,
|
|
1312
|
+
json: jsonMode,
|
|
1313
|
+
outputFormat: cliContext.outputFormat
|
|
1314
|
+
});
|
|
1315
|
+
break;
|
|
1316
|
+
}
|
|
1010
1317
|
const org = await resolveOrg();
|
|
1011
1318
|
if (subcommand === "summary") {
|
|
1012
|
-
const { runMetricsSummary } = await import("./summary-
|
|
1319
|
+
const { runMetricsSummary } = await import("./summary-Y2LG6UJM.js");
|
|
1013
1320
|
await runMetricsSummary({
|
|
1014
1321
|
org,
|
|
1015
1322
|
from: cli.flags.from,
|
|
@@ -1021,7 +1328,7 @@ async function main() {
|
|
|
1021
1328
|
break;
|
|
1022
1329
|
}
|
|
1023
1330
|
if (subcommand === "found") {
|
|
1024
|
-
const { runMetricsFound } = await import("./found-
|
|
1331
|
+
const { runMetricsFound } = await import("./found-EVXJZGYX.js");
|
|
1025
1332
|
await runMetricsFound({
|
|
1026
1333
|
org,
|
|
1027
1334
|
from: cli.flags.from,
|
|
@@ -1038,7 +1345,7 @@ async function main() {
|
|
|
1038
1345
|
if (!by || !["day", "type", "brand"].includes(by)) {
|
|
1039
1346
|
throw new Error("metrics breakdown requires --by <day|type|brand>");
|
|
1040
1347
|
}
|
|
1041
|
-
const { runMetricsBreakdown } = await import("./breakdown-
|
|
1348
|
+
const { runMetricsBreakdown } = await import("./breakdown-KCTKQNDY.js");
|
|
1042
1349
|
await runMetricsBreakdown({
|
|
1043
1350
|
org,
|
|
1044
1351
|
by,
|
|
@@ -1050,22 +1357,34 @@ async function main() {
|
|
|
1050
1357
|
});
|
|
1051
1358
|
break;
|
|
1052
1359
|
}
|
|
1053
|
-
const hint = subcommand ? suggest(subcommand, ["summary", "found", "breakdown"]) : null;
|
|
1360
|
+
const hint = subcommand ? suggest(subcommand, ["summary", "found", "breakdown", "organization"]) : null;
|
|
1054
1361
|
throw new Error(
|
|
1055
|
-
subcommand ? `Unknown subcommand: metrics ${subcommand}${hint ? `. Did you mean "metrics ${hint}"?` : ""}` : "Usage: chainpatrol metrics <summary|found|breakdown>"
|
|
1362
|
+
subcommand ? `Unknown subcommand: metrics ${subcommand}${hint ? `. Did you mean "metrics ${hint}"?` : ""}` : "Usage: chainpatrol metrics <summary|found|breakdown|organization>"
|
|
1056
1363
|
);
|
|
1057
1364
|
}
|
|
1058
1365
|
case "reports": {
|
|
1059
1366
|
if (subcommand === "list") {
|
|
1060
1367
|
const org = await resolveOrg();
|
|
1061
|
-
const { runReportsList } = await import("./list-
|
|
1368
|
+
const { runReportsList } = await import("./list-ZFPML3ZR.js");
|
|
1062
1369
|
await runReportsList({
|
|
1063
1370
|
org,
|
|
1064
1371
|
limit: cli.flags.limit,
|
|
1065
1372
|
cursor: cli.flags.cursor,
|
|
1066
1373
|
status: cli.flags.status,
|
|
1067
1374
|
searchQuery: cli.flags.search,
|
|
1375
|
+
reporterQuery: cli.flags.reporterQuery,
|
|
1068
1376
|
reportedByCustomer: cli.flags.reportedByCustomer,
|
|
1377
|
+
excludeAutomation: cli.flags.excludeAutomation,
|
|
1378
|
+
onlyRejected: cli.flags.onlyRejected,
|
|
1379
|
+
reviewStatuses: parseCsvList(cli.flags.reviewStatus),
|
|
1380
|
+
assetTypes: parseCsvList(cli.flags.assetType),
|
|
1381
|
+
brandIds: parseBrandIds(),
|
|
1382
|
+
countryCodes: parseCsvList(cli.flags.countryCode),
|
|
1383
|
+
reviewedByUserId: cli.flags.reviewedByUserId,
|
|
1384
|
+
from: cli.flags.from,
|
|
1385
|
+
to: cli.flags.to,
|
|
1386
|
+
updatedFrom: cli.flags.updatedFrom,
|
|
1387
|
+
updatedTo: cli.flags.updatedTo,
|
|
1069
1388
|
json: jsonMode,
|
|
1070
1389
|
outputFormat: cliContext.outputFormat,
|
|
1071
1390
|
explain: cliContext.explain
|
|
@@ -1074,7 +1393,7 @@ async function main() {
|
|
|
1074
1393
|
}
|
|
1075
1394
|
if (subcommand === "create") {
|
|
1076
1395
|
const org = await tryResolveOrg();
|
|
1077
|
-
const { runReportsCreate } = await import("./create-
|
|
1396
|
+
const { runReportsCreate } = await import("./create-DFH2G7RH.js");
|
|
1078
1397
|
await runReportsCreate({
|
|
1079
1398
|
org,
|
|
1080
1399
|
title: cli.flags.title,
|
|
@@ -1091,14 +1410,81 @@ async function main() {
|
|
|
1091
1410
|
});
|
|
1092
1411
|
break;
|
|
1093
1412
|
}
|
|
1094
|
-
|
|
1413
|
+
if (subcommand === "search") {
|
|
1414
|
+
const positionals = cli.input.slice(2);
|
|
1415
|
+
const flagAssets = parseAssetInputs();
|
|
1416
|
+
const assetContents = [...positionals, ...flagAssets];
|
|
1417
|
+
const { runReportsSearch } = await import("./search-WPSKQGUS.js");
|
|
1418
|
+
await runReportsSearch({
|
|
1419
|
+
assetContents,
|
|
1420
|
+
reportedByCustomer: cli.flags.reportedByCustomer,
|
|
1421
|
+
json: jsonMode,
|
|
1422
|
+
outputFormat: cliContext.outputFormat
|
|
1423
|
+
});
|
|
1424
|
+
break;
|
|
1425
|
+
}
|
|
1426
|
+
const hint = subcommand ? suggest(subcommand, ["create", "list", "search"]) : null;
|
|
1095
1427
|
throw new Error(
|
|
1096
|
-
subcommand ? `Unknown subcommand: reports ${subcommand}${hint ? `. Did you mean "reports ${hint}"?` : ""}` : "Usage: chainpatrol reports <create|list>"
|
|
1428
|
+
subcommand ? `Unknown subcommand: reports ${subcommand}${hint ? `. Did you mean "reports ${hint}"?` : ""}` : "Usage: chainpatrol reports <create|list|search>"
|
|
1429
|
+
);
|
|
1430
|
+
}
|
|
1431
|
+
case "threats": {
|
|
1432
|
+
if (subcommand === "list") {
|
|
1433
|
+
const { runThreatsList } = await import("./list-YCT6DYDI.js");
|
|
1434
|
+
await runThreatsList({
|
|
1435
|
+
query: cli.flags.query,
|
|
1436
|
+
from: cli.flags.from,
|
|
1437
|
+
to: cli.flags.to,
|
|
1438
|
+
assetType: parseCsvList(cli.flags.assetType),
|
|
1439
|
+
sortBy: cli.flags.sortBy,
|
|
1440
|
+
sortDirection: cli.flags.sortDirection,
|
|
1441
|
+
perPage: cli.flags.perPage ?? cli.flags.limit,
|
|
1442
|
+
nextPage: cli.flags.nextPage,
|
|
1443
|
+
json: jsonMode,
|
|
1444
|
+
outputFormat: cliContext.outputFormat
|
|
1445
|
+
});
|
|
1446
|
+
break;
|
|
1447
|
+
}
|
|
1448
|
+
const hint = subcommand ? suggest(subcommand, ["list"]) : null;
|
|
1449
|
+
throw new Error(
|
|
1450
|
+
subcommand ? `Unknown subcommand: threats ${subcommand}${hint ? `. Did you mean "threats ${hint}"?` : ""}` : "Usage: chainpatrol threats list [filters]"
|
|
1451
|
+
);
|
|
1452
|
+
}
|
|
1453
|
+
case "takedowns": {
|
|
1454
|
+
if (subcommand === "list") {
|
|
1455
|
+
const org = await tryResolveOrg();
|
|
1456
|
+
const { runTakedownsList } = await import("./list-WJQT2XLE.js");
|
|
1457
|
+
await runTakedownsList({
|
|
1458
|
+
org,
|
|
1459
|
+
query: cli.flags.query,
|
|
1460
|
+
from: cli.flags.from,
|
|
1461
|
+
to: cli.flags.to,
|
|
1462
|
+
assetType: parseCsvList(cli.flags.assetType),
|
|
1463
|
+
takedownStatus: parseCsvList(cli.flags.takedownStatus),
|
|
1464
|
+
livenessStatus: parseCsvList(cli.flags.livenessStatus),
|
|
1465
|
+
brandIds: parseBrandIds(),
|
|
1466
|
+
assigneeIds: parseIntList(cli.flags.assignee, "assignee"),
|
|
1467
|
+
startedFrom: cli.flags.startedFrom,
|
|
1468
|
+
startedTo: cli.flags.startedTo,
|
|
1469
|
+
hideAutomatedTakedowns: cli.flags.hideAutomatedTakedowns,
|
|
1470
|
+
hideAutomatedLivenessChecks: cli.flags.hideAutomatedLivenessChecks,
|
|
1471
|
+
sortBy: cli.flags.sortBy,
|
|
1472
|
+
sortDirection: cli.flags.sortDirection,
|
|
1473
|
+
perPage: cli.flags.perPage ?? cli.flags.limit,
|
|
1474
|
+
nextPage: cli.flags.nextPage,
|
|
1475
|
+
json: jsonMode,
|
|
1476
|
+
outputFormat: cliContext.outputFormat
|
|
1477
|
+
});
|
|
1478
|
+
break;
|
|
1479
|
+
}
|
|
1480
|
+
const hint = subcommand ? suggest(subcommand, ["list"]) : null;
|
|
1481
|
+
throw new Error(
|
|
1482
|
+
subcommand ? `Unknown subcommand: takedowns ${subcommand}${hint ? `. Did you mean "takedowns ${hint}"?` : ""}` : "Usage: chainpatrol takedowns list [--org <slug>] [filters]"
|
|
1097
1483
|
);
|
|
1098
1484
|
}
|
|
1099
1485
|
case "queues": {
|
|
1100
1486
|
if (subcommand === "snapshot") {
|
|
1101
|
-
const { runQueuesSnapshot } = await import("./snapshot-
|
|
1487
|
+
const { runQueuesSnapshot } = await import("./snapshot-ZWAHEG64.js");
|
|
1102
1488
|
await runQueuesSnapshot({
|
|
1103
1489
|
org: cli.flags.org,
|
|
1104
1490
|
all: cli.flags.all,
|
|
@@ -1116,7 +1502,7 @@ async function main() {
|
|
|
1116
1502
|
}
|
|
1117
1503
|
case "orgs": {
|
|
1118
1504
|
if (subcommand === "list") {
|
|
1119
|
-
const { runOrgsList } = await import("./list-
|
|
1505
|
+
const { runOrgsList } = await import("./list-YRJPN4PI.js");
|
|
1120
1506
|
await runOrgsList({
|
|
1121
1507
|
query: cli.flags.query,
|
|
1122
1508
|
subscriptionStatus: cli.flags.subscriptionStatus,
|
|
@@ -1129,14 +1515,49 @@ async function main() {
|
|
|
1129
1515
|
});
|
|
1130
1516
|
break;
|
|
1131
1517
|
}
|
|
1132
|
-
|
|
1518
|
+
if (subcommand === "assets") {
|
|
1519
|
+
if (action === "list") {
|
|
1520
|
+
const { runOrgsAssetsList } = await import("./list-EIVPGMWJ.js");
|
|
1521
|
+
await runOrgsAssetsList({
|
|
1522
|
+
type: cli.flags.type ?? cli.flags.assetType,
|
|
1523
|
+
groupId: cli.flags.groupId,
|
|
1524
|
+
query: cli.flags.query ?? cli.flags.search,
|
|
1525
|
+
perPage: cli.flags.perPage ?? cli.flags.limit,
|
|
1526
|
+
nextPage: cli.flags.nextPage,
|
|
1527
|
+
json: jsonMode,
|
|
1528
|
+
outputFormat: cliContext.outputFormat
|
|
1529
|
+
});
|
|
1530
|
+
break;
|
|
1531
|
+
}
|
|
1532
|
+
throw new Error("Usage: chainpatrol orgs assets list [filters]");
|
|
1533
|
+
}
|
|
1534
|
+
if (subcommand === "asset-groups") {
|
|
1535
|
+
if (action === "list") {
|
|
1536
|
+
const { runOrgsAssetGroupsList } = await import("./list-I7SBGA52.js");
|
|
1537
|
+
await runOrgsAssetGroupsList({
|
|
1538
|
+
json: jsonMode,
|
|
1539
|
+
outputFormat: cliContext.outputFormat
|
|
1540
|
+
});
|
|
1541
|
+
break;
|
|
1542
|
+
}
|
|
1543
|
+
throw new Error("Usage: chainpatrol orgs asset-groups list");
|
|
1544
|
+
}
|
|
1545
|
+
const hint = subcommand ? suggest(subcommand, ["list", "assets", "asset-groups"]) : null;
|
|
1133
1546
|
throw new Error(
|
|
1134
|
-
subcommand ? `Unknown subcommand: orgs ${subcommand}${hint ? `. Did you mean "orgs ${hint}"?` : ""}` : "Usage: chainpatrol orgs list
|
|
1547
|
+
subcommand ? `Unknown subcommand: orgs ${subcommand}${hint ? `. Did you mean "orgs ${hint}"?` : ""}` : "Usage: chainpatrol orgs <list|assets list|asset-groups list> [filters]"
|
|
1135
1548
|
);
|
|
1136
1549
|
}
|
|
1550
|
+
case "whoami": {
|
|
1551
|
+
const { runWhoami } = await import("./whoami-DH5HVLFN.js");
|
|
1552
|
+
await runWhoami({
|
|
1553
|
+
json: jsonMode,
|
|
1554
|
+
outputFormat: cliContext.outputFormat
|
|
1555
|
+
});
|
|
1556
|
+
break;
|
|
1557
|
+
}
|
|
1137
1558
|
case "healthchecks": {
|
|
1138
1559
|
if (subcommand === "list") {
|
|
1139
|
-
const { runHealthchecksList } = await import("./list-
|
|
1560
|
+
const { runHealthchecksList } = await import("./list-23QQYAV5.js");
|
|
1140
1561
|
await runHealthchecksList({
|
|
1141
1562
|
json: jsonMode,
|
|
1142
1563
|
outputFormat: cliContext.outputFormat
|
|
@@ -1150,7 +1571,7 @@ async function main() {
|
|
|
1150
1571
|
thresholds.minResults = cli.flags.minResults;
|
|
1151
1572
|
if (cli.flags.lookbackHours !== void 0)
|
|
1152
1573
|
thresholds.lookbackHours = cli.flags.lookbackHours;
|
|
1153
|
-
const { runHealthchecksRun } = await import("./run-
|
|
1574
|
+
const { runHealthchecksRun } = await import("./run-CJGN6TX4.js");
|
|
1154
1575
|
await runHealthchecksRun({
|
|
1155
1576
|
org,
|
|
1156
1577
|
id: action,
|
|
@@ -1168,7 +1589,7 @@ async function main() {
|
|
|
1168
1589
|
}
|
|
1169
1590
|
case "presets": {
|
|
1170
1591
|
if (subcommand === "list") {
|
|
1171
|
-
const { runPresetsList } = await import("./list-
|
|
1592
|
+
const { runPresetsList } = await import("./list-WX5G3IOF.js");
|
|
1172
1593
|
await runPresetsList({ outputFormat: cliContext.outputFormat });
|
|
1173
1594
|
break;
|
|
1174
1595
|
}
|
|
@@ -1179,7 +1600,7 @@ async function main() {
|
|
|
1179
1600
|
);
|
|
1180
1601
|
}
|
|
1181
1602
|
const org = await resolveOrg();
|
|
1182
|
-
const { runPresetsRun } = await import("./run-
|
|
1603
|
+
const { runPresetsRun } = await import("./run-BHEXWBAS.js");
|
|
1183
1604
|
await runPresetsRun({
|
|
1184
1605
|
presetId: action,
|
|
1185
1606
|
org,
|
|
@@ -1196,17 +1617,17 @@ async function main() {
|
|
|
1196
1617
|
case "setup":
|
|
1197
1618
|
case "install":
|
|
1198
1619
|
case "i": {
|
|
1199
|
-
const { setupSkill } = await import("./setup-skill-
|
|
1620
|
+
const { setupSkill } = await import("./setup-skill-FA4STSGA.js");
|
|
1200
1621
|
setupSkill({ json: jsonMode, cloud: cli.flags.cloud });
|
|
1201
1622
|
break;
|
|
1202
1623
|
}
|
|
1203
1624
|
case "uninstall": {
|
|
1204
|
-
const { uninstallSkill } = await import("./setup-skill-
|
|
1625
|
+
const { uninstallSkill } = await import("./setup-skill-FA4STSGA.js");
|
|
1205
1626
|
uninstallSkill({ json: jsonMode });
|
|
1206
1627
|
break;
|
|
1207
1628
|
}
|
|
1208
1629
|
case "completions": {
|
|
1209
|
-
const { printCompletions } = await import("./completions-
|
|
1630
|
+
const { printCompletions } = await import("./completions-6C6KG5DH.js");
|
|
1210
1631
|
printCompletions(subcommand);
|
|
1211
1632
|
break;
|
|
1212
1633
|
}
|