@knowttl/artium-axi 0.0.15 → 0.0.17

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/README.md CHANGED
@@ -163,6 +163,14 @@ Artium's authenticated setup fetches managed skills; a standalone skill installe
163
163
  All tools start disabled; write access defaults to off.
164
164
  Administrator capability alone grants no tool access; upstream permissions remain an additional boundary.
165
165
 
166
+ Microsoft Graph defaults to the `entra` pack.
167
+ Administrators can opt in to the single read-only `security hunting query` command for Defender XDR advanced hunting with `enabledPacks: ["entra", "security"]` in the managed tool settings.
168
+ Hunting accepts exactly one UTF-8 plain-text upload named `query.kql`, at most 64 KiB, through `artium-axi mg-axi security hunting query --file query.kql`.
169
+ See [client input handling](docs/client-reference.md#command-surface-and-subcommands) for local file paths and upload restrictions.
170
+ Queries must use the upstream restricted read-only KQL subset.
171
+ The existing mg-axi role grant is required; other security commands remain unavailable.
172
+ See [Graph credential setup](docs/tool-credentials.md#microsoft-graph) for hunting permissions and consent; tenant acceptance remains unverified.
173
+
166
174
  Falcon investigation reads include detection lineage, process details and trees, existing sandbox reports, FileVantage changes and device-control policy details.
167
175
 
168
176
  Vectra supports selected QUX/RUX writes for detection close/open and mark-fixed, host/account close, key assets, tags, notes (including bulk notes), assignments and outcomes, triage labels and rules, groups and membership, proxies, threat feeds, internal-network settings, syslog/Kafka, notification destinations and Match, subject to deployment support in the [reviewed inventory](tools/inventories/vectra-axi.json).
@@ -183,7 +191,8 @@ See [client input handling](docs/client-reference.md#command-surface-and-subcomm
183
191
  | Hybrid Analysis | Sandbox submissions, YARA create/update/delete, consuming hunting matches and the four reviewed archive downloads require administrator `writes.allowWrites: true`, independently selected operations, native preview, `--execute`, exact `--confirm` and durable journaling. Downloads are limited to `hash-download-bin`, `report-download-bin`, `report-download-dropped-files` and `report-download-memory`, through the [authenticated CLI verified-save path](docs/client-reference.md#hybrid-analysis-archive-saving) after the [operator prerequisites](docs/runbook.md#scope-and-prerequisites) pass. All operations default off; enabling other writes never enables downloads or grants upstream entitlement. The browser provides warnings, command guidance and metadata/save status only. Ordinary tool-run downloads, local configuration and credential/origin overrides are blocked. |
184
192
 
185
193
  Hybrid Analysis quick scans transmit the supplied sample or URL as read exceptions without a write gate; sandbox submission previews disclose that samples and reports can become visible to the community.
186
- Consuming hunting matches marks every returned match delivered; reconcile ambiguous outcomes using the audit ID, durable native journal and returned read-back guidance before retrying.
194
+ Consuming hunting matches is account-wide across all rules, with no rule selector, and irreversibly marks every returned match delivered; reconcile ambiguous outcomes using the audit ID, durable native journal and returned read-back guidance before retrying.
195
+ Updating a YARA rule with `reset_counter:true` resets its all-time match counter and changes its rule ID; use the returned ID for subsequent commands.
187
196
  Labs hunting and search contracts are experimental.
188
197
 
189
198
  There is no universal Artium confirmation flag.
@@ -20191,10 +20191,14 @@ var nativeSettingsSchemas = {
20191
20191
  "awx-axi": external_exports.strictObject({ allowWrites: external_exports.boolean().optional() }),
20192
20192
  "ldap-axi": external_exports.strictObject({}),
20193
20193
  "ado-axi": external_exports.strictObject({ allowWrites: external_exports.boolean().optional() }),
20194
- "mg-axi": external_exports.strictObject({ preview: external_exports.boolean().optional(), writes: external_exports.strictObject({
20195
- allowWrites: external_exports.boolean(),
20196
- operations: external_exports.array(external_exports.string().min(1).max(256)).min(1).max(64)
20197
- }).optional() }),
20194
+ "mg-axi": external_exports.strictObject({
20195
+ enabledPacks: external_exports.array(external_exports.enum(["entra", "security"])).min(1).max(2).refine((packs) => packs.includes("entra") && new Set(packs).size === packs.length).optional(),
20196
+ preview: external_exports.boolean().optional(),
20197
+ writes: external_exports.strictObject({
20198
+ allowWrites: external_exports.boolean(),
20199
+ operations: external_exports.array(external_exports.string().min(1).max(256)).min(1).max(64)
20200
+ }).optional()
20201
+ }),
20198
20202
  "falcon-axi": external_exports.strictObject({
20199
20203
  allowWrites: external_exports.boolean().optional(),
20200
20204
  rtr: falconRtrSettingsSchema.optional(),
@@ -20737,7 +20741,6 @@ var runResponseSchema = external_exports.union([runSuccessSchema, errorResponseS
20737
20741
 
20738
20742
  // src/cli/http.ts
20739
20743
  import { readFileSync as readFileSync2 } from "node:fs";
20740
- import { request as httpRequest } from "node:http";
20741
20744
  import { request as httpsRequest } from "node:https";
20742
20745
  import { rootCertificates } from "node:tls";
20743
20746
  import { resolve } from "node:path";
@@ -20745,7 +20748,7 @@ import { resolve } from "node:path";
20745
20748
  // package.json
20746
20749
  var package_default = {
20747
20750
  name: "artium-axi",
20748
- version: "0.0.15",
20751
+ version: "0.0.17",
20749
20752
  private: true,
20750
20753
  license: "MIT",
20751
20754
  type: "module",
@@ -20961,6 +20964,8 @@ var SessionStore = class {
20961
20964
  };
20962
20965
 
20963
20966
  // src/cli/http.ts
20967
+ var { request: httpRequest } = process.getBuiltinModule("node:http");
20968
+ var ACCESS_EXPIRY_SKEW_MS = 3e4;
20964
20969
  var DEFAULT_REQUEST_DEADLINE_MS = 9e4;
20965
20970
  var Client = class {
20966
20971
  constructor(environment = process.env, managed2, requestDeadlineMs = DEFAULT_REQUEST_DEADLINE_MS) {
@@ -21076,9 +21081,13 @@ var Client = class {
21076
21081
  (token) => this.request(path, method, input2, token),
21077
21082
  (refreshToken) => this.request("/v1/auth/refresh", "POST", { refreshToken })
21078
21083
  );
21079
- const session = previous ? this.reload(previous) : this.sessions.read();
21084
+ let session = previous ? this.reload(previous) : this.sessions.read();
21080
21085
  if (!session) throw new ArtiumError("TOKEN_INVALID", void 0, "Run artium-axi login --username <username> --password-stdin.");
21081
21086
  if (session.status === "password-change-required") throw new ArtiumError("PASSWORD_CHANGE_REQUIRED");
21087
+ if (session.accessExpiresAt <= Date.now() + ACCESS_EXPIRY_SKEW_MS) {
21088
+ const expiring = session;
21089
+ session = await this.sessions.locked(() => this.refresh(expiring));
21090
+ }
21082
21091
  let result;
21083
21092
  try {
21084
21093
  result = await this.request(path, method, input2, session.accessToken);
@@ -25016,10 +25025,10 @@ var vectra_axi_default = {
25016
25025
  var az_axi_default = {
25017
25026
  generatedBy: "scripts/upstream-inventory.mjs",
25018
25027
  tool: "az-axi",
25019
- version: "0.1.10",
25020
- integrity: "sha512-9RGnZrFOKpCIMC66nwxpWAzFLYrNlUJqaZWz8i/W1WexcP3sRj6BK4JWg0loc4zn+X7QKHRynKIx3pkdDOpTyw==",
25028
+ version: "0.1.11",
25029
+ integrity: "sha512-XiCwLaSh6A6xb9sk7RQ7T3FvkYpkWFIoGUCi7HxYlHF4kssVpF5gun4V7Taw9eKcm0HEWftnLci9l4EBSaFj0w==",
25021
25030
  parserEvidence: "Installed pinned catalogue exports, provisional until adapter acceptance",
25022
- packageManifestSha256: "7ec6a1ca9fd18e24bf0405bb49702d6846e40bcb089b270e8bdafedf345d9545",
25031
+ packageManifestSha256: "8bdf756d4f0b3d006543471320eb14d83f258122752bd1e07c76a2a74868691c",
25023
25032
  environment: [
25024
25033
  {
25025
25034
  name: "AZ_AXI_CONFIG",
@@ -25195,7 +25204,7 @@ var az_axi_default = {
25195
25204
  "sub",
25196
25205
  "list"
25197
25206
  ],
25198
- help: "Command: az-axi sub list\nNative operation: az-axi account list; existing scope, defaults and TOON output apply.\nFlags: --subscription, --management-group, --help, --full, --fields, --limit, --all, --max-rows\nShort flags where accepted: -h help, -s subscription, -g resource-group, -n name, -w workspace, -t timespan.\nLists accept comma-separated, space-separated and repeated values after the leaf path.\nBooleans accept bare flags or true/false. Conflicting scalar values are refused.\n\nLists live ARM subscriptions in selected scope (flags, environment, profile, else all accessible), resolving unambiguous names to IDs. This is not Azure CLI's cached account list. Legacy sub list still lists all visible subscriptions with inScope markers.\nDefault: name, id (subscription GUID), state, tenantId. --full adds ARM metadata and shows all fetched rows; --fields selects metadata. --limit defaults to 50. Paging stops at 100 pages with lower-bound counts. Management-group scope is unsupported.\nExamples: az-axi account list; az-axi account list -s <subscription> --full\nFetch budget per subscription: 1000 rows by default; --all raises it to 10000 (Key Vault: at most 2500 scanned at 25/page). --max-rows <1..100000> overrides either row budget. Every walk stops at 100 pages. Budgets count rows before local filters. --limit controls display only (default 50); --full shows every fetched row and expands display only, never bypassing fetch budgets. Incomplete totals are lower bounds; narrow the scope or raise --max-rows to search further."
25207
+ help: "Command: az-axi sub list\nNative operation: az-axi account list; existing scope, defaults and TOON output apply.\nFlags: --subscription, --management-group, --help, --full, --fields, --limit, --all, --max-rows\nShort flags where accepted: -h help, -s subscription, -g resource-group, -n name, -w workspace, -t timespan.\nLists accept comma-separated, space-separated and repeated values after the leaf path.\nBooleans accept bare flags or true/false. Conflicting scalar values are refused.\n\nLists live ARM subscriptions in selected scope (flags, environment, profile, else all accessible), resolving unambiguous names to IDs. This is not Azure CLI's cached account list. Legacy sub list still lists all visible subscriptions with inScope markers.\nDefault: name, id (subscription GUID), state, tenantId. --full adds ARM metadata and shows all fetched rows; --fields selects metadata. --limit defaults to 50. Lists follow the shared fetch budget (up to 100 pages and the row budget per subscription); incomplete counts are disclosed as lower bounds. Management-group scope is unsupported.\nExamples: az-axi account list; az-axi account list -s <subscription> --full\nFetch budget per subscription or collection (Resource Graph: across selected scope, per exposure check): 1000 rows by default; --all raises it to 10000 (Key Vault: at most 2500 scanned at 25/page). --max-rows <1..100000> overrides either row budget. Every walk stops at 100 pages. Budgets count rows before local filters. --limit controls display only (usually 50; Defender assessments 25, exposure overview 10 per check); --full shows every fetched row and expands display only, never bypassing fetch budgets. Incomplete totals are lower bounds; narrow the scope or raise --max-rows to search further."
25199
25208
  },
25200
25209
  adapterBoundary: {
25201
25210
  unsafeOverrides: [
@@ -25278,7 +25287,7 @@ var az_axi_default = {
25278
25287
  tokenResourceSources: [
25279
25288
  {
25280
25289
  path: "dist/lib/registry.js",
25281
- sha256: "e53b5e91dd69c4555960f7d69f0ea377090c8c80ecd38b200885ed31c69d3889"
25290
+ sha256: "1b0354317f721989465190b4a276fce811d559bcbbd9871129b02dd366a5beb5"
25282
25291
  },
25283
25292
  {
25284
25293
  path: "dist/lib/client.js",
@@ -25302,7 +25311,7 @@ var az_axi_default = {
25302
25311
  },
25303
25312
  {
25304
25313
  path: "dist/commands/rbac.js",
25305
- sha256: "140ee55e6e9c139de95c13198c9b24557dd7b3c510b33d2560e52acf55978eb0"
25314
+ sha256: "a0b5d0e92d47b78be10ef210b657399b3386ca67d0869d466913b31451dcdcaa"
25306
25315
  },
25307
25316
  {
25308
25317
  path: "dist/commands/logs.js",
@@ -26007,6 +26016,8 @@ var az_axi_default = {
26007
26016
  full: "boolean",
26008
26017
  fields: "list",
26009
26018
  limit: "value",
26019
+ all: "boolean",
26020
+ "max-rows": "value",
26010
26021
  "resource-group": "value",
26011
26022
  name: "value"
26012
26023
  },
@@ -26071,6 +26082,8 @@ var az_axi_default = {
26071
26082
  full: "boolean",
26072
26083
  fields: "list",
26073
26084
  limit: "value",
26085
+ all: "boolean",
26086
+ "max-rows": "value",
26074
26087
  "resource-group": "value",
26075
26088
  name: "value"
26076
26089
  },
@@ -26134,6 +26147,8 @@ var az_axi_default = {
26134
26147
  full: "boolean",
26135
26148
  fields: "list",
26136
26149
  limit: "value",
26150
+ all: "boolean",
26151
+ "max-rows": "value",
26137
26152
  "resource-group": "value",
26138
26153
  name: "value"
26139
26154
  },
@@ -26197,6 +26212,8 @@ var az_axi_default = {
26197
26212
  full: "boolean",
26198
26213
  fields: "list",
26199
26214
  limit: "value",
26215
+ all: "boolean",
26216
+ "max-rows": "value",
26200
26217
  resource: "value"
26201
26218
  },
26202
26219
  flagAliases: {},
@@ -26256,6 +26273,8 @@ var az_axi_default = {
26256
26273
  full: "boolean",
26257
26274
  fields: "list",
26258
26275
  limit: "value",
26276
+ all: "boolean",
26277
+ "max-rows": "value",
26259
26278
  resource: "value",
26260
26279
  metric: "list",
26261
26280
  "start-time": "value",
@@ -26515,6 +26534,8 @@ var az_axi_default = {
26515
26534
  full: "boolean",
26516
26535
  fields: "list",
26517
26536
  limit: "value",
26537
+ all: "boolean",
26538
+ "max-rows": "value",
26518
26539
  principal: "value",
26519
26540
  role: "value",
26520
26541
  scope: "value",
@@ -26548,6 +26569,8 @@ var az_axi_default = {
26548
26569
  full: "boolean",
26549
26570
  fields: "list",
26550
26571
  limit: "value",
26572
+ all: "boolean",
26573
+ "max-rows": "value",
26551
26574
  principal: "value",
26552
26575
  role: "value",
26553
26576
  scope: "value",
@@ -26582,6 +26605,8 @@ var az_axi_default = {
26582
26605
  full: "boolean",
26583
26606
  fields: "list",
26584
26607
  limit: "value",
26608
+ all: "boolean",
26609
+ "max-rows": "value",
26585
26610
  since: "value",
26586
26611
  caller: "value",
26587
26612
  "resource-group": "value",
@@ -26615,6 +26640,8 @@ var az_axi_default = {
26615
26640
  full: "boolean",
26616
26641
  fields: "list",
26617
26642
  limit: "value",
26643
+ all: "boolean",
26644
+ "max-rows": "value",
26618
26645
  since: "value",
26619
26646
  caller: "value",
26620
26647
  "resource-group": "value",
@@ -26650,6 +26677,8 @@ var az_axi_default = {
26650
26677
  full: "boolean",
26651
26678
  fields: "list",
26652
26679
  limit: "value",
26680
+ all: "boolean",
26681
+ "max-rows": "value",
26653
26682
  severity: "list",
26654
26683
  status: "value",
26655
26684
  since: "value"
@@ -26680,6 +26709,8 @@ var az_axi_default = {
26680
26709
  full: "boolean",
26681
26710
  fields: "list",
26682
26711
  limit: "value",
26712
+ all: "boolean",
26713
+ "max-rows": "value",
26683
26714
  severity: "list",
26684
26715
  status: "value",
26685
26716
  since: "value"
@@ -26737,6 +26768,8 @@ var az_axi_default = {
26737
26768
  full: "boolean",
26738
26769
  fields: "list",
26739
26770
  limit: "value",
26771
+ all: "boolean",
26772
+ "max-rows": "value",
26740
26773
  name: "value"
26741
26774
  },
26742
26775
  flagAliases: {},
@@ -26796,6 +26829,8 @@ var az_axi_default = {
26796
26829
  full: "boolean",
26797
26830
  fields: "list",
26798
26831
  limit: "value",
26832
+ all: "boolean",
26833
+ "max-rows": "value",
26799
26834
  name: "value",
26800
26835
  "assessment-name": "value",
26801
26836
  "assessed-resource-id": "value"
@@ -26935,6 +26970,8 @@ var az_axi_default = {
26935
26970
  full: "boolean",
26936
26971
  fields: "list",
26937
26972
  limit: "value",
26973
+ all: "boolean",
26974
+ "max-rows": "value",
26938
26975
  severity: "list",
26939
26976
  status: "value",
26940
26977
  resource: "value",
@@ -26965,7 +27002,9 @@ var az_axi_default = {
26965
27002
  help: "boolean",
26966
27003
  full: "boolean",
26967
27004
  fields: "list",
26968
- limit: "value"
27005
+ limit: "value",
27006
+ all: "boolean",
27007
+ "max-rows": "value"
26969
27008
  },
26970
27009
  flagAliases: {},
26971
27010
  shortFlags: {
@@ -26992,7 +27031,9 @@ var az_axi_default = {
26992
27031
  help: "boolean",
26993
27032
  full: "boolean",
26994
27033
  fields: "list",
26995
- limit: "value"
27034
+ limit: "value",
27035
+ all: "boolean",
27036
+ "max-rows": "value"
26996
27037
  },
26997
27038
  flagAliases: {},
26998
27039
  shortFlags: {
@@ -27094,6 +27135,8 @@ var az_axi_default = {
27094
27135
  full: "boolean",
27095
27136
  fields: "list",
27096
27137
  limit: "value",
27138
+ all: "boolean",
27139
+ "max-rows": "value",
27097
27140
  "workspace-name": "value",
27098
27141
  "resource-group": "value",
27099
27142
  workspace: "value",
@@ -27130,6 +27173,8 @@ var az_axi_default = {
27130
27173
  full: "boolean",
27131
27174
  fields: "list",
27132
27175
  limit: "value",
27176
+ all: "boolean",
27177
+ "max-rows": "value",
27133
27178
  "workspace-name": "value",
27134
27179
  "resource-group": "value",
27135
27180
  workspace: "value",
@@ -27388,6 +27433,8 @@ var az_axi_default = {
27388
27433
  full: "boolean",
27389
27434
  fields: "list",
27390
27435
  limit: "value",
27436
+ all: "boolean",
27437
+ "max-rows": "value",
27391
27438
  check: "value",
27392
27439
  "show-query": "boolean"
27393
27440
  },
@@ -28327,6 +28374,8 @@ var az_axi_default = {
28327
28374
  full: "boolean",
28328
28375
  fields: "list",
28329
28376
  limit: "value",
28377
+ all: "boolean",
28378
+ "max-rows": "value",
28330
28379
  "resource-group": "value",
28331
28380
  name: "value"
28332
28381
  },
@@ -28390,6 +28439,8 @@ var az_axi_default = {
28390
28439
  full: "boolean",
28391
28440
  fields: "list",
28392
28441
  limit: "value",
28442
+ all: "boolean",
28443
+ "max-rows": "value",
28393
28444
  name: "value"
28394
28445
  },
28395
28446
  flagAliases: {},
@@ -28449,6 +28500,8 @@ var az_axi_default = {
28449
28500
  full: "boolean",
28450
28501
  fields: "list",
28451
28502
  limit: "value",
28503
+ all: "boolean",
28504
+ "max-rows": "value",
28452
28505
  name: "value"
28453
28506
  },
28454
28507
  flagAliases: {},
@@ -28508,6 +28561,8 @@ var az_axi_default = {
28508
28561
  full: "boolean",
28509
28562
  fields: "list",
28510
28563
  limit: "value",
28564
+ all: "boolean",
28565
+ "max-rows": "value",
28511
28566
  "resource-group": "value",
28512
28567
  name: "value",
28513
28568
  assignment: "value",
@@ -28541,6 +28596,8 @@ var az_axi_default = {
28541
28596
  full: "boolean",
28542
28597
  fields: "list",
28543
28598
  limit: "value",
28599
+ all: "boolean",
28600
+ "max-rows": "value",
28544
28601
  "resource-group": "value",
28545
28602
  name: "value"
28546
28603
  },
@@ -28604,6 +28661,8 @@ var az_axi_default = {
28604
28661
  full: "boolean",
28605
28662
  fields: "list",
28606
28663
  limit: "value",
28664
+ all: "boolean",
28665
+ "max-rows": "value",
28607
28666
  "resource-group": "value",
28608
28667
  name: "value"
28609
28668
  },
@@ -28667,6 +28726,8 @@ var az_axi_default = {
28667
28726
  full: "boolean",
28668
28727
  fields: "list",
28669
28728
  limit: "value",
28729
+ all: "boolean",
28730
+ "max-rows": "value",
28670
28731
  "resource-group": "value",
28671
28732
  name: "value",
28672
28733
  "custom-role-only": "boolean"
@@ -29682,10 +29743,10 @@ var az_axi_default = {
29682
29743
  var mg_axi_default = {
29683
29744
  generatedBy: "scripts/upstream-inventory.mjs",
29684
29745
  tool: "mg-axi",
29685
- version: "0.1.10",
29686
- integrity: "sha512-rsd8KjyXxojDF3Gu6C95xsJokATeEmUaIRO7Zcaw9h/sF9WLXpW/gh6tKB1niU2QTGe2tsZjPsqXvzpyG34UUA==",
29746
+ version: "0.1.12",
29747
+ integrity: "sha512-TBt2y2rpfn8oi4YOq95uIo43RTsV/iOc0xFa3e3YCjhqd/ZL/y2is+7W0+B5/g1sdwb95yJbcU1eqeJEzmKJ5g==",
29687
29748
  parserEvidence: "Installed pinned catalogue exports",
29688
- packageManifestSha256: "9526463c1fff30f32a30a58dffbbb2e3d6eaf21a3e06edb904f223d7a535da4d",
29749
+ packageManifestSha256: "e686938dd356bffe87d9884d656a139b91e7eb6d62370f6aba3b5fd14283fb45",
29689
29750
  environment: [
29690
29751
  {
29691
29752
  name: "MG_AXI_CONFIG"
@@ -29723,7 +29784,7 @@ var mg_axi_default = {
29723
29784
  environmentSources: [
29724
29785
  {
29725
29786
  path: "dist/profiles.js",
29726
- sha256: "97c12ad60bc54bb4180c12eda9a324411070ad08a2cf4555db12eaade1ef3f30"
29787
+ sha256: "5a683251d3427b1642a3d60b5168ae56656506d12aae614ad4469dde6c6d624e"
29727
29788
  },
29728
29789
  {
29729
29790
  path: "dist/mutations.js",
@@ -29763,7 +29824,7 @@ var mg_axi_default = {
29763
29824
  sources: [
29764
29825
  {
29765
29826
  path: "dist/profiles.js",
29766
- sha256: "97c12ad60bc54bb4180c12eda9a324411070ad08a2cf4555db12eaade1ef3f30"
29827
+ sha256: "5a683251d3427b1642a3d60b5168ae56656506d12aae614ad4469dde6c6d624e"
29767
29828
  },
29768
29829
  {
29769
29830
  path: "dist/mutations.js",
@@ -29780,7 +29841,8 @@ var mg_axi_default = {
29780
29841
  "home",
29781
29842
  "doctor",
29782
29843
  "entra",
29783
- "api get"
29844
+ "api get",
29845
+ "security hunting query"
29784
29846
  ],
29785
29847
  example: [
29786
29848
  "entra",
@@ -29842,15 +29904,15 @@ var mg_axi_default = {
29842
29904
  sources: [
29843
29905
  {
29844
29906
  path: "dist/catalogue.js",
29845
- sha256: "4f7710d0feb1bdaeaae1ae68f4e9e41d67f77f20620b824d2f44a95f2c63ee31"
29907
+ sha256: "b6a764b7e50c3f4c84d40dcef1290a2e6a784fe73809977d6b04c06884b7a516"
29846
29908
  },
29847
29909
  {
29848
29910
  path: "dist/cli.js",
29849
- sha256: "19485f95fc3eeb5447fe05a55eec028dcf5d3c4e17a12f3bee1e0cffc239f00d"
29911
+ sha256: "613fc3ac4870e5538d2c53b0760244c7e3bb3837fa3d97c1b89b7916c557af44"
29850
29912
  },
29851
29913
  {
29852
29914
  path: "dist/profiles.js",
29853
- sha256: "97c12ad60bc54bb4180c12eda9a324411070ad08a2cf4555db12eaade1ef3f30"
29915
+ sha256: "5a683251d3427b1642a3d60b5168ae56656506d12aae614ad4469dde6c6d624e"
29854
29916
  },
29855
29917
  {
29856
29918
  path: "dist/msal-app-provider.js",
@@ -29880,11 +29942,12 @@ var mg_axi_default = {
29880
29942
  "home",
29881
29943
  "doctor",
29882
29944
  "entra",
29883
- "api get"
29945
+ "api get",
29946
+ "security hunting query"
29884
29947
  ],
29885
29948
  inputs: {
29886
29949
  stdin: "cursor - only",
29887
- files: "unsupported",
29950
+ files: "security hunting query only: one UTF-8 query.kql upload, at most 64 KiB; fixed runner leaf name",
29888
29951
  cursor: "opaque token or stdin; never a path",
29889
29952
  api: "reviewed GET routes only; pinned Graph destination and operation gates retained"
29890
29953
  },
@@ -29899,7 +29962,8 @@ var mg_axi_default = {
29899
29962
  ],
29900
29963
  knownOutputScanValues: [
29901
29964
  "clientSecret and trimmed clientSecret",
29902
- "privateKey and normalized PEM"
29965
+ "privateKey and normalized PEM",
29966
+ "hunting query text"
29903
29967
  ],
29904
29968
  outputScanLimit: "Upstream-minted Graph tokens and assertions are not available during prepare; live redaction remains unverified.",
29905
29969
  resources: {
@@ -29918,11 +29982,11 @@ var mg_axi_default = {
29918
29982
  parserSources: [
29919
29983
  {
29920
29984
  path: "dist/catalogue.js",
29921
- sha256: "4f7710d0feb1bdaeaae1ae68f4e9e41d67f77f20620b824d2f44a95f2c63ee31"
29985
+ sha256: "b6a764b7e50c3f4c84d40dcef1290a2e6a784fe73809977d6b04c06884b7a516"
29922
29986
  },
29923
29987
  {
29924
29988
  path: "dist/cli.js",
29925
- sha256: "19485f95fc3eeb5447fe05a55eec028dcf5d3c4e17a12f3bee1e0cffc239f00d"
29989
+ sha256: "613fc3ac4870e5538d2c53b0760244c7e3bb3837fa3d97c1b89b7916c557af44"
29926
29990
  }
29927
29991
  ]
29928
29992
  },
@@ -30023,6 +30087,9 @@ var mg_axi_default = {
30023
30087
  {
30024
30088
  name: "fields"
30025
30089
  },
30090
+ {
30091
+ name: "file"
30092
+ },
30026
30093
  {
30027
30094
  name: "filter"
30028
30095
  },
@@ -30116,6 +30183,9 @@ var mg_axi_default = {
30116
30183
  {
30117
30184
  name: "tenant-id"
30118
30185
  },
30186
+ {
30187
+ name: "timespan"
30188
+ },
30119
30189
  {
30120
30190
  name: "transitive"
30121
30191
  },
@@ -34456,6 +34526,20 @@ var mg_axi_default = {
34456
34526
  required: true
34457
34527
  }
34458
34528
  },
34529
+ {
34530
+ command: "security hunting query",
34531
+ flags: {
34532
+ help: "boolean",
34533
+ profile: "value",
34534
+ "api-version": "value",
34535
+ file: "value",
34536
+ timespan: "value",
34537
+ limit: "value",
34538
+ full: "boolean",
34539
+ config: "value"
34540
+ },
34541
+ positionalInput: false
34542
+ },
34459
34543
  {
34460
34544
  command: "login",
34461
34545
  flags: {
@@ -35039,8 +35123,8 @@ var ldap_axi_default = {
35039
35123
  var ado_axi_default = {
35040
35124
  generatedBy: "scripts/ado-inventory.mjs",
35041
35125
  tool: "ado-axi",
35042
- version: "0.4.6",
35043
- integrity: "sha512-DThi4K9uO/jz93QQMBXtpnCXeHaYsOWSt6TFdYGhnqDN8aScow3bwbhVTIg4KEMVT0KHPYPdH00V9UOPX0c2fA==",
35126
+ version: "0.4.7",
35127
+ integrity: "sha512-qA7qpO0vjlib6r1hOOBfY0+cWn0mVCLBmkFUktJJANPelwbTiZuqgfwgk5D1lGG0q9rgCv+aPJrHOphmWJv0fw==",
35044
35128
  parserEvidence: "Reviewed published dispatch switches, aliases and command flag constants",
35045
35129
  sources: [
35046
35130
  {
@@ -35101,7 +35185,7 @@ var ado_axi_default = {
35101
35185
  },
35102
35186
  {
35103
35187
  path: "dist/commands/pr.js",
35104
- sha256: "7b4f81ce93f18c1079294e71237be8e85a4c71313ae0bceac50b0245324d8772"
35188
+ sha256: "b85a81782aa806201facd9fc414a62959bc96db9858fa4ba804015395d001c32"
35105
35189
  },
35106
35190
  {
35107
35191
  path: "dist/commands/ref.js",
@@ -39968,8 +40052,8 @@ var awx_axi_default = {
39968
40052
  var tenable_axi_default = {
39969
40053
  generatedBy: "scripts/tenable-inventory.mjs",
39970
40054
  tool: "tenable-axi",
39971
- version: "0.1.1",
39972
- integrity: "sha512-ukWwVny4DeEBLqqWJhaM0au4Z5dvQTsDKoE2NhROIE3p114WUz2tT5dOfWL8MaalVrmU/zSMhk+S29sUocR3xg==",
40055
+ version: "0.1.2",
40056
+ integrity: "sha512-csjV0urIUbZZlkA9VQpEGbsOWOnLgZTFMi0yRQD3uGlmlyPIxA6gKyvMzifSqcRvfyOaBEv7U5OjcWL1rs5NAw==",
39973
40057
  parserEvidence: "Published command catalogue, mutation registry and reviewed native parsers and transport gates",
39974
40058
  sources: [
39975
40059
  {
@@ -39990,7 +40074,7 @@ var tenable_axi_default = {
39990
40074
  },
39991
40075
  {
39992
40076
  path: "dist/src/catalogue.js",
39993
- sha256: "d05c8dfebce3219c2ee0a305888fa336e62db5fc3b3b4bc95a27c0588943587b"
40077
+ sha256: "d99e739f4a9d61cf13c91fd18e69a248f639c33d3e2e5b37efb320f0f50cef16"
39994
40078
  },
39995
40079
  {
39996
40080
  path: "dist/src/cli.js",
@@ -40006,7 +40090,7 @@ var tenable_axi_default = {
40006
40090
  },
40007
40091
  {
40008
40092
  path: "dist/src/exposure.js",
40009
- sha256: "5e93b01dc54368627f1f7c1ac4a96579af2f4beae7c2b10189ba190cf5cc9af6"
40093
+ sha256: "ef5fbe0d3525b741cc14a51b2ab9cc0cbd5289a1ec97fe01312b4d351beaf0b0"
40010
40094
  },
40011
40095
  {
40012
40096
  path: "dist/src/hook-install.js",
@@ -40014,7 +40098,7 @@ var tenable_axi_default = {
40014
40098
  },
40015
40099
  {
40016
40100
  path: "dist/src/inventory-catalogue.js",
40017
- sha256: "ccd42834a43aabffbd90e7326926660e9cff788997ab836cb2eb858fc36f1119"
40101
+ sha256: "a0cc6abc55f11815fbacf4e7f869ce0e70e06f678ebbb012afe7500a26fb4de8"
40018
40102
  },
40019
40103
  {
40020
40104
  path: "dist/src/inventory-export-catalogue.js",
@@ -40026,7 +40110,7 @@ var tenable_axi_default = {
40026
40110
  },
40027
40111
  {
40028
40112
  path: "dist/src/inventory.js",
40029
- sha256: "83bd3b19b1ad54785fdf107b57a66ffc882141706337bb886108b67f75565bb1"
40113
+ sha256: "bc712463ee14db76ff511c4b3ec8d6cadd43b3895e08f1baee785fe3a415916f"
40030
40114
  },
40031
40115
  {
40032
40116
  path: "dist/src/inventory/schema.js",
@@ -40034,7 +40118,7 @@ var tenable_axi_default = {
40034
40118
  },
40035
40119
  {
40036
40120
  path: "dist/src/local-commands.js",
40037
- sha256: "4bb2769049b72126c47857f850b3cd008a371f952c479e0b288d5279d7aaa77a"
40121
+ sha256: "4169d7a4bc6753d202d515b488ca8863b7368e31e8166f9e958c2fd1c6b05d22"
40038
40122
  },
40039
40123
  {
40040
40124
  path: "dist/src/platform-tag-catalogue.js",
@@ -40046,11 +40130,11 @@ var tenable_axi_default = {
40046
40130
  },
40047
40131
  {
40048
40132
  path: "dist/src/private-file.js",
40049
- sha256: "a5f01182fe09394ecf508deb46d54c9fb0b39c9fd205094d155ace212bbd1c8b"
40133
+ sha256: "436847d36438fa3d73edfbd45cb14faf9935308230fb8b24573926b7f07b6979"
40050
40134
  },
40051
40135
  {
40052
40136
  path: "dist/src/profiles.js",
40053
- sha256: "12defbf234e4da8584e1f6ba601eb3826733ff85c76445197b0162ac52299b4a"
40137
+ sha256: "b52aa17032f025a81682f0459dcdbed45cf0ed84e10e5aefe31677c31f26414a"
40054
40138
  },
40055
40139
  {
40056
40140
  path: "dist/src/redact.js",
@@ -40257,14 +40341,14 @@ var tenable_axi_default = {
40257
40341
  flags: {
40258
40342
  config: "Config path; default credential precedence",
40259
40343
  profile: "Profile name; default credential precedence",
40260
- fields: "Comma-separated display or wire properties; default compact view",
40344
+ fields: "Comma-separated display or wire properties; display names: id, name, class, exposureScore; default compact view",
40261
40345
  full: "Show full text; default false",
40262
40346
  help: "Show help",
40263
40347
  limit: "Maximum emitted rows, 1-10000; default 100",
40264
40348
  all: "Read up to 10000 rows within invocation budgets; excludes --limit",
40265
40349
  cursor: "Opaque resume cursor; retain the original selectors and filters",
40266
40350
  query: "Simple query text",
40267
- filter: "Repeatable: <property> <operator> <JSON string array>",
40351
+ filter: 'Repeatable: <property> <operator> <JSON string array>, e.g. asset_class = ["DEVICE"]',
40268
40352
  "filter-file": "JSON flat array of {property, operator, value: string[]}; '-' reads stdin; excludes --filter",
40269
40353
  sort: "Wire property:asc|desc",
40270
40354
  "extra-properties": "Comma-separated extra wire properties",
@@ -40278,7 +40362,7 @@ var tenable_axi_default = {
40278
40362
  flags: {
40279
40363
  config: "Config path; default credential precedence",
40280
40364
  profile: "Profile name; default credential precedence",
40281
- fields: "Comma-separated display or wire properties; default compact view",
40365
+ fields: "Comma-separated output fields; accepted: key, readable_name, operators, sortable, filterable, control, description; default compact view",
40282
40366
  full: "Show full text; default false",
40283
40367
  help: "Show help",
40284
40368
  limit: "Maximum emitted rows, 1-10000; default 100",
@@ -40293,7 +40377,7 @@ var tenable_axi_default = {
40293
40377
  flags: {
40294
40378
  config: "Config path; default credential precedence",
40295
40379
  profile: "Profile name; default credential precedence",
40296
- fields: "Comma-separated display or wire properties; default compact view",
40380
+ fields: "Comma-separated display or wire properties; display names: id, name, class, exposureScore; default compact view",
40297
40381
  full: "Show full text; default false",
40298
40382
  help: "Show help",
40299
40383
  id: "Required exact inventory ID",
@@ -40343,7 +40427,7 @@ var tenable_axi_default = {
40343
40427
  command: "auth status",
40344
40428
  effect: "read",
40345
40429
  flags: {
40346
- config: "Config path; default TENABLE_AXI_CONFIG or platform path",
40430
+ config: "Config path; default environment override or platform path",
40347
40431
  profile: "Profile name; default credential precedence",
40348
40432
  fields: "Comma-separated output fields; default all",
40349
40433
  full: "Show full text; default false",
@@ -40686,14 +40770,14 @@ var tenable_axi_default = {
40686
40770
  flags: {
40687
40771
  config: "Config path; default credential precedence",
40688
40772
  profile: "Profile name; default credential precedence",
40689
- fields: "Comma-separated display or wire properties; default compact view",
40773
+ fields: "Comma-separated display or wire properties; display names: id, name, severity, state; default compact view",
40690
40774
  full: "Show full text; default false",
40691
40775
  help: "Show help",
40692
40776
  limit: "Maximum emitted rows, 1-10000; default 100",
40693
40777
  all: "Read up to 10000 rows within invocation budgets; excludes --limit",
40694
40778
  cursor: "Opaque resume cursor; retain the original selectors and filters",
40695
40779
  query: "Simple query text",
40696
- filter: "Repeatable: <property> <operator> <JSON string array>",
40780
+ filter: 'Repeatable: <property> <operator> <JSON string array>, e.g. severity = ["HIGH"]',
40697
40781
  "filter-file": "JSON flat array of {property, operator, value: string[]}; '-' reads stdin; excludes --filter",
40698
40782
  sort: "Wire property:asc|desc",
40699
40783
  "extra-properties": "Comma-separated extra wire properties",
@@ -40706,7 +40790,7 @@ var tenable_axi_default = {
40706
40790
  flags: {
40707
40791
  config: "Config path; default credential precedence",
40708
40792
  profile: "Profile name; default credential precedence",
40709
- fields: "Comma-separated display or wire properties; default compact view",
40793
+ fields: "Comma-separated output fields; accepted: key, readable_name, operators, sortable, filterable, control, description; default compact view",
40710
40794
  full: "Show full text; default false",
40711
40795
  help: "Show help",
40712
40796
  limit: "Maximum emitted rows, 1-10000; default 100",
@@ -40720,7 +40804,7 @@ var tenable_axi_default = {
40720
40804
  flags: {
40721
40805
  config: "Config path; default credential precedence",
40722
40806
  profile: "Profile name; default credential precedence",
40723
- fields: "Comma-separated display or wire properties; default compact view",
40807
+ fields: "Comma-separated display or wire properties; display names: id, name, severity, state; default compact view",
40724
40808
  full: "Show full text; default false",
40725
40809
  help: "Show help",
40726
40810
  id: "Required exact inventory ID",
@@ -40846,14 +40930,14 @@ var tenable_axi_default = {
40846
40930
  flags: {
40847
40931
  config: "Config path; default credential precedence",
40848
40932
  profile: "Profile name; default credential precedence",
40849
- fields: "Comma-separated display or wire properties; default compact view",
40933
+ fields: "Comma-separated display or wire properties; display names: name, version, publisher; default compact view",
40850
40934
  full: "Show full text; default false",
40851
40935
  help: "Show help",
40852
40936
  limit: "Maximum emitted rows, 1-10000; default 100",
40853
40937
  all: "Read up to 10000 rows within invocation budgets; excludes --limit",
40854
40938
  cursor: "Opaque resume cursor; retain the original selectors and filters",
40855
40939
  query: "Simple query text",
40856
- filter: "Repeatable: <property> <operator> <JSON string array>",
40940
+ filter: 'Repeatable: <property> <operator> <JSON string array>, e.g. application = ["example-app"]',
40857
40941
  "filter-file": "JSON flat array of {property, operator, value: string[]}; '-' reads stdin; excludes --filter",
40858
40942
  sort: "Wire property:asc|desc",
40859
40943
  "extra-properties": "Comma-separated extra wire properties",
@@ -40866,7 +40950,7 @@ var tenable_axi_default = {
40866
40950
  flags: {
40867
40951
  config: "Config path; default credential precedence",
40868
40952
  profile: "Profile name; default credential precedence",
40869
- fields: "Comma-separated display or wire properties; default compact view",
40953
+ fields: "Comma-separated output fields; accepted: key, readable_name, operators, sortable, filterable, control, description; default compact view",
40870
40954
  full: "Show full text; default false",
40871
40955
  help: "Show help",
40872
40956
  limit: "Maximum emitted rows, 1-10000; default 100",
@@ -41170,8 +41254,8 @@ var tenable_axi_default = {
41170
41254
  var hybrid_axi_default = {
41171
41255
  generatedBy: "scripts/hybrid-inventory.mjs",
41172
41256
  tool: "hybrid-axi",
41173
- version: "0.1.0",
41174
- integrity: "sha512-eQdks/92bP8wCn7mpLGqkl5bAI/kYLgRzrRXumtuwpe4sQytNXuAiXY/lNyTYdPT6/WXEFGL9JoaTwWA37F01A==",
41257
+ version: "0.1.1",
41258
+ integrity: "sha512-8K39EZadEq302GcuCKrWmdKJ6NvtFegpGWiStTF8T8gn+lbzbYNiBnRMt5lI0o+hCm7glUdOFahZqw62ylpi7w==",
41175
41259
  parserEvidence: "Published command catalogue, mutation registry and reviewed native parsers and transport gates",
41176
41260
  sources: [
41177
41261
  {
@@ -41180,7 +41264,7 @@ var hybrid_axi_default = {
41180
41264
  },
41181
41265
  {
41182
41266
  path: "dist/src/cli.js",
41183
- sha256: "541b529cf64eeae007dac76898ffe288f03c8317f8e24b8c34ef13cb94c95665"
41267
+ sha256: "85424239ee66a94aeb77789392277c300d784c9e77297c72a2b40fa22349abc7"
41184
41268
  },
41185
41269
  {
41186
41270
  path: "dist/src/download-catalogue.js",
@@ -41188,11 +41272,11 @@ var hybrid_axi_default = {
41188
41272
  },
41189
41273
  {
41190
41274
  path: "dist/src/hunting-catalogue.js",
41191
- sha256: "899c3a2e5a199fc899364ba2c324d188b3b030a13cb73d7b32927abda0fa562e"
41275
+ sha256: "f013f3f508b15805cabe58c3c6e8f44088dee6448b08469b1dbe8d9d07fae6df"
41192
41276
  },
41193
41277
  {
41194
41278
  path: "dist/src/hunting.js",
41195
- sha256: "65de316b45aadbaf1d043c44899a3f95acb55f3c1626cef1951a69b80b036d6c"
41279
+ sha256: "323486f2003b1f97979400028b0350e978c84249700f05fed032eb9a1fe413f4"
41196
41280
  },
41197
41281
  {
41198
41282
  path: "dist/src/key-contracts.js",
@@ -41200,7 +41284,7 @@ var hybrid_axi_default = {
41200
41284
  },
41201
41285
  {
41202
41286
  path: "dist/src/local-commands.js",
41203
- sha256: "80555cd34f3cfb55e72afb76080138b343bbfef000e0ae16060247ef547de7e9"
41287
+ sha256: "c151a3662a623360ef3d4d40d7c268b8a090983ee7949131237a7704d02a63b8"
41204
41288
  },
41205
41289
  {
41206
41290
  path: "dist/src/private-file.js",
@@ -41208,7 +41292,7 @@ var hybrid_axi_default = {
41208
41292
  },
41209
41293
  {
41210
41294
  path: "dist/src/profiles.js",
41211
- sha256: "13efc4d1755319813ddd08ca3a23b89df34c6decfe568e90d71d6c217dfcf1b4"
41295
+ sha256: "a2b567d31d3d1f04bc86970fc8b736b3510c1d7b7848f685c347415387f85543"
41212
41296
  },
41213
41297
  {
41214
41298
  path: "dist/src/redact.js",
@@ -41224,11 +41308,11 @@ var hybrid_axi_default = {
41224
41308
  },
41225
41309
  {
41226
41310
  path: "dist/src/reports.js",
41227
- sha256: "404a6bd21adcf33d1808b0703175f952b66220f1ad0821489d42720e0cfbc0fa"
41311
+ sha256: "be256f71a04c2f19371b6eb862b88caff9f2e481b95551749bca172058d70396"
41228
41312
  },
41229
41313
  {
41230
41314
  path: "dist/src/search-catalogue.js",
41231
- sha256: "205bcc21e3d48f36b1b0d4501ab8a33b12f72d1998c74f7b40a9101328dfcbaa"
41315
+ sha256: "e5cba3e769308123a560f7e9bcbb0f0ab36e428ce3631a173298953f063b8f7e"
41232
41316
  },
41233
41317
  {
41234
41318
  path: "dist/src/search-contracts.js",
@@ -41236,7 +41320,7 @@ var hybrid_axi_default = {
41236
41320
  },
41237
41321
  {
41238
41322
  path: "dist/src/search.js",
41239
- sha256: "03c3a4169cb5b731b820ef52278baf7573f9eaaf75b7c0a5f205de2751424da5"
41323
+ sha256: "bd9362c96f6ff2a90c3297308cb7e1ef91469a4b233228abfa3d7a8849d28204"
41240
41324
  },
41241
41325
  {
41242
41326
  path: "dist/src/session.js",
@@ -41268,7 +41352,7 @@ var hybrid_axi_default = {
41268
41352
  },
41269
41353
  {
41270
41354
  path: "dist/src/writes-core.js",
41271
- sha256: "c231cae7b8ee78090c4eee94b0f0f1bd0ab3aa9433d0a02711bbd923183f7dc2"
41355
+ sha256: "c91ce1b7b8e2735d60565e0cc043bc3aa76d7d31e81fa6745c01fbb42035baa0"
41272
41356
  },
41273
41357
  {
41274
41358
  path: "dist/src/writes.js",
@@ -41351,7 +41435,7 @@ var hybrid_axi_default = {
41351
41435
  }
41352
41436
  }
41353
41437
  },
41354
- skillSha256: "3b75c852fcfd4a18589145e1f7ae0cabac7e1896bd427d8ed8a3a43da989e20f",
41438
+ skillSha256: "1d0266cf0237630d063531b567a6b960dca48a731e7917e72b50fb59f757d384",
41355
41439
  nativeWriteSettings: {
41356
41440
  supportedOperations: [
41357
41441
  "convertQuickScan",
@@ -41533,7 +41617,8 @@ var hybrid_axi_default = {
41533
41617
  fields: "Comma-separated response fields; default compact fields",
41534
41618
  full: "Include all response fields; default false",
41535
41619
  hash: "One MD5/SHA1/SHA256/SHA512; exactly one selector required",
41536
- "hashes-file": "Newline-separated MD5/SHA1/SHA256 file; deprecated bulk route"
41620
+ "hashes-file": "Newline-separated MD5/SHA1/SHA256 file; deprecated bulk route",
41621
+ limit: "Local row limit; default 100; --full does not change it"
41537
41622
  }
41538
41623
  },
41539
41624
  {
@@ -41545,7 +41630,8 @@ var hybrid_axi_default = {
41545
41630
  profile: "Profile name; default profile precedence",
41546
41631
  fields: "Comma-separated response fields; default compact fields",
41547
41632
  full: "Include all response fields; default false",
41548
- labs: "Experimental Labs overview; default false"
41633
+ labs: "Experimental Labs overview; default false",
41634
+ limit: "Local row limit; default 100; --full does not change it"
41549
41635
  }
41550
41636
  },
41551
41637
  {
@@ -44293,8 +44379,9 @@ async function toolInput(tool, original) {
44293
44379
  const args = [...original];
44294
44380
  const input2 = {};
44295
44381
  let totalFileBytes = 0;
44296
- if ((tool === "az-axi" || tool === "hybrid-axi") && !args.some((arg) => ["--help", "-h", "--version", "-v", "-V"].includes(arg))) {
44297
- const fileFlags = tool === "hybrid-axi" ? hybrid_axi_default.adapterBoundary.inputFileFlags : az_axi_default.adapterBoundary.inputFileFlags;
44382
+ const hunting = tool === "mg-axi" && args.slice(0, 3).join(" ") === "security hunting query";
44383
+ if ((tool === "az-axi" || tool === "hybrid-axi" || hunting) && !args.some((arg) => ["--help", "-h", "--version", "-v", "-V"].includes(arg))) {
44384
+ const fileFlags = hunting ? ["file"] : tool === "hybrid-axi" ? hybrid_axi_default.adapterBoundary.inputFileFlags : az_axi_default.adapterBoundary.inputFileFlags;
44298
44385
  for (let index = 0; index < args.length; index++) {
44299
44386
  if (args[index] === "--") break;
44300
44387
  const [flag] = args[index].split("=");
@@ -44306,10 +44393,11 @@ async function toolInput(tool, original) {
44306
44393
  continue;
44307
44394
  }
44308
44395
  if (!path || path === "-") throw new ArtiumError("UNSUPPORTED_INPUT", "A file flag requires a local file path.");
44309
- const name = basename(path);
44396
+ if (hunting && (path.split(/[\\/]/).includes("..") || input2.files?.length)) throw new ArtiumError("INVALID_INPUT");
44397
+ const name = hunting ? "query.kql" : basename(path);
44310
44398
  if (input2.files?.some((file2) => file2.name === name)) throw new ArtiumError("INVALID_INPUT", "Upload file names must be distinct.");
44311
44399
  if ((input2.files?.length ?? 0) >= inputLimits.files) throw new ArtiumError("INVALID_INPUT", "Too many upload files.");
44312
- const content = await readBounded(createReadStream(path), inputLimits.fileBytes);
44400
+ const content = await readBounded(createReadStream(path), hunting ? 65536 : inputLimits.fileBytes);
44313
44401
  totalFileBytes += content.length;
44314
44402
  if (totalFileBytes > inputLimits.totalFileBytes) throw new ArtiumError("INVALID_INPUT", "Uploads exceed the total byte limit.");
44315
44403
  input2.files ??= [];
@@ -44452,6 +44540,7 @@ var ManagedSession = class _ManagedSession {
44452
44540
  }
44453
44541
  channel;
44454
44542
  session;
44543
+ refreshing;
44455
44544
  secrets = [];
44456
44545
  output = { stdout: "", stderr: "" };
44457
44546
  static async read(signIn = false) {
@@ -44497,17 +44586,25 @@ var ManagedSession = class _ManagedSession {
44497
44586
  }
44498
44587
  async authenticated(request, refresh) {
44499
44588
  if (!this.session) throw new ArtiumError("TOKEN_INVALID");
44589
+ const session = this.session;
44500
44590
  try {
44501
- return await request(this.session.accessToken);
44591
+ return await request(session.accessToken);
44502
44592
  } catch (error62) {
44503
44593
  if (!(error62 instanceof ArtiumError) || error62.code !== "TOKEN_EXPIRED" || !this.session.refreshToken) throw error62;
44504
44594
  }
44505
- const parsed = loginResponseSchema.safeParse(await refresh(this.session.refreshToken));
44506
- if (!parsed.success || parsed.data.status !== "authenticated" || !parsed.data.accessToken || !parsed.data.refreshToken) {
44507
- throw new ArtiumError("INVALID_RESPONSE");
44595
+ if (!this.refreshing && this.session.accessToken === session.accessToken) {
44596
+ this.refreshing = (async () => {
44597
+ const parsed = loginResponseSchema.safeParse(await refresh(session.refreshToken));
44598
+ if (!parsed.success || parsed.data.status !== "authenticated" || !parsed.data.accessToken || !parsed.data.refreshToken) {
44599
+ throw new ArtiumError("INVALID_RESPONSE");
44600
+ }
44601
+ await this.emit(session.serverUrl, parsed.data);
44602
+ this.session = { serverUrl: session.serverUrl, ...parsed.data };
44603
+ })().finally(() => {
44604
+ this.refreshing = void 0;
44605
+ });
44508
44606
  }
44509
- await this.emit(this.session.serverUrl, parsed.data);
44510
- this.session = { serverUrl: this.session.serverUrl, ...parsed.data };
44607
+ await this.refreshing;
44511
44608
  return request(this.session.accessToken);
44512
44609
  }
44513
44610
  protect(...secrets) {
@@ -44992,13 +45089,19 @@ remoteRevocation: ${verified ? "verified" : "unverified"}
44992
45089
  const client = new Client(process.env, managed);
44993
45090
  const homeSession = home && !managed ? client.sessions.read() : void 0;
44994
45091
  if (home && !managed && !homeSession) throw new ArtiumError("TOKEN_INVALID", void 0, "Run artium-axi login --username <username> --password-stdin.");
44995
- const result = await client.authenticated(home || whoami ? "/v1/me" : `/v1/tools${listing ? "" : `/${command}/run`}`, home || listing || whoami ? "GET" : "POST", input2, homeSession);
45092
+ const [result, homeTools] = (await Promise.allSettled([
45093
+ client.authenticated(home || whoami ? "/v1/me" : `/v1/tools${listing ? "" : `/${command}/run`}`, home || listing || whoami ? "GET" : "POST", input2, homeSession),
45094
+ home ? client.authenticated("/v1/tools", "GET", void 0, homeSession) : void 0
45095
+ ])).map((response) => {
45096
+ if (response.status === "rejected") throw response.reason;
45097
+ return response.value;
45098
+ });
44996
45099
  if (home || whoami) {
44997
45100
  const parsed = meResponseSchema.safeParse(result);
44998
45101
  if (!parsed.success) throw new ArtiumError("INVALID_RESPONSE");
44999
45102
  let view = identityView(parsed.data, client.serverUrl);
45000
45103
  if (home) {
45001
- const tools = toolsResponseSchema.safeParse(await client.authenticated("/v1/tools", "GET", void 0, homeSession));
45104
+ const tools = toolsResponseSchema.safeParse(homeTools);
45002
45105
  if (!tools.success) throw new ArtiumError("INVALID_RESPONSE");
45003
45106
  const executable = resolve4(process.argv[1]);
45004
45107
  const local = relative(homedir3(), executable);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@knowttl/artium-axi",
3
- "version": "0.0.15",
3
+ "version": "0.0.17",
4
4
  "description": "Client CLI and embedded skill for the Artium managed tools server.",
5
5
  "license": "MIT",
6
6
  "type": "module",