@knowttl/tenable-axi 0.1.2 → 0.1.4

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
@@ -1,351 +1,147 @@
1
1
  # tenable-axi
2
2
 
3
- Investigate Tenable One exposure through compact TOON output and explicitly guarded business writes.
4
- It uses TypeScript on Node.js 22.12 or later and is packaged as `@knowttl/tenable-axi`.
5
- This is the pre-release source; publication follows separate live acceptance and release approval.
3
+ Investigate Tenable One exposure and run explicitly guarded writes
4
+
5
+ [![npm version](https://img.shields.io/npm/v/@knowttl/tenable-axi)](https://www.npmjs.com/package/@knowttl/tenable-axi) [![License](https://img.shields.io/github/license/knowttl/tenable-axi)](LICENSE) [![Node.js](https://img.shields.io/node/v/@knowttl/tenable-axi)](https://nodejs.org/) [![npm provenance](https://img.shields.io/badge/npm-provenance-blue)](https://www.npmjs.com/package/@knowttl/tenable-axi#provenance) [![AXI](https://img.shields.io/badge/AXI-agent%20experience-blue)](https://github.com/knowttl/axi)
6
+
7
+ [Why](#why-this-exists) · [Quickstart](#quickstart) · [Agents](#use-with-your-agent) · [Coverage](#what-it-covers) · [Safety](#safety) · [Configuration](#configuration) · [Output](#output-and-exit-codes) · [Troubleshooting](#troubleshooting) · [Contributing](#contributing) · [Security](#security) · [License](#license)
8
+
9
+ ## Why this exists
10
+
11
+ Tenable One spans inventory, attack paths and business workflows with different routes and permissions.
12
+ Agents and the humans running them need bounded evidence instead of large responses and guessed API calls.
13
+ tenable-axi exposes reviewed commands, validates responses and returns compact TOON with next-step hints.
14
+ Reads stay bounded, and writes require explicit scope, a preview and exact confirmation.
6
15
 
7
16
  ## Quickstart
8
17
 
9
- Install the released package globally, or use `npx -y @knowttl/tenable-axi` in place of `tenable-axi` once published.
10
- Until then, use the [local development commands](#development-and-testing).
18
+ Requires Node.js 22.12 or later.
19
+ Install globally, or run `npx -y @knowttl/tenable-axi` without installing:
11
20
 
12
21
  ```sh
13
22
  npm install --global @knowttl/tenable-axi
14
- tenable-axi config path
15
- tenable-axi profile list
23
+ tenable-axi
16
24
  ```
17
25
 
18
- Save this configuration at the reported config path and supply the two environment variables through your secret manager.
19
- Secret values never belong in arguments, chat, or configuration JSON.
20
-
21
- ```json
22
- {
23
- "version": 1,
24
- "defaultProfile": "example",
25
- "profiles": {
26
- "example": {
27
- "origin": "https://cloud.tenable.com",
28
- "accessKey": { "env": "TENABLE_AXI_ACCESS_KEY" },
29
- "secretKey": { "env": "TENABLE_AXI_SECRET_KEY" },
30
- "writes": { "allowWrites": false, "operations": [] }
31
- }
32
- }
33
- }
26
+ An unconfigured home stays offline and prints this excerpt:
27
+
28
+ ```text
29
+ status: not configured
34
30
  ```
35
31
 
36
- Config files must be owned regular files without group/other write access; use `chmod 600 <config-path>` on Unix.
37
- SecretRefs also accept `{"file":"/absolute/path"}` to a protected secret file with no group/other permission bits.
38
- Windows uses protected DACLs; UNC and device paths are refused.
39
- No login command, credential minting, arbitrary HTTP, alternate origin or TLS bypass is available.
32
+ Supply `TENABLE_AXI_ACCESS_KEY` and `TENABLE_AXI_SECRET_KEY` through your secret manager.
33
+ Then check local credentials and read up to ten assets:
40
34
 
41
35
  ```sh
42
- tenable-axi auth status --profile example
43
- tenable-axi doctor --profile example
44
- tenable-axi asset list --profile example --limit 10
45
- tenable-axi finding list --profile example --filter 'severity = ["HIGH"]'
36
+ tenable-axi auth status
37
+ tenable-axi asset list --limit 10
46
38
  ```
47
39
 
48
- `auth status` is local; `doctor` makes one bounded tag-properties read and does not prove other module permissions.
49
- Configured home reads up to five live exposure cards; unconfigured home stays offline.
50
- Only `https://cloud.tenable.com` is supported.
51
- Upstream licensing and the user's per-operation permissions still apply.
52
- HTTP 403 returns `PERMISSION_DENIED` with “Not licensed or not permitted for this key” and advice naming the required privilege where documented.
53
- Inventory needs `EXPOSURE_MANAGEMENT.INVENTORY.INVENTORY.READ`; inventory exports need its `EXPORT` privilege and attack exports need `EXPOSURE_MANAGEMENT.ATTACK_PATH.ATTACK_PATH.WRITE`.
54
- Connector logs have elevated permissions; their denial does not imply ordinary inventory users need Administrator.
40
+ For named profiles or file SecretRefs, run `tenable-axi config path` and follow [configuration](https://github.com/knowttl/tenable-axi/blob/main/docs/configuration.md).
41
+ Only `https://cloud.tenable.com` is supported; licensing and upstream permissions still apply.
55
42
 
56
43
  ## Use with your agent
57
44
 
58
- Install optional hooks for ambient local context after installing the binary in a stable location:
59
-
60
45
  ```sh
61
46
  tenable-axi setup hooks
62
- ```
63
-
64
- This explicit opt-in installs or repairs Claude Code and Codex SessionStart hooks and an OpenCode managed plugin.
65
- Ordinary commands never install integrations.
66
- POSIX SessionStart hooks use the first executable on PATH only if it matches this installation, otherwise retaining the absolute hook path.
67
- Windows SessionStart hooks and the OpenCode plugin invoke Node with the absolute hook script path; rerun setup after relocating Node or the installation.
68
- Repeated setup preserves unrelated integrations and makes no changes when already current.
69
- Restart the agent session after setup.
70
- The hook prints local profile/origin/write posture, resolves no secrets, and never contacts Tenable.
71
- It follows the session's `TENABLE_AXI_PROFILE` and `TENABLE_AXI_CONFIG`, so select those explicitly when working with multiple tenants.
72
- Use `tenable-axi setup hooks --scope project` for project-local hook entries and the OpenCode plugin.
73
- User setup honors `CLAUDE_CONFIG_DIR` (default `~/.claude`), `CODEX_HOME` (default `~/.codex`), and `$XDG_CONFIG_HOME/opencode` (default `~/.config/opencode`).
74
- Project hook destinations remain `.claude`, `.codex`, and `.opencode` under the working directory.
75
- Both scopes enable Codex's shared user-level hooks feature in the active `CODEX_HOME/config.toml`.
76
- No repository-local Tenable configuration is discovered automatically.
77
- To remove user hooks, remove only entries containing `tenable-axi-hook` from `settings.json` in the active Claude configuration directory and `hooks.json` in the active Codex directory, and the managed `plugins/axi-tenable-axi-hook.js` under OpenCode's active configuration directory.
78
- For project scope, remove the corresponding `.claude/settings.json`, `.codex/hooks.json` entries and `.opencode/plugins/axi-tenable-axi-hook.js` under that project.
79
- Keep unrelated entries and Codex's shared hooks feature enabled for other tools.
80
-
81
- The generated skill provides discovery on demand, with no session hook required:
82
-
83
- ```sh
84
47
  npx skills add knowttl/tenable-axi --skill tenable-axi
85
48
  ```
86
49
 
87
- Hooks and skill work independently or together.
88
- The skill uses non-interactive `npx -y @knowttl/tenable-axi` examples and ships inside the npm tarball.
89
-
90
- ## Configuration and safety
91
-
92
- Linux/macOS configuration uses absolute `$XDG_CONFIG_HOME/tenable-axi/config.json`, otherwise `~/.config/tenable-axi/config.json`.
93
- State uses absolute `$XDG_STATE_HOME/tenable-axi`, otherwise `~/.local/state/tenable-axi`.
94
- Windows uses `%APPDATA%\tenable-axi` for config and `%LOCALAPPDATA%\tenable-axi` for state, ignoring XDG.
95
- `--config` overrides `TENABLE_AXI_CONFIG`; `--profile` overrides `TENABLE_AXI_PROFILE`, then a complete environment profile, configured default, or sole profile is selected.
96
- A complete environment profile requires both `TENABLE_AXI_ACCESS_KEY` and `TENABLE_AXI_SECRET_KEY`; partial values fail rather than mixing credentials.
97
- Explicit file-selected profiles ignore environment profile fields.
98
- Environment profiles cannot enable writes.
99
- `TENABLE_AXI_READ_ONLY=1` or `true` forces read-only; `0`, `false`, or unset permits the configured policy, and other values fail closed.
100
- `TENABLE_AXI_WRITE_LOG` selects a private journal instead of the default state-directory `writes.log`.
101
-
102
- Writes require a file profile with `writes.allowWrites: true` and exact upstream operation IDs in `writes.operations`, including for previews.
103
- For example, allow only `inventory-export-assets` to preview or create asset exports.
104
- Run a write without `--execute` to inspect its redacted preview, then supply `--execute --confirm '<exact preview confirmation>'` after reviewing the target and effect.
105
- `--dry-run` is explicit preview and excludes `--execute`.
106
- The durable redacted journal records intent before sending once; ambiguous outcomes include audit IDs and must be reconciled before retrying.
107
- Credential, user, role and access-control administration stays blocked, including nested security fields in otherwise allowed payloads.
108
-
109
- ## Command reference
110
-
111
- The [generated reference](docs/commands.md) includes flags, defaults and examples from the executable catalogue.
112
- Use each leaf's `--help` for concise help; unknown flags and invalid combinations fail before credentials or HTTP.
113
- Bare `--version`, `-v` and `-V` print only the package version.
114
-
115
- <!-- command-registry:start -->
116
- | Command | Purpose |
117
- |---|---|
118
- | `tenable-axi asset list` | Search assets |
119
- | `tenable-axi asset properties` | Discover asset properties and supported operators |
120
- | `tenable-axi asset show` | Find one asset by exact ID search |
121
- | `tenable-axi attack-path list` | Search top attack paths using the published specification route |
122
- | `tenable-axi attack-technique list` | Search top attack techniques; affectedAssets counts assets_ids |
123
- | `tenable-axi auth status` | Check local credentials and file security without contacting Tenable |
124
- | `tenable-axi card list` | List exposure view cards |
125
- | `tenable-axi card show` | Show an exposure card and its scores, trends and SLA details |
126
- | `tenable-axi combination create` | Preview or create combination |
127
- | `tenable-axi combination delete` | Preview or delete combination |
128
- | `tenable-axi combination filters` | List allowed combination query properties and operators |
129
- | `tenable-axi combination list` | list combinations |
130
- | `tenable-axi combination show` | show combination |
131
- | `tenable-axi combination update` | Preview or update combination |
132
- | `tenable-axi config path` | Show selected config and state paths without reading files |
133
- | `tenable-axi connector logs` | Read connector sync logs; the API has no server paging parameters |
134
- | `tenable-axi doctor` | Check local security and one tag-properties read without retries |
135
- | `tenable-axi export asset jobs` | List recent inventory asset export jobs |
136
- | `tenable-axi export asset start` | Preview or create an inventory asset export job |
137
- | `tenable-axi export attack download` | Download an attack export to a new file, redacting JSON/CSV within 128 MiB |
138
- | `tenable-axi export attack status` | Read an attack export job; no polling by default |
139
- | `tenable-axi export attack-path start` | Preview or start one attack-path export; requires configured write scope and ATTACK_PATH.WRITE |
140
- | `tenable-axi export attack-technique start` | Preview or start one attack-technique export; requires configured write scope and ATTACK_PATH.WRITE |
141
- | `tenable-axi export finding jobs` | List recent inventory finding export jobs |
142
- | `tenable-axi export finding start` | Preview or create an inventory finding export job |
143
- | `tenable-axi export inventory download` | Download one inventory chunk to a new redacted file |
144
- | `tenable-axi export inventory status` | Read one inventory export status without polling |
145
- | `tenable-axi export mitre-heatmap start` | Preview or start one mitre-heatmap export; requires configured write scope and ATTACK_PATH.WRITE |
146
- | `tenable-axi finding list` | Search findings |
147
- | `tenable-axi finding properties` | Discover finding properties and supported operators |
148
- | `tenable-axi finding show` | Find one finding by exact ID search |
149
- | `tenable-axi home` | Show profile state and up to five live exposure cards |
150
- | `tenable-axi hook` | Show compact local profile context without resolving secrets or HTTP |
151
- | `tenable-axi initiative create` | Preview or create initiative |
152
- | `tenable-axi initiative delete` | Preview or delete initiative |
153
- | `tenable-axi initiative list` | list initiatives |
154
- | `tenable-axi initiative show` | show initiative |
155
- | `tenable-axi initiative update` | Preview or update initiative |
156
- | `tenable-axi profile list` | List configured profiles without resolving secrets or contacting Tenable |
157
- | `tenable-axi setup hooks` | Explicitly install or repair local agent session integrations |
158
- | `tenable-axi software list` | Search software; the pinned API exposes no stable software ID |
159
- | `tenable-axi software properties` | Discover software properties and supported operators |
160
- | `tenable-axi tag asset-filter list` | List documented dynamic tag filter definitions |
161
- | `tenable-axi tag assignment add` | add tags for the exact asset set |
162
- | `tenable-axi tag assignment list` | List tags assigned to one asset |
163
- | `tenable-axi tag assignment remove` | remove tags for the exact asset set |
164
- | `tenable-axi tag category create` | Create platform tag category |
165
- | `tenable-axi tag category delete` | Delete platform tag category |
166
- | `tenable-axi tag category list` | List platform tag category |
167
- | `tenable-axi tag category show` | Show platform tag category |
168
- | `tenable-axi tag category update` | Update platform tag category |
169
- | `tenable-axi tag exclusion list` | List assets excluded from a dynamic tag |
170
- | `tenable-axi tag list` | Search Exposure Management tags |
171
- | `tenable-axi tag properties` | List available tag properties and operators |
172
- | `tenable-axi tag value bulk-delete` | Preview or delete the exact tag value set |
173
- | `tenable-axi tag value create` | Create platform tag value |
174
- | `tenable-axi tag value delete` | Delete platform tag value |
175
- | `tenable-axi tag value list` | List platform tag value |
176
- | `tenable-axi tag value show` | Show platform tag value |
177
- | `tenable-axi tag value update` | Update platform tag value |
178
- <!-- command-registry:end -->
179
-
180
- ## Shipped behavior
181
-
182
- Inventory reads and exports, attack searches and connector logs are implemented.
183
- Attack path, attack technique and MITRE heatmap exports support guarded creation, status and redacted file downloads.
184
- `tag list`, `tag properties`, `card list` and `card show` provide bounded Exposure Management reads.
185
- Platform tag categories, values, assignments, exclusions and dynamic filter definitions are implemented, including guarded mutations.
186
- Home shows up to five exposure cards when configured and setup guidance offline otherwise, without printing the executable path.
187
- Exposure response initiatives and combinations support reads and guarded writes, including allowed combination filters.
188
- `hook` reports local profile context without resolving secrets or contacting Tenable.
189
- Help, version, `auth status`, `profile list` and `config path` remain local.
190
-
191
- Credentials use the strict versioned config and SecretRefs described in [profiles and authentication](docs/design.md#profiles-and-authentication).
192
- Run `tenable-axi config path` to find the platform config path, or set both `TENABLE_AXI_ACCESS_KEY` and `TENABLE_AXI_SECRET_KEY` for an environment profile.
193
- Run `tenable-axi auth status` to check sources and file security locally without printing key values; `accessKey` and `secretKey` report only `env` or `file`.
194
- Home and auth status omit environment variable names and private configuration/secret paths from output and guidance; auth status no longer exposes a `config` field, including through `--fields`.
195
- The package ships [axi-credential.schema.json](axi-credential.schema.json) for hosts.
196
-
197
- The internal transport enforces the exact commercial origin, reviewed catalogue bindings, escaped paths, scoped continuations, and redirect refusal.
198
- One transport instance represents one invocation, sharing the [transport budgets](docs/design.md#transport-contract) across pages and retries.
199
- Read operations may retry 429/502/503/504 twice; writes require coordinator authorization and never replay automatically.
200
- Transport errors carry a stable code, operation, optional HTTP status and `retryAfter` in milliseconds, plus bounded redacted guidance.
201
- Production binds reviewed inventory search/properties and exports, Exposure Management tag and card reads, attack searches, attack exports, connector logs, platform tags and Exposure Response commands; offline tests use synthetic fixtures and a CA-verified loopback HTTPS fake through the internal construction seam.
202
- No flag or environment variable enables that seam in the CLI.
203
-
204
- Inventory and attack export creation, platform tag mutations and Exposure Response writes use the write coordinator and are read-only by default.
205
- It enforces immutable configured scope, redacted previews, exact confirmation, optional host approval, stale-state refusal and a durable private journal before a single authorized send.
206
- Unknown outcomes include an audit ID and read-back guidance and are never replayed.
207
- Named write commands register strict mutation definitions alongside transport bindings in the catalogue and call `createWriteCoordinator().run(operationId, input, options)`.
208
- State readers establish no-ops and include concurrency fields in the compared state; operation definitions own documented payload validation and read-back guidance.
209
-
210
- Use `initiative list/show/create/update/delete`, `combination list/show/create/update/delete` and `combination filters` for Exposure Response.
211
- Show, update and delete require `--id <uuid>`; create and update require a strict JSON `--body-file` (or `-` for stdin, at most 1 MiB).
212
- Updates send the complete replacement body, with the same required fields as creates.
213
- Initiative bodies contain `name`, `scope`, `combination_ids`, `tenable_ids`, `owner`, `sla_in_days` and optional `description`.
214
- Scope and each combination-ID array accept at most ten UUIDs; owner is an explicit UUID and SLA is a signed 32-bit integer as documented by the pinned schema.
215
- Previews read the selected combinations and enforce the seventeen-query initiative limit without discovering users or changing tags.
216
- Combination bodies contain `name`, `query`, `is_public` and optional `description`; queries use a single `{property, operator, value}` filter or nested `and`/`or` arrays with at most six conditions.
217
- `exists` and `nexists` allow an omitted value; `combination filters` reports supported properties, operators and value metadata.
218
- When selected, optional `allowedValues` and `selectMultiValue` remain absent if upstream omits them; malformed present values fail validation, including on cursor resume.
219
- The preview explicitly describes public or private visibility, owner and scope effects.
220
- Each write requires a file profile with `writes.allowWrites: true` and the exact `initiatives-create/update/delete` or `combinations-create/update/delete` operation IDs in `writes.operations`, including for preview.
221
- Run again with `--execute --confirm '<exact preview confirmation>'` to send once through the existing journal and read-only guards.
222
- Updates re-read the selected resource before sending and refuse changed state; identical updates/creates and verified absent deletes are no-ops.
223
- The API does not document conditional writes, so re-reading narrows the race without guaranteeing atomic comparison.
224
- Lists and allowed filters are unpaged upstream; `--limit` defaults to 100 and `--all` caps output at 10,000 rows.
225
- Their scoped cursors contain only a position and collection fingerprint, bounded at 1 KiB, without row data or invented server paging parameters.
226
- Resume re-fetches the collection with the original selectors and refuses changed collections; restart without `--cursor` if the collection changed.
227
- `combination list --type private|shared|tenable` scopes the upstream request; the displayed type uses that selector or the returned `is_public` value, and stays null when neither establishes it.
228
- No upstream total is supplied, so `total` remains null.
229
- Use `--fields` for documented wire fields or compact aliases (`slaInDays`, filter `property`); `--full` removes text truncation while retaining invocation bounds.
230
- Full-text hints omit `--execute` and `--confirm`, so following a write's hint previews without sending another mutation.
231
-
232
- Use `export asset start` or `export finding start` to preview the filters, properties, format and compression for a tenant-side job.
233
- The selected file profile must configure `writes.allowWrites: true` and allow the exact `inventory-export-assets` or `inventory-export-findings` operation, including for previews.
234
- Optional `--body-file` accepts strict documented query/filters JSON, or `-` for stdin, within 1 MiB.
235
- Query options use `--properties`, `--use-readable-name true|false`, `--max-chunk-file-size`, `--sort`, `--file-format JSON|CSV` and `--compress true|false`.
236
- Choose comma-separated `--properties` names from `asset properties` or `finding properties`; `id` maps to `asset_id` or `finding_id` respectively, while other names pass through unchanged.
237
- Run again with `--execute --confirm '<exact preview confirmation>'` to create once and return immediately; exports have no server dry run or idempotency guarantee.
238
- `TENABLE_AXI_READ_ONLY=true` overrides every configured write policy.
239
- `export asset jobs` and `export finding jobs` expose `--status` and `--limit` (default 100, maximum 1000), returning only the last three days without server paging or a claim of complete history.
240
- `export inventory status --id <id>` reads once without polling and reports available chunks.
241
- `export inventory download --id <id> --chunk <number> --output <new-file>` downloads one explicit chunk and prints file metadata only.
242
- Files are validated as JSON or CSV, scanned for secrets, redacted and published atomically without overwrite; gzip exports are decoded and re-encoded with the same format.
243
- Inventory JSON chunks must contain arrays of objects.
244
- See [download bounds](docs/design.md#collections-jobs-and-bounded-reads) for file size and decompression limits.
245
-
246
- Use `asset list/show/properties`, `finding list/show/properties`, and `software list/properties` with `--help` for their flags and examples.
247
- Lists default to 100 rows, expose upstream totals when supplied, and return a cursor when more rows remain.
248
- `--all` remains bounded by 10,000 rows and the shared transport budgets; resume with the returned `--cursor` and original selectors, filters, sort, and fields.
249
- Offset paging does not provide snapshot isolation.
250
- `--fields` selects display or wire properties and automatically requests extra properties; `--full` removes the 1,000-character text preview while retaining invocation bounds.
251
- For inventory reads and `tag list`, `--extra-properties` also adds the requested properties to the output, even when omitted from `--fields`.
252
- Simple filters use `--filter 'severity = ["HIGH"]'`; `--filter-file` accepts a flat JSON array of `{property, operator, value: string[]}` and rejects nested boolean expressions.
253
- Software defaults to name, version, and publisher because the pinned API exposes no stable software ID.
254
-
255
- `doctor` validates local configuration and file security, then performs exactly one tag-properties read without retries.
256
- It checks `EXPOSURE_MANAGEMENT.TAG.TAG.READ`, without claiming access to other modules.
257
- Collections expose returned count, upstream total when known, completeness and a scoped resume cursor.
258
- Card lists and home accept upstream pages of up to 25 cards even when fewer are requested, emit only the requested limit, and preserve overflow in a scoped, redacted cursor bounded at 64 KiB.
259
- Pages above 25 cards or cursors above this bound fail validation rather than dropping cards.
260
- Ordinary lists default to 100 output rows.
261
- `--all` remains subject to invocation budgets and the 10,000-row ceiling.
262
- Resume with `--cursor` and the same profile, fields, filters and sort.
263
- Offset pagination does not promise snapshot isolation.
264
- Tag `value` maps to the documented `name`; `category` requests `tag_category_name` through extra properties and remains null when unavailable.
265
- Explicit `--extra-properties tag_category_name` adds the `category` output field even when `--fields` omits it.
266
- Tag filter files contain the pinned API's strict array of `{property, operator, value}` filters, with string arrays for `value`; this endpoint does not define nested boolean filters.
267
- Use `--help` on each leaf for selectors and defaults.
268
-
269
- Use `tag category list/show/create/update/delete` and `tag value list/show/create/update/delete/bulk-delete` for platform tags.
270
- Category creates and updates require `--name`, with optional `--description`; show, update and delete select an exact `--id` UUID.
271
- Value creates and updates require `--body-file <file>` with only documented non-security fields; show, update and delete select an exact `--id` UUID.
272
- Creates accept category UUID or name, optional category description, value, description and dynamic filters; a new category name may create a category.
273
- Updates accept value, description, filters and the documented `version` field; read `tag value show --id <id> --fields id,value,version` before updating.
274
- Dynamic rules use `filters.asset.and` or `filters.asset.or` arrays of `{property, operator, value}`, where value is a string or string array, with at most 40 rules and 1024 values per rule.
275
- `tag asset-filter list` exposes available rule properties and operators and explains the resource-tag filters the upstream omits.
276
- Security fields, including nested `access_control`, are rejected before credentials or HTTP.
277
- Platform category/value list filters use repeatable `--filter 'field:operator:value'`, `--filter-type and|or` and comma-separated `--sort field:asc|desc`.
278
- Value wildcard search pairs `--with <text>` and `--with-filter category_name,value,description` with the documented `w` and `wf` parameters.
279
- `tag assignment list --asset-id <id>` reads one asset's assignments; `tag exclusion list --tag-id <id> --target-type assets` reads dynamic tag exclusions.
280
- Unpaged assignment/filter collections retain unreturned selected fields in bounded redacted cursors without inventing server paging parameters.
281
-
282
- Platform tag writes require `writes.allowWrites: true` and the exact operation ID from the [ledger](docs/design.md#complete-operation-ledger) in `writes.operations`, including for previews.
283
- They use the same preview, `--execute --confirm '<exact preview confirmation>'`, forced read-only override and private journal as export creation.
284
- `tag value bulk-delete --ids-file <file>` consumes a JSON array of exact value UUIDs.
285
- `tag assignment add/remove --asset-ids-file <file> --tag-ids-file <file>` consumes two JSON UUID arrays, confirms both complete sets, and returns one asynchronous job without polling.
286
- Input files accept `-` for stdin, with only one stdin consumer and a 1 MiB bound per file.
287
- State reads, including per-target checks for bulk operations, share invocation budgets; narrow large target sets when those budgets are exhausted.
288
- Identical verified updates/creates and already desired assignments return successful no-ops; an unverified missing-resource response remains an error.
289
- Deleting a category also deletes its values and assignments; deleting values removes their assignments while retaining the category.
290
- Value delete and bulk-delete accept unconstrained or undecodable HTTP 2xx replies as exit-0 success once the `SUCCESS` journal outcome is durably recorded.
291
- An undecodable reply includes a warning, audit ID and status; read back the target before retrying.
292
-
293
- Use `attack-path list`, `attack-technique list`, and `connector logs` with `--help` for their flags and examples.
294
- Attack paths use the published `/api/v1/t1/apa/top-attack-paths/search` route; the pyTenable route disagreement remains a live-acceptance check in the design.
295
- AI summarization defaults to false; explicitly enable it with `--run-ai-summarization true`.
296
- `--include-resolved` includes resolved paths or archived/resolved techniques.
297
- Attack filters accept `--filter 'priority gte 8'` or a `--filter-file` containing the documented single or nested filter object.
298
- Path logical operators use `AND`/`OR`; technique logical operators use `and`/`or`, with at most two logical levels in either case.
299
- Attack searches send at least 100 wire rows even for a smaller output limit, retaining excess selected fields in a bounded redacted cursor for resume.
300
- Technique `id` maps to `serial_id`, and `affectedAssets` counts the returned `assets_ids` array.
301
- Connector logs accept connector ID, sync status, and paired date boundaries (inclusive start, exclusive end), without invented server paging parameters.
302
- Log `timestamp` is the sync start time; use `--fields connectorId,status,sync_logs --full` for event details.
303
- Unpaged log collections retain unreturned rows for bounded local resume; if the upstream total exceeds the available collection, output reports that limitation and suggests narrowing the selectors.
304
- Connector log denial explains Administrator or the documented connector-read privilege without recommending Administrator for inventory access.
305
-
306
- Use `export attack-path start`, `export attack-technique start` or `export mitre-heatmap start` with a strict JSON `--body-file`, for example `{"file_format":"JSON"}`, using `"JSON"` or `"CSV"` and the operation's options from the [pinned specification](specs/exposure-management.json).
307
- The body is limited to 1 MiB; `--body-file -` reads stdin.
308
- Export filter logical operators use lowercase `and`/`or`, including attack path exports.
309
- Select a configured profile with `--profile`; its `writes.allowWrites` must be true and `writes.operations` must include the exact operation ID (`apa-export-attack-path`, `apa-export-attack-technique` or `apa-export-mitre-heatmap`), even for previews.
310
- Environment profiles cannot enable writes, and `TENABLE_AXI_READ_ONLY=true` blocks all creation.
311
- Preview first, then pass `--execute --confirm '<exact-preview-confirmation>'` to create one job and return immediately.
312
- Exports require `EXPOSURE_MANAGEMENT.ATTACK_PATH.ATTACK_PATH.WRITE` and the corresponding upstream entitlement.
313
- Use `export attack status --id <id>` for a single status read, or add `--wait` to poll within the shared deadline and request budgets.
314
- If a polling budget expires after a validated pending response, `--wait` returns the last validated job with `complete:false` and `reason:POLL_BUDGET_EXCEEDED`, including when retries exhaust the request budget or an in-flight poll reaches the deadline.
315
- Without a validated status, budget exhaustion remains an error; other polling failures remain errors.
316
- Use `export attack download --id <id> --output <new-file>` to download JSON or CSV, including gzip-encoded files, with format-aware secret redaction and atomic publication within the [download bounds](docs/design.md#collections-jobs-and-bounded-reads).
317
- Attack JSON downloads accept arrays of objects and top-level objects, including MITRE heatmap Navigator layers.
318
- Downloads refuse overwrite and print file metadata only.
319
- Attack and inventory job namespaces are separate; these commands never address inventory export jobs.
320
-
321
- See the [design](docs/design.md) for v1 scope, credentials, write policy, verification, and implementation slices.
322
- See [contributing](CONTRIBUTING.md) for development conventions.
323
-
324
- ## Development and testing
325
-
326
- ```sh
327
- corepack pnpm install --frozen-lockfile --ignore-scripts --config.confirm-modules-purge=false
328
- corepack pnpm run build
329
- node scripts/isolated.mjs node bin/tenable-axi.js --help
330
- node scripts/isolated.mjs node bin/tenable-axi.js --version
331
- corepack pnpm test
332
- corepack pnpm run lint
333
- corepack pnpm run spec:check
334
- corepack pnpm run docs:check
335
- ```
336
-
337
- See [verification](CONTRIBUTING.md#verification) for offline isolation and test selection.
338
- The [capability map](docs/design.md#capability-map) defines planned v1 scope; the generated [inventory](inventory/capabilities.json) records every pinned operation's classification and does not enable execution.
339
- After catalogue changes, rebuild and run `corepack pnpm run docs:generate` to regenerate the README table, command reference and skill.
340
- Tests and manual CLI checks use temporary HOME/XDG directories and synthetic fixtures, with no live tenant or real credentials.
341
- Pull requests are validated locally; hosted checks run only during [release publication](#releases).
342
-
343
- ## Releases
344
-
345
- Release-please owns versions, tags, release notes and changelog updates.
346
- The release workflow publishes only when release-please creates a release, after build, lint, offline fake tarball tests, spec and documentation checks.
347
- It publishes the verified tarball with npm provenance through OIDC trusted publishing, with no stored npm token.
348
- Before the first release, configure npm's trusted publisher for `knowttl/tenable-axi` and `.github/workflows/release-please.yml`, and complete the separate live acceptance in the design.
349
- This change does not publish a package or run that workflow.
350
-
351
- Licensed under the [MIT License](LICENSE).
50
+ Hooks inject local profile, origin and write posture at session start; the skill supplies command discovery on demand.
51
+ Both are optional, grant no permissions and work independently.
52
+ Restart the agent session after installing hooks.
53
+ The [compact agent guide](https://github.com/knowttl/tenable-axi/blob/main/skills/tenable-axi/SKILL.md) supplies investigation examples, output bounds, read allowlists and failure notes so agents can start without running help.
54
+ To remove hooks, delete only `tenable-axi-hook` entries in Claude's `settings.json` and Codex's `hooks.json`, plus OpenCode's `plugins/axi-tenable-axi-hook.js`.
55
+ See [agent integration](https://github.com/knowttl/tenable-axi/blob/main/docs/agent-integration.md) for active directories, project scope and removal.
56
+
57
+ ## What it covers
58
+
59
+ Start investigations from the [agent guide](https://github.com/knowttl/tenable-axi/blob/main/skills/tenable-axi/SKILL.md); use a leaf command's `--help` to recover from a failed or unfamiliar command.
60
+ The [generated command reference](https://github.com/knowttl/tenable-axi/blob/main/docs/commands.md) lists every leaf, flag and example.
61
+
62
+ | Group | Purpose | Access | Reference |
63
+ | --- | --- | --- | --- |
64
+ | `home`, `card` | Profile posture and exposure cards | Read | [Cards](https://github.com/knowttl/tenable-axi/blob/main/docs/commands.md#card-list) |
65
+ | `asset` | Search inventory and inspect assets | Read | [Assets](https://github.com/knowttl/tenable-axi/blob/main/docs/commands.md#asset-list) |
66
+ | `finding` | Search findings and count severity/sensor totals | Read | [Findings](https://github.com/knowttl/tenable-axi/blob/main/docs/commands.md#finding-list) |
67
+ | `software` | Search software and available properties | Read | [Software](https://github.com/knowttl/tenable-axi/blob/main/docs/commands.md#software-list) |
68
+ | `attack-path`, `attack-technique` | Investigate attack evidence | Read | [Attack paths](https://github.com/knowttl/tenable-axi/blob/main/docs/commands.md#attack-path-list) |
69
+ | `connector logs` | Inspect connector sync failures | Read | [Logs](https://github.com/knowttl/tenable-axi/blob/main/docs/commands.md#connector-logs) |
70
+ | `tag list/properties` | Search Exposure Management tags | Read | [Tag search](https://github.com/knowttl/tenable-axi/blob/main/docs/commands.md#tag-list) |
71
+ | `tag category/value/assignment/exclusion/asset-filter` | Inspect and manage platform tags | Read/write | [Platform tags](https://github.com/knowttl/tenable-axi/blob/main/docs/behavior.md#platform-tags) |
72
+ | `initiative`, `combination` | Manage Exposure Response workflows | Read/write | [Exposure Response](https://github.com/knowttl/tenable-axi/blob/main/docs/behavior.md#exposure-response) |
73
+ | `export` | Create jobs, check status and download results | Read/write | [Exports](https://github.com/knowttl/tenable-axi/blob/main/docs/behavior.md#inventory-exports) |
74
+ | `auth`, `profile`, `config`, `doctor` | Inspect setup and module access | Local/read | [Doctor](https://github.com/knowttl/tenable-axi/blob/main/docs/commands.md#doctor) |
75
+ | `setup hooks`, `hook` | Install integrations and read local context | Local | [Integration](https://github.com/knowttl/tenable-axi/blob/main/docs/agent-integration.md) |
76
+
77
+ ## Safety
78
+
79
+ Writes are read-only by default.
80
+ A file profile must enable `writes.allowWrites` and allow each exact operation ID in `writes.operations`, including for previews.
81
+ Preview first, then pass `--execute --confirm '<exact preview confirmation>'` to send once.
82
+ `TENABLE_AXI_READ_ONLY=true` forces read-only even when the profile allows writes.
83
+ There is no `TENABLE_AXI_ALLOW_*` environment gate; configured operation allowlists control scope.
84
+ A durable redacted journal records intent before sending; reconcile unknown outcomes before retrying.
85
+ Credentials use environment/file SecretRefs, never inline secrets or arguments.
86
+ Credential minting, users, roles, access-control administration and arbitrary HTTP stay blocked.
87
+ See [write safety](https://github.com/knowttl/tenable-axi/blob/main/docs/safety.md) and the [permission ledger](https://github.com/knowttl/tenable-axi/blob/main/docs/design.md#complete-operation-ledger).
88
+
89
+ ## Configuration
90
+
91
+ | Setting | Purpose | Default |
92
+ | --- | --- | --- |
93
+ | Linux/macOS config | Profile JSON | `~/.config/tenable-axi/config.json` |
94
+ | Windows config | Profile JSON | `%APPDATA%\tenable-axi\config.json` |
95
+ | Linux/macOS state | Private journal directory | `~/.local/state/tenable-axi` |
96
+ | Windows state | Private journal directory | `%LOCALAPPDATA%\tenable-axi` |
97
+ | `TENABLE_AXI_CONFIG` | Config file, overridden by `--config` | Platform config path |
98
+ | `TENABLE_AXI_PROFILE` | Named profile, overridden by `--profile` | Environment profile, configured default, or sole profile |
99
+ | `TENABLE_AXI_ACCESS_KEY`, `TENABLE_AXI_SECRET_KEY` | Complete environment credential pair | Unset |
100
+ | `TENABLE_AXI_ORIGIN` | Environment profile origin; only the exact commercial origin is valid | `https://cloud.tenable.com` |
101
+ | `TENABLE_AXI_READ_ONLY` | Force read-only with `1` or `true` | Unset; profile policy applies |
102
+ | `TENABLE_AXI_WRITE_LOG` | Private journal path | State directory's `writes.log` |
103
+ | `XDG_CONFIG_HOME`, `XDG_STATE_HOME` | Absolute Unix config/state bases | `~/.config`, `~/.local/state` |
104
+ | `APPDATA`, `LOCALAPPDATA` | Absolute Windows config/state bases | `~/AppData/Roaming`, `~/AppData/Local` |
105
+ | `CLAUDE_CONFIG_DIR`, `CODEX_HOME` | Hook configuration directories | `~/.claude`, `~/.codex` |
106
+ | `PATH` / `Path`, `PATHEXT` | Hook executable lookup and Windows extensions | Empty path; `.COM;.EXE;.BAT;.CMD` |
107
+
108
+ User OpenCode setup uses `XDG_CONFIG_HOME` or `~/.config`.
109
+ SecretRefs may name additional environment variables explicitly.
110
+ See [configuration](https://github.com/knowttl/tenable-axi/blob/main/docs/configuration.md) for precedence, file security and a minimal profile.
111
+
112
+ ## Output and exit codes
113
+
114
+ Stdout uses compact TOON; bare `--version`, `-v` and `-V` print the package version.
115
+ `--fields` selects properties and `--full` removes text truncation without expanding row or transport bounds.
116
+ Ordinary lists default to 100 rows; `--all` remains bounded at 10,000.
117
+ Resume a returned `--cursor` with the same profile, filters, fields and sort.
118
+ Inspect `complete` and `reason` before treating a result as exhaustive.
119
+ See [behavior](https://github.com/knowttl/tenable-axi/blob/main/docs/behavior.md) for collection-specific limits and downloads.
120
+
121
+ | Code | Meaning |
122
+ | --- | --- |
123
+ | 0 | Success, including previews and verified no-ops |
124
+ | 1 | Configuration, authentication, permission, transport or operation failure |
125
+ | 2 | CLI usage validation error |
126
+
127
+ ## Troubleshooting
128
+
129
+ | Symptom | Next step |
130
+ | --- | --- |
131
+ | `PERMISSION_DENIED` / HTTP 403 | Check licensing and the operation's privilege; run `doctor` for module-level advice. |
132
+ | `CONFIG_INVALID` with environment credentials | Set both keys and use only the supported origin; partial environment profiles fail closed. |
133
+ | `CONFIG_INSECURE` | Use an owned regular file with mode 600 on Unix or a protected Windows DACL. |
134
+ | Writes refused | Check the file profile's operation allowlist and forced read-only setting. |
135
+ | Cursor rejected after collection changes | Restart without the cursor and retain the original selectors. |
136
+
137
+ ## Contributing
138
+
139
+ See [CONTRIBUTING.md](https://github.com/knowttl/tenable-axi/blob/main/CONTRIBUTING.md) for offline verification, documentation generation and releases, and [AGENTS.md](https://github.com/knowttl/tenable-axi/blob/main/AGENTS.md) for agent contribution rules.
140
+
141
+ ## Security
142
+
143
+ Report vulnerabilities using [SECURITY.md](https://github.com/knowttl/tenable-axi/blob/main/SECURITY.md).
144
+
145
+ ## License
146
+
147
+ [MIT](LICENSE).
@@ -63,9 +63,9 @@ export const attackCatalogue = {
63
63
  "attack-technique list": { description: "Search top attack techniques; affectedAssets counts assets_ids", operationId: "apa-attack-techniques-search",
64
64
  flags: { ...common, ...search }, defaultFields: ["id", "name", "affectedAssets"],
65
65
  examples: ["tenable-axi attack-technique list --limit 20", "tenable-axi attack-technique list --sort priority:desc --include-resolved"], evidence: "specs/exposure-management.json" },
66
- "connector logs": { description: "Read connector sync logs; the API has no server paging parameters", operationId: "connectors-logs",
66
+ "connector logs": { description: "Read connector sync logs with sync identity, trigger, first FAILED stage and first ERROR summary (falling back to text); the API has no server paging parameters", operationId: "connectors-logs",
67
67
  flags: { ...common, "connector-id": "Nonnegative numeric connector ID", status: "SUCCEEDED|FAILED",
68
68
  "start-date": "Inclusive YYYY-MM-DD; requires --end-date", "end-date": "Exclusive YYYY-MM-DD; requires --start-date" },
69
- defaultFields: ["connectorId", "status", "timestamp"], examples: ["tenable-axi connector logs --connector-id 1 --limit 20",
69
+ defaultFields: ["connectorId", "status", "timestamp", "syncUuid", "type", "triggerReason", "failedStage", "error"], examples: ["tenable-axi connector logs --connector-id 1 --limit 20",
70
70
  "tenable-axi connector logs --status FAILED --start-date 2026-01-01 --end-date 2026-02-01"], evidence: "specs/exposure-management.json" },
71
71
  };
@@ -78,7 +78,8 @@ export async function attackCommand(argv, store, transportFactory = createTransp
78
78
  if (fields.some((field) => !/^[A-Za-z][A-Za-z0-9_]*$/.test(field)) || new Set(fields).size !== fields.length)
79
79
  usage("Fields must be unique comma-separated names");
80
80
  const schemas = logs ? logFields : technique ? techniqueFields : attackFields;
81
- const aliases = logs ? { connectorId: "connector_id", timestamp: "sync_timestamp" }
81
+ const aliases = logs ? { connectorId: "connector_id", timestamp: "sync_timestamp", syncUuid: "sync_uuid",
82
+ triggerReason: "trigger_reason", failedStage: "sync_stages_info", error: "sync_logs" }
82
83
  : technique ? { id: "serial_id", affectedAssets: "assets_ids" } : { id: "vector_id" };
83
84
  const wire = (field) => aliases[field] ?? field;
84
85
  if (fields.some((field) => !Object.hasOwn(schemas, wire(field))))
@@ -193,10 +194,20 @@ export async function attackCommand(argv, store, transportFactory = createTransp
193
194
  };
194
195
  const project = (row) => Object.fromEntries(fields.map((field) => {
195
196
  let value = row[wire(field)];
197
+ if (logs && ["failedStage", "error"].includes(field) && value === undefined)
198
+ return [field, null];
196
199
  if (value === undefined || !schemas[wire(field)].safeParse(value).success)
197
200
  invalid(`Missing or malformed selected field: ${field}`);
198
201
  if (logs && field === "timestamp")
199
202
  value = value.start;
203
+ if (logs && field === "failedStage")
204
+ value = value.find((stage) => stage.status === "FAILED")?.name ?? null;
205
+ if (logs && field === "error") {
206
+ const entry = value.find((entry) => entry.level === "ERROR");
207
+ value = entry?.summarized_text ?? entry?.text ?? null;
208
+ }
209
+ if (logs && ["failedStage", "error"].includes(field) && value !== null && typeof value !== "string")
210
+ invalid(`Malformed selected field: ${field}`);
200
211
  if (technique && field === "affectedAssets")
201
212
  value = value.length;
202
213
  return [field, preview(store.redactor.payload(value))];
@@ -53,7 +53,7 @@ function exposureCatalogue() {
53
53
  "card show": { description: "Show an exposure card and its scores, trends and SLA details", flags: { ...common, id: "Required card ID", "trend-start-date": "UTC ISO timestamp", "trend-end-date": "UTC ISO timestamp", "sla-efficiency-start-date": "UTC ISO timestamp", "sla-efficiency-end-date": "UTC ISO timestamp", "sla-breakdown-filter": "ANY, REMEDIATED or NON_REMEDIATED; default ANY", "include-trend-events": "true or false; default false" }, examples: ["tenable-axi card show --id <id>", "tenable-axi card show --id <id> --include-trend-events true"] },
54
54
  "tag list": { description: "Search Exposure Management tags", flags: { ...common, ...paging, query: "Simple text search", filter: "Repeatable: property operator JSON-array-of-strings", "filter-file": "Strict documented tag filter array; incompatible with --filter", sort: "property:asc or property:desc", "extra-properties": "Comma-separated property names" }, examples: ["tenable-axi tag list", "tenable-axi tag list --query production --limit 10"] },
55
55
  "tag properties": { description: "List available tag properties and operators", flags: common, examples: ["tenable-axi tag properties", "tenable-axi tag properties --fields property,operators"] },
56
- doctor: { description: "Check local security and one tag-properties read without retries", flags: common, examples: ["tenable-axi doctor", "tenable-axi doctor --profile example"] },
56
+ doctor: { description: "Check local security and read access to assets, findings, software, attack paths, attack techniques, initiatives, export jobs and connector logs without retries", flags: common, examples: ["tenable-axi doctor", "tenable-axi doctor --profile example"] },
57
57
  hook: { description: "Show compact local profile context without resolving secrets or HTTP", flags: common, examples: ["tenable-axi hook", "tenable-axi hook --profile example"] },
58
58
  };
59
59
  }