@knowttl/tenable-axi 0.1.5 → 0.1.7

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/docs/commands.md CHANGED
@@ -1,4 +1,4 @@
1
- <!-- Generated by scripts/generate-docs.mjs from src/catalogue.ts. Do not hand-edit. -->
1
+ <!-- Generated by scripts/generate-docs.ts from src/catalogue.ts. Do not hand-edit. -->
2
2
 
3
3
  # Command reference
4
4
 
@@ -6,6 +6,7 @@ Investigate Tenable One exposure and run explicitly guarded writes.
6
6
 
7
7
  ## Contents
8
8
 
9
+ - [asset investigate](#asset-investigate)
9
10
  - [asset list](#asset-list)
10
11
  - [asset properties](#asset-properties)
11
12
  - [asset show](#asset-show)
@@ -46,6 +47,8 @@ Investigate Tenable One exposure and run explicitly guarded writes.
46
47
  - [initiative show](#initiative-show)
47
48
  - [initiative update](#initiative-update)
48
49
  - [profile list](#profile-list)
50
+ - [raw get](#raw-get)
51
+ - [raw write](#raw-write)
49
52
  - [setup hooks](#setup-hooks)
50
53
  - [software list](#software-list)
51
54
  - [software properties](#software-properties)
@@ -72,6 +75,7 @@ Investigate Tenable One exposure and run explicitly guarded writes.
72
75
 
73
76
  | Command | Purpose |
74
77
  |---|---|
78
+ | `tenable-axi asset investigate` | Resolve a unique asset text query and read its findings within one shared invocation budget; ambiguous or incomplete lookups never pivot |
75
79
  | `tenable-axi asset list` | Search assets |
76
80
  | `tenable-axi asset properties` | Discover asset properties and supported operators |
77
81
  | `tenable-axi asset show` | Find one asset by exact ID search |
@@ -98,7 +102,7 @@ Investigate Tenable One exposure and run explicitly guarded writes.
98
102
  | `tenable-axi export finding jobs` | List recent inventory finding export jobs |
99
103
  | `tenable-axi export finding start` | Preview or create an inventory finding export job |
100
104
  | `tenable-axi export inventory download` | Download one inventory chunk to a new redacted file |
101
- | `tenable-axi export inventory status` | Read one inventory export status without polling |
105
+ | `tenable-axi export inventory status` | Read one inventory export status; no polling by default |
102
106
  | `tenable-axi export mitre-heatmap start` | Preview or start one mitre-heatmap export; requires configured write scope and ATTACK_PATH.WRITE |
103
107
  | `tenable-axi finding list` | Search findings |
104
108
  | `tenable-axi finding properties` | Discover finding properties and supported operators |
@@ -112,6 +116,8 @@ Investigate Tenable One exposure and run explicitly guarded writes.
112
116
  | `tenable-axi initiative show` | show initiative |
113
117
  | `tenable-axi initiative update` | Preview or update initiative |
114
118
  | `tenable-axi profile list` | List configured profiles without resolving secrets or contacting Tenable |
119
+ | `tenable-axi raw get` | Read any Tenable API path on the exact origin with the selected profile keys |
120
+ | `tenable-axi raw write` | Send one raw write when the profile allows writes and the operation list includes raw-write |
115
121
  | `tenable-axi setup hooks` | Explicitly install or repair local agent session integrations |
116
122
  | `tenable-axi software list` | Search software; the pinned API exposes no stable software ID |
117
123
  | `tenable-axi software properties` | Discover software properties and supported operators |
@@ -137,6 +143,29 @@ Investigate Tenable One exposure and run explicitly guarded writes.
137
143
  Run each command with `--help` for concise help.
138
144
  Writes default to preview and require configured operation scope even for previews.
139
145
 
146
+ ## asset investigate
147
+
148
+ Resolve a unique asset text query and read its findings within one shared invocation budget; ambiguous or incomplete lookups never pivot
149
+
150
+ Operation: `inventory-findings-search`.
151
+
152
+ | Flag | Meaning |
153
+ |---|---|
154
+ | `--config` | Config path; default credential precedence |
155
+ | `--profile` | Profile name; default credential precedence |
156
+ | `--fields` | Comma-separated display or wire properties; display names: id, name, severity, state, sensor_type; default compact view |
157
+ | `--full` | Show untruncated text; does not add fields or rows; default false |
158
+ | `--help` | Show help |
159
+ | `--query` | Required asset simple query text; lookup returns at most two compact asset candidates |
160
+ | `--limit` | Maximum emitted rows, 1-10000; default 100 |
161
+ | `--all` | Read up to 10000 rows within invocation budgets; excludes --limit |
162
+ | `--extra-properties` | Comma-separated extra wire properties |
163
+
164
+ ```sh
165
+ tenable-axi asset investigate --query example-device --limit 20
166
+ tenable-axi asset investigate --query example-device --fields id,name,severity,state,sensor_type,cves
167
+ ```
168
+
140
169
  ## asset list
141
170
 
142
171
  Search assets
@@ -571,10 +600,11 @@ Operation: `inventory-export-assets`.
571
600
  | `--dry-run` | Explicit preview; excludes --execute |
572
601
  | `--confirm` | Exact confirmation from preview |
573
602
  | `--intent-id` | Unique execution intent for replay protection |
603
+ | `--wait` | After confirmed creation, poll within the shared 20-second/20-request budgets; never creates a replacement; default false |
574
604
 
575
605
  ```sh
576
606
  tenable-axi export asset start --body-file scope.json
577
- tenable-axi export asset start --body-file scope.json --execute --confirm <confirmation>
607
+ tenable-axi export asset start --body-file scope.json --execute --confirm <confirmation> --wait
578
608
  ```
579
609
 
580
610
  ## export attack download
@@ -636,10 +666,11 @@ Operation: `apa-export-attack-path`.
636
666
  | `--execute` | Create the previewed job once; default false |
637
667
  | `--dry-run` | Preview only; excludes --execute |
638
668
  | `--confirm` | Exact confirmation string from preview; required with --execute |
669
+ | `--wait` | After confirmed creation, poll within the shared 20-second/20-request budgets; never creates a replacement; default false |
639
670
 
640
671
  ```sh
641
672
  tenable-axi export attack-path start --body-file export.json
642
- tenable-axi export attack-path start --body-file export.json --execute --confirm '<preview-confirmation>'
673
+ tenable-axi export attack-path start --body-file export.json --execute --confirm '<preview-confirmation>' --wait
643
674
  ```
644
675
 
645
676
  ## export attack-technique start
@@ -659,10 +690,11 @@ Operation: `apa-export-attack-technique`.
659
690
  | `--execute` | Create the previewed job once; default false |
660
691
  | `--dry-run` | Preview only; excludes --execute |
661
692
  | `--confirm` | Exact confirmation string from preview; required with --execute |
693
+ | `--wait` | After confirmed creation, poll within the shared 20-second/20-request budgets; never creates a replacement; default false |
662
694
 
663
695
  ```sh
664
696
  tenable-axi export attack-technique start --body-file export.json
665
- tenable-axi export attack-technique start --body-file export.json --execute --confirm '<preview-confirmation>'
697
+ tenable-axi export attack-technique start --body-file export.json --execute --confirm '<preview-confirmation>' --wait
666
698
  ```
667
699
 
668
700
  ## export finding jobs
@@ -710,10 +742,11 @@ Operation: `inventory-export-findings`.
710
742
  | `--dry-run` | Explicit preview; excludes --execute |
711
743
  | `--confirm` | Exact confirmation from preview |
712
744
  | `--intent-id` | Unique execution intent for replay protection |
745
+ | `--wait` | After confirmed creation, poll within the shared 20-second/20-request budgets; never creates a replacement; default false |
713
746
 
714
747
  ```sh
715
748
  tenable-axi export finding start --body-file scope.json
716
- tenable-axi export finding start --body-file scope.json --execute --confirm <confirmation>
749
+ tenable-axi export finding start --body-file scope.json --execute --confirm <confirmation> --wait
717
750
  ```
718
751
 
719
752
  ## export inventory download
@@ -740,7 +773,7 @@ tenable-axi export inventory download --id <id> --chunk 2 --output assets.csv.gz
740
773
 
741
774
  ## export inventory status
742
775
 
743
- Read one inventory export status without polling
776
+ Read one inventory export status; no polling by default
744
777
 
745
778
  Operation: `inventory-export-status`.
746
779
 
@@ -752,10 +785,11 @@ Operation: `inventory-export-status`.
752
785
  | `--full` | Full output; default false |
753
786
  | `--help` | Show help |
754
787
  | `--id` | Required export UUID |
788
+ | `--wait` | Poll once per second within 20-second/20-request budgets; default false |
755
789
 
756
790
  ```sh
757
791
  tenable-axi export inventory status --id <id>
758
- tenable-axi export inventory status --id <id> --fields id,state,createdAt
792
+ tenable-axi export inventory status --id <id> --wait
759
793
  ```
760
794
 
761
795
  ## export mitre-heatmap start
@@ -775,10 +809,11 @@ Operation: `apa-export-mitre-heatmap`.
775
809
  | `--execute` | Create the previewed job once; default false |
776
810
  | `--dry-run` | Preview only; excludes --execute |
777
811
  | `--confirm` | Exact confirmation string from preview; required with --execute |
812
+ | `--wait` | After confirmed creation, poll within the shared 20-second/20-request budgets; never creates a replacement; default false |
778
813
 
779
814
  ```sh
780
815
  tenable-axi export mitre-heatmap start --body-file export.json
781
- tenable-axi export mitre-heatmap start --body-file export.json --execute --confirm '<preview-confirmation>'
816
+ tenable-axi export mitre-heatmap start --body-file export.json --execute --confirm '<preview-confirmation>' --wait
782
817
  ```
783
818
 
784
819
  ## finding list
@@ -1034,6 +1069,47 @@ tenable-axi profile list
1034
1069
  tenable-axi profile list --config /example/config.json
1035
1070
  ```
1036
1071
 
1072
+ ## raw get
1073
+
1074
+ Read any Tenable API path on the exact origin with the selected profile keys
1075
+
1076
+ | Flag | Meaning |
1077
+ |---|---|
1078
+ | `--config` | Config path; default platform path |
1079
+ | `--profile` | Profile name; default credential precedence |
1080
+ | `--path` | Required absolute API path such as /api/v1/t1/tags/properties |
1081
+ | `--query` | URL query such as limit=10&offset=0 |
1082
+ | `--out` | Save response bytes to a new file |
1083
+ | `--help` | Show help; default false |
1084
+
1085
+ ```sh
1086
+ tenable-axi raw get --path /api/v1/t1/tags/properties
1087
+ tenable-axi raw get --path /api/v1/t1/tags/search --query limit=5
1088
+ ```
1089
+
1090
+ ## raw write
1091
+
1092
+ Send one raw write when the profile allows writes and the operation list includes raw-write
1093
+
1094
+ | Flag | Meaning |
1095
+ |---|---|
1096
+ | `--config` | Config path; default platform path |
1097
+ | `--profile` | Profile name; default credential precedence |
1098
+ | `--method` | Required POST, PUT, PATCH or DELETE |
1099
+ | `--path` | Required absolute API path such as /api/v1/... |
1100
+ | `--query` | URL query such as key=value |
1101
+ | `--body-file` | JSON body file or - for stdin |
1102
+ | `--execute` | Send after exact confirmation; default preview only |
1103
+ | `--dry-run` | Preview only; incompatible with --execute |
1104
+ | `--confirm` | Exact preview confirmation |
1105
+ | `--intent-id` | Optional durable intent identifier |
1106
+ | `--help` | Show help; default false |
1107
+
1108
+ ```sh
1109
+ tenable-axi raw write --method PATCH --path /api/v1/example --body-file body.json
1110
+ tenable-axi raw write --method PATCH --path /api/v1/example --body-file body.json --execute --confirm <preview confirm>
1111
+ ```
1112
+
1037
1113
  ## setup hooks
1038
1114
 
1039
1115
  Explicitly install or repair local agent session integrations
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@knowttl/tenable-axi",
3
- "version": "0.1.5",
3
+ "version": "0.1.7",
4
4
  "description": "Investigate Tenable One exposure and run explicitly guarded writes",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -34,13 +34,13 @@
34
34
  "packageManager": "pnpm@10.34.6",
35
35
  "scripts": {
36
36
  "build": "tsc -p tsconfig.json",
37
- "typecheck": "tsc --noEmit -p tsconfig.json",
37
+ "typecheck": "tsc --noEmit -p tsconfig.json && tsc -p tsconfig.tooling.json",
38
38
  "lint": "pnpm run typecheck",
39
- "test": "node scripts/isolated.mjs node scripts/test-changes.mjs",
40
- "docs:generate": "node scripts/generate-docs.mjs",
41
- "docs:check": "node scripts/generate-docs.mjs --check",
42
- "spec:generate": "node scripts/specs.mjs --generate",
43
- "spec:check": "node scripts/specs.mjs --check"
39
+ "test": "node scripts/isolated.ts node scripts/test-changes.ts",
40
+ "docs:generate": "node scripts/generate-docs.ts",
41
+ "docs:check": "node scripts/generate-docs.ts --check",
42
+ "spec:generate": "node scripts/specs.ts --generate",
43
+ "spec:check": "node scripts/specs.ts --check"
44
44
  },
45
45
  "dependencies": {
46
46
  "@toon-format/toon": "2.3.1",
@@ -3,7 +3,7 @@ name: tenable-axi
3
3
  description: "Investigate Tenable One assets, findings, software, exposure and attack evidence with bounded read-only commands; diagnose failures and distinguish guarded writes."
4
4
  ---
5
5
 
6
- <!-- Generated by scripts/generate-docs.mjs from src/catalogue.ts. Do not hand-edit. -->
6
+ <!-- Generated by scripts/generate-docs.ts from src/catalogue.ts. Do not hand-edit. -->
7
7
 
8
8
  # tenable-axi investigation guide
9
9
 
@@ -25,6 +25,7 @@ The fields shown are useful compact projections; omit `--fields` for the command
25
25
  |---|---|
26
26
  | Check credentials locally, without HTTP | `npx -y @knowttl/tenable-axi auth status` |
27
27
  | Look up an asset by text | `npx -y @knowttl/tenable-axi asset list --query example-device --class DEVICE --limit 10 --fields id,name,class,exposureScore` |
28
+ | Resolve a unique asset and read its findings | `npx -y @knowttl/tenable-axi asset investigate --query example-device --limit 20 --fields id,name,severity,state,sensor_type,cves` |
28
29
  | Read one exact asset, including observation evidence | `npx -y @knowttl/tenable-axi asset show --id asset-1 --fields id,name,fqdns,last_observed_at` |
29
30
  | Pivot from an asset ID to findings | `npx -y @knowttl/tenable-axi finding list --filter 'asset_id = ["asset-1"]' --limit 20 --fields id,name,severity,state,sensor_type,cves` |
30
31
  | Search high severity findings | `npx -y @knowttl/tenable-axi finding list --filter 'severity = ["HIGH"]' --filter 'sensor_type = ["NESSUS"]' --limit 20` |
@@ -40,6 +41,7 @@ The fields shown are useful compact projections; omit `--fields` for the command
40
41
  | Find Exposure Management tags | `npx -y @knowttl/tenable-axi tag list --query example --limit 10` |
41
42
  | Diagnose failed connector syncs | `npx -y @knowttl/tenable-axi connector logs --status FAILED --start-date 2026-01-01 --end-date 2026-02-01 --limit 10` |
42
43
  | Wait for an existing attack export | `npx -y @knowttl/tenable-axi export attack status --id 00000000-0000-4000-8000-000000000001 --wait` |
44
+ | Wait for an existing inventory export | `npx -y @knowttl/tenable-axi export inventory status --id 00000000-0000-4000-8000-000000000001 --wait` |
43
45
 
44
46
  Inventory filters are repeatable AND conditions with a JSON array of strings, even for numeric values.
45
47
  Inventory `--filter-file` accepts a flat JSON array and excludes `--filter`.
@@ -52,6 +54,11 @@ Connector defaults include sync identity, trigger, first failed stage and first
52
54
  Use list `--fields` to retrieve the needed evidence together instead of showing every result.
53
55
  Inventory selected extra fields are requested automatically; `--extra-properties` also adds them to output.
54
56
  Exact-ID `asset show` and `finding show` search directly without a preceding list.
57
+ `asset investigate --query <text>` returns compact asset candidates in `lookup` and pivots only after a complete, unique match.
58
+ Multiple candidates return `ASSET_AMBIGUOUS`; choose an exact ID explicitly before using `finding list`.
59
+ `--fields`, `--extra-properties`, `--limit` and `--all` control findings; asset evidence uses compact defaults.
60
+ Lookup and findings share one invocation budget; failures retain validated evidence and disclose incompleteness.
61
+ Resume a returned findings cursor with the suggested `finding list` command, preserving its asset filter and fields.
55
62
  `finding summary` is one CLI call making 19 sequential limit-1 reads without retries, using upstream totals.
56
63
  It has no filters or per-asset grouping; counts are independent, sensor values may overlap, and `complete: false` means partial counts.
57
64
 
@@ -62,24 +69,28 @@ Resume a returned `--cursor` with the same profile, filters, fields and sort; do
62
69
  `--full` removes the 1,000-character text preview, without adding fields, rows or budget.
63
70
  Connector logs have no server paging; `UPSTREAM_UNPAGED` means unavailable history, not an exhaustive empty result.
64
71
 
65
- Attack export status `--wait` polls once per second within 20 seconds/20 requests; inspect the returned state before downloading.
66
- There is no combined export start-and-wait, inventory-status wait, bulk show or asset-to-findings pivot command.
67
- Use a filtered list for multiple details; use the returned asset ID in a separate finding query.
72
+ Attack and inventory export status `--wait` poll once per second within 20 seconds/20 requests; inspect the returned state before downloading.
73
+ Pending jobs returned after a wait budget ends carry `complete: false` and `reason: POLL_BUDGET_EXCEEDED`; resume status with the same exact ID rather than starting a replacement.
74
+ There is no bulk show command.
75
+ Use a filtered list for multiple details.
68
76
  Software has no stable ID or show command.
69
77
 
70
78
  ## Read allowlist and state changes
71
79
 
72
80
  The table above is read-only, including POST searches and waiting on an existing export.
81
+ Export start commands accept `--wait` after `--execute --confirm '<exact-preview-confirmation>'`, sharing the creation deadline and request budget.
82
+ Preview, configured operation scope and the durable journal remain required; previews never poll, creation sends at most once and unknown outcomes never start a replacement.
83
+ A failed status read after creation retains the created job and audit ID with `complete: false` and an error; reconcile that ID instead of creating again.
73
84
  Other remote reads: `home`, `card show`, `tag properties`, platform `tag category/value list/show`, `tag assignment/exclusion/asset-filter list`, `initiative list/show`, `combination list/show/filters`, `export asset/finding jobs`, `export inventory status` and `doctor`.
74
85
  `doctor` makes eight module probes without retries; use it for access diagnosis, not before each case.
75
86
  Local reads: `auth status`, `profile list`, `config path`, `hook`, help and version.
76
87
  Configured home reads up to five live cards; the optional hook reads local posture only.
77
88
 
78
- Exclude all `create/update/delete/bulk-delete`, `tag assignment add/remove` and `export * start` commands from read allowlists.
89
+ Exclude all `create/update/delete/bulk-delete`, `tag assignment add/remove`, `export * start` and `raw write` commands from read allowlists.
79
90
  Writes require a file profile's `allowWrites` and exact operation allowlist even for previews, followed by `--execute` and the exact preview `--confirm` string.
80
91
  `TENABLE_AXI_READ_ONLY=true` forces read-only.
81
92
  Export downloads read remotely but create a local file at an explicit new output path; `setup hooks` changes local integration files and needs explicit installation intent.
82
- Users, roles, access control, credential minting and arbitrary HTTP are unavailable.
93
+ Users, roles, access control and credential minting are unavailable; raw HTTP is available through `raw get` and guarded `raw write` on validated paths.
83
94
 
84
95
  ## Help and failures
85
96
 
@@ -89,7 +100,7 @@ Leaf `--help` returns that command's flags, defaults, required selectors and exa
89
100
  Group-only help such as `asset --help` is unsupported and returns a usage error with valid commands.
90
101
  The [command reference](https://github.com/knowttl/tenable-axi/blob/main/docs/commands.md) lists the full surface.
91
102
 
92
- Stdout is structured TOON, including errors and actionable help.
103
+ Stdout is structured TOON, including errors and actionable help, except that successful raw responses stream bytes with the content type reported on stderr; see [raw API behavior](https://github.com/knowttl/tenable-axi/blob/main/docs/behavior.md#raw-api).
93
104
  Exit 0 means success (still inspect completeness), 1 means operation/configuration failure, and 2 means CLI usage validation failure.
94
105
 
95
106
  | Code | Adjustment |