@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 +123 -327
- package/dist/src/attack-catalogue.js +2 -2
- package/dist/src/attack.js +12 -1
- package/dist/src/catalogue.js +1 -1
- package/dist/src/exposure.js +30 -11
- package/dist/src/inventory-catalogue.d.ts +7 -0
- package/dist/src/inventory-catalogue.js +42 -6
- package/dist/src/inventory.js +48 -14
- package/docs/commands.md +163 -16
- package/package.json +1 -1
- package/skills/tenable-axi/SKILL.md +88 -83
package/dist/src/exposure.js
CHANGED
|
@@ -2,8 +2,8 @@ import { AxiError } from "axi-sdk-js";
|
|
|
2
2
|
import { createHash } from "node:crypto";
|
|
3
3
|
import { closeSync, openSync, readSync } from "node:fs";
|
|
4
4
|
import { z } from "zod";
|
|
5
|
-
import { catalogue, DESCRIPTION, SETUP_GUIDANCE } from "./catalogue.js";
|
|
6
|
-
import { cardDetails, cardRecord, properties, tagRecord
|
|
5
|
+
import { catalogue, DESCRIPTION, SETUP_GUIDANCE, transportBindings } from "./catalogue.js";
|
|
6
|
+
import { cardDetails, cardRecord, properties, tagRecord } from "./exposure-contracts.js";
|
|
7
7
|
import { createTransport, TransportError } from "./transport.js";
|
|
8
8
|
const operators = ["=", "!=", "<=", "between", "match", ">=", "<", ">", "contains", "not contains", "exists", "not exists", "older than", "newer than", "within last"];
|
|
9
9
|
const filterSchema = z.array(z.strictObject({ property: z.string().min(1), operator: z.enum(operators), value: z.array(z.string()) }));
|
|
@@ -61,7 +61,7 @@ export async function exposureCommand(argv, store, factory = createTransport) {
|
|
|
61
61
|
const displayArgs = argv.map((arg, index) => name === "home" && argv[index - 1] === "--config" ? "<config>" : arg);
|
|
62
62
|
const fullCommand = `tenable-axi ${displayArgs.map(quote).join(" ")} --full`;
|
|
63
63
|
const defaults = name === "tag list" ? ["id", "category", "value"] : name === "tag properties" ? ["property", "operators"]
|
|
64
|
-
: name === "doctor" ? ["profile", "origin", "readOnly", "
|
|
64
|
+
: name === "doctor" ? ["profile", "origin", "readOnly", "status", "checks"]
|
|
65
65
|
: name === "hook" ? ["profile", "origin", "readOnly"] : name === "card show" ? ["id", "name", "score", "ces_scores", "ces_trend", "exposure_classes_details"] : ["id", "name", "score"];
|
|
66
66
|
const available = name === "tag list" ? tagFields : name === "tag properties" ? propertyFields : name === "card show" ? detailFields
|
|
67
67
|
: ["doctor", "hook"].includes(name) ? defaults : cardFields;
|
|
@@ -220,15 +220,34 @@ export async function exposureCommand(argv, store, factory = createTransport) {
|
|
|
220
220
|
const keys = store.credentials(profile, name === "doctor");
|
|
221
221
|
const transport = factory({ keys, origin: profile.origin });
|
|
222
222
|
if (name === "doctor") {
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
223
|
+
const probes = [
|
|
224
|
+
{ module: "assets", operation: "inventory-assets-search", query: { offset: 0, limit: 1 }, body: {} },
|
|
225
|
+
{ module: "findings", operation: "inventory-findings-search", query: { offset: 0, limit: 1 }, body: {} },
|
|
226
|
+
{ module: "software", operation: "inventory-software-search", query: { offset: 0, limit: 1 }, body: {} },
|
|
227
|
+
{ module: "attack-paths", operation: "apa-attack-paths-search", query: { offset: 0, limit: 100, exclude_resolved: true, run_ai_summarization: "false" } },
|
|
228
|
+
{ module: "attack-techniques", operation: "apa-attack-techniques-search", query: { offset: 0, limit: 100, exclude_resolved: true } },
|
|
229
|
+
{ module: "initiatives", operation: "initiatives-list" },
|
|
230
|
+
{ module: "export-jobs", operation: "inventory-export-assets-jobs", query: { limit: 1 } },
|
|
231
|
+
{ module: "connector-logs", operation: "connectors-logs" },
|
|
232
|
+
];
|
|
233
|
+
const checks = [];
|
|
234
|
+
for (const probe of probes) {
|
|
235
|
+
const check = { module: probe.module, operation: probe.operation, privilege: transportBindings[probe.operation].permissionHelp };
|
|
236
|
+
try {
|
|
237
|
+
await transport.request(probe.operation, { ...(probe.query ? { query: probe.query } : {}),
|
|
238
|
+
...("body" in probe ? { body: probe.body } : {}), retry: false });
|
|
239
|
+
checks.push({ ...check, status: "ok" });
|
|
240
|
+
}
|
|
241
|
+
catch (error) {
|
|
242
|
+
if (!(error instanceof TransportError))
|
|
243
|
+
throw error;
|
|
244
|
+
checks.push({ ...check, status: error.error.status === 403 ? "permission-denied" : "error", error: error.error });
|
|
245
|
+
}
|
|
230
246
|
}
|
|
231
|
-
|
|
247
|
+
const ok = checks.every((check) => check.status === "ok");
|
|
248
|
+
if (!ok)
|
|
249
|
+
process.exitCode = 1;
|
|
250
|
+
return select({ ...context, status: ok ? "ok" : "error", checks });
|
|
232
251
|
}
|
|
233
252
|
const truncated = [];
|
|
234
253
|
function preview(value, path) {
|
|
@@ -11,8 +11,15 @@ export declare const defaultFields: {
|
|
|
11
11
|
finding: string[];
|
|
12
12
|
software: string[];
|
|
13
13
|
};
|
|
14
|
+
export declare const sortAliases: Record<InventoryKind, Record<string, string>>;
|
|
15
|
+
export declare const sortableFields: Record<InventoryKind, string[]>;
|
|
16
|
+
export declare const findingCountValues: {
|
|
17
|
+
severity: string[];
|
|
18
|
+
sensor_type: string[];
|
|
19
|
+
};
|
|
14
20
|
export declare const aliases: Record<InventoryKind, Record<string, string>>;
|
|
15
21
|
export declare const wireFields: Record<InventoryKind, Record<string, z.ZodType>>;
|
|
22
|
+
export declare const extraFields: Record<InventoryKind, Record<string, z.ZodType>>;
|
|
16
23
|
export declare const propertyFields: Record<string, z.ZodType>;
|
|
17
24
|
export declare const assetClasses: readonly ["ACCOUNT", "APPLICATION", "CONTAINER", "DEVICE", "GENERAL", "GROUP", "IAC", "IDENTITY", "RESOURCE", "ROLE", "STORAGE", "UNKNOWN"];
|
|
18
25
|
export declare const filterSchema: z.ZodObject<{
|
|
@@ -1,7 +1,31 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
export const inventoryKinds = { asset: "assets", finding: "findings", software: "software" };
|
|
3
|
-
export const defaultFields = { asset: ["id", "name", "class", "exposureScore"], finding: ["id", "name", "severity", "state"],
|
|
3
|
+
export const defaultFields = { asset: ["id", "name", "class", "exposureScore"], finding: ["id", "name", "severity", "state", "sensor_type"],
|
|
4
4
|
software: ["name", "version", "publisher"] };
|
|
5
|
+
const showFields = { asset: [...defaultFields.asset, "fqdns", "last_observed_at"],
|
|
6
|
+
finding: [...defaultFields.finding, "asset_id", "cves"], software: defaultFields.software };
|
|
7
|
+
export const sortAliases = {
|
|
8
|
+
asset: { id: "asset_id", name: "asset_name", class: "asset_class", exposureScore: "aes" },
|
|
9
|
+
finding: { id: "finding_id", name: "finding_name" }, software: { name: "application" },
|
|
10
|
+
};
|
|
11
|
+
// Sortable keys and count values come from the pinned properties-route examples.
|
|
12
|
+
export const sortableFields = {
|
|
13
|
+
asset: ["asset_id", "asset_class", "last_updated", "asset_name", "sources", "created_at", "first_observed_at", "last_observed_at",
|
|
14
|
+
"last_licensed_at", "fqdns", "aes", "critical_vuln_count", "high_vuln_count", "low_vuln_count", "is_licensed", "exposure_classes",
|
|
15
|
+
"tenable_uuid", "license_expires_at", "sensors", "critical_weakness_count", "high_weakness_count", "medium_weakness_count",
|
|
16
|
+
"low_weakness_count", "total_weakness_count", "tag_count", "entitlement_count"],
|
|
17
|
+
finding: ["finding_id", "state", "last_updated", "first_observed_at", "last_observed_at", "port", "protocol", "detection_id",
|
|
18
|
+
"finding_name", "solution", "severity", "vpr_score", "cves", "asset_id", "asset_name", "asset_class", "apa_total_steps_count",
|
|
19
|
+
"apa_low_steps_count", "apa_medium_steps_count", "apa_high_steps_count", "apa_critical_steps_count", "sensor_type"],
|
|
20
|
+
software: ["cpe", "publisher", "application", "version", "software_update", "edition", "software_edition", "target_software",
|
|
21
|
+
"target_hardware", "software_language", "software_other", "display_publisher", "display_application", "file_location",
|
|
22
|
+
"port_binding_count", "ports", "protocols", "last_seen_version", "eol_date", "devices_count", "version_count", "cpe_count",
|
|
23
|
+
"file_location_count", "type", "asset_sources", "last_seen", "first_seen", "category_names"],
|
|
24
|
+
};
|
|
25
|
+
export const findingCountValues = {
|
|
26
|
+
severity: ["Info", "Low", "Medium", "High", "Critical"],
|
|
27
|
+
sensor_type: ["ACCURICS", "INVENTORY", "RAPID_7", "SECURITY_CENTER", "CARBON_BLACK", "TVDB", "AWS", "OT", "CONSEC", "WAS", "ASM", "NESSUS", "CLOUD_SCAN", "TIE"],
|
|
28
|
+
};
|
|
5
29
|
export const aliases = {
|
|
6
30
|
asset: { class: "asset_class", exposureScore: "aes" }, finding: {}, software: { name: "application" },
|
|
7
31
|
};
|
|
@@ -10,6 +34,11 @@ export const wireFields = {
|
|
|
10
34
|
finding: { id: z.string(), name: z.string(), severity: z.string(), state: z.string(), asset_id: z.string() },
|
|
11
35
|
software: { application: z.string(), publisher: z.string(), type: z.array(z.string()), devices_count: z.number().int().nonnegative() },
|
|
12
36
|
};
|
|
37
|
+
export const extraFields = {
|
|
38
|
+
asset: { fqdns: z.array(z.string()), last_observed_at: z.string() },
|
|
39
|
+
finding: { cves: z.array(z.string()), sensor_type: z.string(), last_observed_at: z.string() },
|
|
40
|
+
software: {},
|
|
41
|
+
};
|
|
13
42
|
export const propertyFields = { key: z.string(), readable_name: z.string(), operators: z.array(z.string()),
|
|
14
43
|
sortable: z.boolean(), filterable: z.boolean(), control: z.record(z.string(), z.unknown()), description: z.string() };
|
|
15
44
|
export const assetClasses = ["ACCOUNT", "APPLICATION", "CONTAINER", "DEVICE", "GENERAL", "GROUP", "IAC", "IDENTITY", "RESOURCE", "ROLE", "STORAGE", "UNKNOWN"];
|
|
@@ -43,15 +72,22 @@ export const filterExamples = {
|
|
|
43
72
|
asset: 'asset_class = ["DEVICE"]', finding: 'severity = ["HIGH"]', software: 'application = ["example-app"]',
|
|
44
73
|
};
|
|
45
74
|
const common = (fields) => ({ config: "Config path; default credential precedence", profile: "Profile name; default credential precedence",
|
|
46
|
-
fields, full: "Show
|
|
47
|
-
const listFields = (kind) => `Comma-separated display or wire properties; display names: ${
|
|
75
|
+
fields, full: "Show untruncated text; does not add fields or rows; default false", help: "Show help" });
|
|
76
|
+
const listFields = (kind, fields = defaultFields[kind]) => `Comma-separated display or wire properties; display names: ${fields.join(", ")}; default compact view`;
|
|
48
77
|
const propertyFieldsHelp = `Comma-separated output fields; accepted: ${Object.keys(propertyFields).join(", ")}; default compact view`;
|
|
49
78
|
const collection = { limit: "Maximum emitted rows, 1-10000; default 100", all: "Read up to 10000 rows within invocation budgets; excludes --limit",
|
|
50
79
|
cursor: "Opaque resume cursor; retain the original selectors and filters" };
|
|
51
80
|
const search = { query: "Simple query text", filter: "Repeatable: <property> <operator> <JSON string array>",
|
|
52
81
|
"filter-file": "JSON flat array of {property, operator, value: string[]}; '-' reads stdin; excludes --filter",
|
|
53
|
-
sort: "
|
|
82
|
+
sort: "Sortable display or wire property:asc|desc; unknown names report valid choices", "extra-properties": "Comma-separated extra wire properties", offset: "Starting record; default 0; excludes --cursor" };
|
|
54
83
|
export const inventoryCatalogue = Object.fromEntries(Object.keys(inventoryKinds).flatMap((kind) => [
|
|
84
|
+
...(kind !== "finding" ? [] : [["finding summary", {
|
|
85
|
+
description: "Count findings by each published severity and sensor_type value using limit-1 searches; no per-asset grouping",
|
|
86
|
+
operationId: "inventory-findings-search", defaultFields: [], evidence: "specs/exposure-management.json",
|
|
87
|
+
flags: { config: "Config path; default credential precedence", profile: "Profile name; default credential precedence",
|
|
88
|
+
help: "Show help" },
|
|
89
|
+
examples: ["tenable-axi finding summary"],
|
|
90
|
+
}]]),
|
|
55
91
|
[`${kind} list`, { description: `Search ${inventoryKinds[kind]}${kind === "software" ? "; the pinned API exposes no stable software ID" : ""}`,
|
|
56
92
|
operationId: `inventory-${inventoryKinds[kind]}-search`, defaultFields: defaultFields[kind], evidence: "specs/exposure-management.json",
|
|
57
93
|
flags: { ...common(listFields(kind)), ...collection, ...search,
|
|
@@ -66,7 +102,7 @@ export const inventoryCatalogue = Object.fromEntries(Object.keys(inventoryKinds)
|
|
|
66
102
|
flags: { ...common(propertyFieldsHelp), ...collection, ...(kind === "asset" ? { "asset-classes": "Comma-separated documented asset classes" } : {}) },
|
|
67
103
|
examples: [`tenable-axi ${kind} properties`, `tenable-axi ${kind} properties --full`] }],
|
|
68
104
|
...(kind === "software" ? [] : [[`${kind} show`, { description: `Find one ${kind} by exact ID search`,
|
|
69
|
-
operationId: `inventory-${inventoryKinds[kind]}-search`, defaultFields:
|
|
70
|
-
flags: { ...common(listFields(kind)), id: "Required exact inventory ID", "extra-properties": search["extra-properties"] },
|
|
105
|
+
operationId: `inventory-${inventoryKinds[kind]}-search`, defaultFields: showFields[kind], evidence: "specs/exposure-management.json",
|
|
106
|
+
flags: { ...common(listFields(kind, showFields[kind])), id: "Required exact inventory ID", "extra-properties": search["extra-properties"] },
|
|
71
107
|
examples: [`tenable-axi ${kind} show --id <id>`, `tenable-axi ${kind} show --id <id> --fields id,name,description --full`] }]]),
|
|
72
108
|
]));
|
package/dist/src/inventory.js
CHANGED
|
@@ -2,7 +2,7 @@ import { AxiError } from "axi-sdk-js";
|
|
|
2
2
|
import { createHash } from "node:crypto";
|
|
3
3
|
import { closeSync, openSync, readSync } from "node:fs";
|
|
4
4
|
import { z } from "zod";
|
|
5
|
-
import { aliases, assetClasses, filterExamples, filterSchema, inventoryCatalogue, inventoryKinds, inventoryPage, propertyFields, wireFields } from "./inventory-catalogue.js";
|
|
5
|
+
import { aliases, assetClasses, extraFields, filterExamples, filterSchema, findingCountValues, inventoryCatalogue, inventoryKinds, inventoryPage, propertyFields, sortAliases, sortableFields, wireFields } from "./inventory-catalogue.js";
|
|
6
6
|
import { createTransport, TransportError } from "./transport.js";
|
|
7
7
|
const integer = z.number().int().nonnegative().max(Number.MAX_SAFE_INTEGER);
|
|
8
8
|
const cursorSchema = z.strictObject({ version: z.literal(1), scope: z.string(), offset: integer,
|
|
@@ -36,7 +36,7 @@ export async function inventoryCommand(argv, store, transportFactory = createTra
|
|
|
36
36
|
const usage = (message) => {
|
|
37
37
|
throw new AxiError(message, "VALIDATION_ERROR", [
|
|
38
38
|
entry ? `Valid flags for ${name}: ${Object.keys(entry.flags).map((flag) => `--${flag}`).join(", ")}`
|
|
39
|
-
: "Valid commands: asset list/show/properties, finding list/show/properties, software list/properties",
|
|
39
|
+
: "Valid commands: asset list/show/properties, finding list/show/properties/summary, software list/properties",
|
|
40
40
|
]);
|
|
41
41
|
};
|
|
42
42
|
if (!entry)
|
|
@@ -55,7 +55,8 @@ export async function inventoryCommand(argv, store, transportFactory = createTra
|
|
|
55
55
|
flags.set(flag, [...(flags.get(flag) ?? []), value]);
|
|
56
56
|
}
|
|
57
57
|
const get = (flag) => flags.get(`--${flag}`)?.[0];
|
|
58
|
-
const
|
|
58
|
+
const quote = (value) => `'${value.replaceAll("'", "'\\''")}'`;
|
|
59
|
+
const command = (exclude = []) => ["tenable-axi", name, ...[...flags].flatMap(([flag, values]) => exclude.includes(flag) ? [] : values.flatMap((value) => [flag, ...(["--all", "--full", "--help"].includes(flag) ? [] : [quote(value)])]))].join(" ");
|
|
59
60
|
if (get("help"))
|
|
60
61
|
return { command: name, description: entry.description, flags: entry.flags,
|
|
61
62
|
defaultFields: entry.defaultFields, examples: entry.examples };
|
|
@@ -101,9 +102,16 @@ export async function inventoryCommand(argv, store, transportFactory = createTra
|
|
|
101
102
|
if (!fields.includes(extra) && !projection.some(([, wire]) => wire === extra))
|
|
102
103
|
projection.push([extra, extra]);
|
|
103
104
|
}
|
|
104
|
-
|
|
105
|
+
let sort = get("sort");
|
|
105
106
|
if (sort !== undefined && !/^[A-Za-z0-9_]+:(asc|desc)$/.test(sort))
|
|
106
107
|
usage("--sort must be property:asc or property:desc");
|
|
108
|
+
if (sort !== undefined) {
|
|
109
|
+
const [field, direction] = sort.split(":");
|
|
110
|
+
const wire = sortAliases[kind][field] ?? field;
|
|
111
|
+
if (!sortableFields[kind].includes(wire))
|
|
112
|
+
usage(`Sortable properties: ${[...Object.keys(sortAliases[kind]), ...sortableFields[kind]].join(", ")}`);
|
|
113
|
+
sort = `${wire}:${direction}`;
|
|
114
|
+
}
|
|
107
115
|
const classes = get("asset-classes") ? names(get("asset-classes")) : get("class") ? [get("class")] : [];
|
|
108
116
|
if (classes.some((value) => !assetClasses.includes(value)))
|
|
109
117
|
usage(`Asset classes: ${assetClasses.join(", ")}`);
|
|
@@ -171,6 +179,26 @@ export async function inventoryCommand(argv, store, transportFactory = createTra
|
|
|
171
179
|
if (cursor && cursor.scope !== scope)
|
|
172
180
|
usage("Cursor belongs to a different profile, operation, filters, sort, or fields");
|
|
173
181
|
const transport = transportFactory({ origin: profile.origin, keys: store.credentials(profile) });
|
|
182
|
+
if (verb === "summary") {
|
|
183
|
+
const counts = { severity: [], sensor_type: [] };
|
|
184
|
+
try {
|
|
185
|
+
for (const [property, values] of Object.entries(findingCountValues))
|
|
186
|
+
for (const value of values) {
|
|
187
|
+
const response = await transport.request(operation, { query: { offset: 0, limit: 1 }, retry: false,
|
|
188
|
+
body: { filters: [{ property, operator: "=", value: [value] }] } });
|
|
189
|
+
const page = inventoryPage.parse(response.body);
|
|
190
|
+
if (page.pagination?.total === undefined)
|
|
191
|
+
throw new TransportError({ code: "RESPONSE_INVALID", message: "Finding count response is missing pagination.total", operation });
|
|
192
|
+
counts[property].push({ value, total: page.pagination.total });
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
catch (error) {
|
|
196
|
+
if (!(error instanceof TransportError))
|
|
197
|
+
throw error;
|
|
198
|
+
return { ...counts, complete: false, ...error.toJSON() };
|
|
199
|
+
}
|
|
200
|
+
return { ...counts, complete: true };
|
|
201
|
+
}
|
|
174
202
|
offset = cursor?.offset ?? offset;
|
|
175
203
|
let skip = cursor?.skip ?? 0;
|
|
176
204
|
let total = cursor?.total ?? null;
|
|
@@ -192,16 +220,22 @@ export async function inventoryCommand(argv, store, transportFactory = createTra
|
|
|
192
220
|
return value;
|
|
193
221
|
};
|
|
194
222
|
const invalid = (message) => { throw new TransportError({ code: "RESPONSE_INVALID", message, operation }); };
|
|
195
|
-
const project = (row) =>
|
|
196
|
-
const native = verb === "properties" || Object.hasOwn(wireFields[kind], wire);
|
|
223
|
+
const project = (row) => {
|
|
197
224
|
const extra = z.record(z.string(), z.unknown()).safeParse(row.extra_properties);
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
(
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
225
|
+
return Object.fromEntries(projection.map(([field, wire]) => {
|
|
226
|
+
const native = verb === "properties" || Object.hasOwn(wireFields[kind], wire);
|
|
227
|
+
if (!native && row.extra_properties !== undefined && !extra.success)
|
|
228
|
+
invalid("Malformed extra_properties container");
|
|
229
|
+
const value = native ? row[wire] : extra.success ? extra.data[wire] : undefined;
|
|
230
|
+
const schema = verb === "properties" ? propertyFields[field] : wireFields[kind][wire] ?? extraFields[kind][wire] ??
|
|
231
|
+
(field === "version" || field === "description" ? z.string() : z.json());
|
|
232
|
+
if (value === undefined)
|
|
233
|
+
return [field, null];
|
|
234
|
+
if (!schema.safeParse(value).success)
|
|
235
|
+
invalid(`Malformed selected property: ${field}`);
|
|
236
|
+
return [field, preview(store.redactor.payload(value))];
|
|
237
|
+
}));
|
|
238
|
+
};
|
|
205
239
|
const seen = new Set();
|
|
206
240
|
try {
|
|
207
241
|
while (rows.length < (verb === "show" ? 2 : rowLimit)) {
|
|
@@ -273,7 +307,7 @@ export async function inventoryCommand(argv, store, transportFactory = createTra
|
|
|
273
307
|
return { [kind]: rows[0], ...(truncated ? { help: [`Run ${command(["--full"])} --full to read complete text`] } : {}) };
|
|
274
308
|
}
|
|
275
309
|
const help = [];
|
|
276
|
-
const selectors = [get("config") ? `--config ${
|
|
310
|
+
const selectors = [get("config") ? `--config ${quote(get("config"))}` : "", get("profile") ? `--profile ${quote(get("profile"))}` : ""].filter(Boolean).join(" ");
|
|
277
311
|
if (verb === "list")
|
|
278
312
|
help.push(`Run tenable-axi ${kind} properties ${selectors}`.trim());
|
|
279
313
|
if (verb === "list" && kind !== "software")
|
package/docs/commands.md
CHANGED
|
@@ -3,6 +3,137 @@
|
|
|
3
3
|
# Command reference
|
|
4
4
|
|
|
5
5
|
Investigate Tenable One exposure and run explicitly guarded writes.
|
|
6
|
+
|
|
7
|
+
## Contents
|
|
8
|
+
|
|
9
|
+
- [asset list](#asset-list)
|
|
10
|
+
- [asset properties](#asset-properties)
|
|
11
|
+
- [asset show](#asset-show)
|
|
12
|
+
- [attack-path list](#attack-path-list)
|
|
13
|
+
- [attack-technique list](#attack-technique-list)
|
|
14
|
+
- [auth status](#auth-status)
|
|
15
|
+
- [card list](#card-list)
|
|
16
|
+
- [card show](#card-show)
|
|
17
|
+
- [combination create](#combination-create)
|
|
18
|
+
- [combination delete](#combination-delete)
|
|
19
|
+
- [combination filters](#combination-filters)
|
|
20
|
+
- [combination list](#combination-list)
|
|
21
|
+
- [combination show](#combination-show)
|
|
22
|
+
- [combination update](#combination-update)
|
|
23
|
+
- [config path](#config-path)
|
|
24
|
+
- [connector logs](#connector-logs)
|
|
25
|
+
- [doctor](#doctor)
|
|
26
|
+
- [export asset jobs](#export-asset-jobs)
|
|
27
|
+
- [export asset start](#export-asset-start)
|
|
28
|
+
- [export attack download](#export-attack-download)
|
|
29
|
+
- [export attack status](#export-attack-status)
|
|
30
|
+
- [export attack-path start](#export-attack-path-start)
|
|
31
|
+
- [export attack-technique start](#export-attack-technique-start)
|
|
32
|
+
- [export finding jobs](#export-finding-jobs)
|
|
33
|
+
- [export finding start](#export-finding-start)
|
|
34
|
+
- [export inventory download](#export-inventory-download)
|
|
35
|
+
- [export inventory status](#export-inventory-status)
|
|
36
|
+
- [export mitre-heatmap start](#export-mitre-heatmap-start)
|
|
37
|
+
- [finding list](#finding-list)
|
|
38
|
+
- [finding properties](#finding-properties)
|
|
39
|
+
- [finding show](#finding-show)
|
|
40
|
+
- [finding summary](#finding-summary)
|
|
41
|
+
- [home](#home)
|
|
42
|
+
- [hook](#hook)
|
|
43
|
+
- [initiative create](#initiative-create)
|
|
44
|
+
- [initiative delete](#initiative-delete)
|
|
45
|
+
- [initiative list](#initiative-list)
|
|
46
|
+
- [initiative show](#initiative-show)
|
|
47
|
+
- [initiative update](#initiative-update)
|
|
48
|
+
- [profile list](#profile-list)
|
|
49
|
+
- [setup hooks](#setup-hooks)
|
|
50
|
+
- [software list](#software-list)
|
|
51
|
+
- [software properties](#software-properties)
|
|
52
|
+
- [tag asset-filter list](#tag-asset-filter-list)
|
|
53
|
+
- [tag assignment add](#tag-assignment-add)
|
|
54
|
+
- [tag assignment list](#tag-assignment-list)
|
|
55
|
+
- [tag assignment remove](#tag-assignment-remove)
|
|
56
|
+
- [tag category create](#tag-category-create)
|
|
57
|
+
- [tag category delete](#tag-category-delete)
|
|
58
|
+
- [tag category list](#tag-category-list)
|
|
59
|
+
- [tag category show](#tag-category-show)
|
|
60
|
+
- [tag category update](#tag-category-update)
|
|
61
|
+
- [tag exclusion list](#tag-exclusion-list)
|
|
62
|
+
- [tag list](#tag-list)
|
|
63
|
+
- [tag properties](#tag-properties)
|
|
64
|
+
- [tag value bulk-delete](#tag-value-bulk-delete)
|
|
65
|
+
- [tag value create](#tag-value-create)
|
|
66
|
+
- [tag value delete](#tag-value-delete)
|
|
67
|
+
- [tag value list](#tag-value-list)
|
|
68
|
+
- [tag value show](#tag-value-show)
|
|
69
|
+
- [tag value update](#tag-value-update)
|
|
70
|
+
|
|
71
|
+
## All commands
|
|
72
|
+
|
|
73
|
+
| Command | Purpose |
|
|
74
|
+
|---|---|
|
|
75
|
+
| `tenable-axi asset list` | Search assets |
|
|
76
|
+
| `tenable-axi asset properties` | Discover asset properties and supported operators |
|
|
77
|
+
| `tenable-axi asset show` | Find one asset by exact ID search |
|
|
78
|
+
| `tenable-axi attack-path list` | Search top attack paths using the published specification route |
|
|
79
|
+
| `tenable-axi attack-technique list` | Search top attack techniques; affectedAssets counts assets_ids |
|
|
80
|
+
| `tenable-axi auth status` | Check local credentials and file security without contacting Tenable |
|
|
81
|
+
| `tenable-axi card list` | List exposure view cards |
|
|
82
|
+
| `tenable-axi card show` | Show an exposure card and its scores, trends and SLA details |
|
|
83
|
+
| `tenable-axi combination create` | Preview or create combination |
|
|
84
|
+
| `tenable-axi combination delete` | Preview or delete combination |
|
|
85
|
+
| `tenable-axi combination filters` | List allowed combination query properties and operators |
|
|
86
|
+
| `tenable-axi combination list` | list combinations |
|
|
87
|
+
| `tenable-axi combination show` | show combination |
|
|
88
|
+
| `tenable-axi combination update` | Preview or update combination |
|
|
89
|
+
| `tenable-axi config path` | Show selected config and state paths without reading files |
|
|
90
|
+
| `tenable-axi connector logs` | 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 |
|
|
91
|
+
| `tenable-axi doctor` | Check local security and read access to assets, findings, software, attack paths, attack techniques, initiatives, export jobs and connector logs without retries |
|
|
92
|
+
| `tenable-axi export asset jobs` | List recent inventory asset export jobs |
|
|
93
|
+
| `tenable-axi export asset start` | Preview or create an inventory asset export job |
|
|
94
|
+
| `tenable-axi export attack download` | Download an attack export to a new file, redacting JSON/CSV within 128 MiB |
|
|
95
|
+
| `tenable-axi export attack status` | Read an attack export job; no polling by default |
|
|
96
|
+
| `tenable-axi export attack-path start` | Preview or start one attack-path export; requires configured write scope and ATTACK_PATH.WRITE |
|
|
97
|
+
| `tenable-axi export attack-technique start` | Preview or start one attack-technique export; requires configured write scope and ATTACK_PATH.WRITE |
|
|
98
|
+
| `tenable-axi export finding jobs` | List recent inventory finding export jobs |
|
|
99
|
+
| `tenable-axi export finding start` | Preview or create an inventory finding export job |
|
|
100
|
+
| `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 |
|
|
102
|
+
| `tenable-axi export mitre-heatmap start` | Preview or start one mitre-heatmap export; requires configured write scope and ATTACK_PATH.WRITE |
|
|
103
|
+
| `tenable-axi finding list` | Search findings |
|
|
104
|
+
| `tenable-axi finding properties` | Discover finding properties and supported operators |
|
|
105
|
+
| `tenable-axi finding show` | Find one finding by exact ID search |
|
|
106
|
+
| `tenable-axi finding summary` | Count findings by each published severity and sensor_type value using limit-1 searches; no per-asset grouping |
|
|
107
|
+
| `tenable-axi home` | Show profile state and up to five live exposure cards |
|
|
108
|
+
| `tenable-axi hook` | Show compact local profile context without resolving secrets or HTTP |
|
|
109
|
+
| `tenable-axi initiative create` | Preview or create initiative |
|
|
110
|
+
| `tenable-axi initiative delete` | Preview or delete initiative |
|
|
111
|
+
| `tenable-axi initiative list` | list initiatives |
|
|
112
|
+
| `tenable-axi initiative show` | show initiative |
|
|
113
|
+
| `tenable-axi initiative update` | Preview or update initiative |
|
|
114
|
+
| `tenable-axi profile list` | List configured profiles without resolving secrets or contacting Tenable |
|
|
115
|
+
| `tenable-axi setup hooks` | Explicitly install or repair local agent session integrations |
|
|
116
|
+
| `tenable-axi software list` | Search software; the pinned API exposes no stable software ID |
|
|
117
|
+
| `tenable-axi software properties` | Discover software properties and supported operators |
|
|
118
|
+
| `tenable-axi tag asset-filter list` | List documented dynamic tag filter definitions |
|
|
119
|
+
| `tenable-axi tag assignment add` | add tags for the exact asset set |
|
|
120
|
+
| `tenable-axi tag assignment list` | List tags assigned to one asset |
|
|
121
|
+
| `tenable-axi tag assignment remove` | remove tags for the exact asset set |
|
|
122
|
+
| `tenable-axi tag category create` | Create platform tag category |
|
|
123
|
+
| `tenable-axi tag category delete` | Delete platform tag category |
|
|
124
|
+
| `tenable-axi tag category list` | List platform tag category |
|
|
125
|
+
| `tenable-axi tag category show` | Show platform tag category |
|
|
126
|
+
| `tenable-axi tag category update` | Update platform tag category |
|
|
127
|
+
| `tenable-axi tag exclusion list` | List assets excluded from a dynamic tag |
|
|
128
|
+
| `tenable-axi tag list` | Search Exposure Management tags |
|
|
129
|
+
| `tenable-axi tag properties` | List available tag properties and operators |
|
|
130
|
+
| `tenable-axi tag value bulk-delete` | Preview or delete the exact tag value set |
|
|
131
|
+
| `tenable-axi tag value create` | Create platform tag value |
|
|
132
|
+
| `tenable-axi tag value delete` | Delete platform tag value |
|
|
133
|
+
| `tenable-axi tag value list` | List platform tag value |
|
|
134
|
+
| `tenable-axi tag value show` | Show platform tag value |
|
|
135
|
+
| `tenable-axi tag value update` | Update platform tag value |
|
|
136
|
+
|
|
6
137
|
Run each command with `--help` for concise help.
|
|
7
138
|
Writes default to preview and require configured operation scope even for previews.
|
|
8
139
|
|
|
@@ -17,7 +148,7 @@ Operation: `inventory-assets-search`.
|
|
|
17
148
|
| `--config` | Config path; default credential precedence |
|
|
18
149
|
| `--profile` | Profile name; default credential precedence |
|
|
19
150
|
| `--fields` | Comma-separated display or wire properties; display names: id, name, class, exposureScore; default compact view |
|
|
20
|
-
| `--full` | Show
|
|
151
|
+
| `--full` | Show untruncated text; does not add fields or rows; default false |
|
|
21
152
|
| `--help` | Show help |
|
|
22
153
|
| `--limit` | Maximum emitted rows, 1-10000; default 100 |
|
|
23
154
|
| `--all` | Read up to 10000 rows within invocation budgets; excludes --limit |
|
|
@@ -25,7 +156,7 @@ Operation: `inventory-assets-search`.
|
|
|
25
156
|
| `--query` | Simple query text |
|
|
26
157
|
| `--filter` | Repeatable: <property> <operator> <JSON string array>, e.g. asset_class = ["DEVICE"] |
|
|
27
158
|
| `--filter-file` | JSON flat array of {property, operator, value: string[]}; '-' reads stdin; excludes --filter |
|
|
28
|
-
| `--sort` |
|
|
159
|
+
| `--sort` | Sortable display or wire property:asc\|desc; unknown names report valid choices |
|
|
29
160
|
| `--extra-properties` | Comma-separated extra wire properties |
|
|
30
161
|
| `--offset` | Starting record; default 0; excludes --cursor |
|
|
31
162
|
| `--class` | Server-side asset class filter |
|
|
@@ -47,7 +178,7 @@ Operation: `inventory-asset-properties-list`.
|
|
|
47
178
|
| `--config` | Config path; default credential precedence |
|
|
48
179
|
| `--profile` | Profile name; default credential precedence |
|
|
49
180
|
| `--fields` | Comma-separated output fields; accepted: key, readable_name, operators, sortable, filterable, control, description; default compact view |
|
|
50
|
-
| `--full` | Show
|
|
181
|
+
| `--full` | Show untruncated text; does not add fields or rows; default false |
|
|
51
182
|
| `--help` | Show help |
|
|
52
183
|
| `--limit` | Maximum emitted rows, 1-10000; default 100 |
|
|
53
184
|
| `--all` | Read up to 10000 rows within invocation budgets; excludes --limit |
|
|
@@ -69,8 +200,8 @@ Operation: `inventory-assets-search`.
|
|
|
69
200
|
|---|---|
|
|
70
201
|
| `--config` | Config path; default credential precedence |
|
|
71
202
|
| `--profile` | Profile name; default credential precedence |
|
|
72
|
-
| `--fields` | Comma-separated display or wire properties; display names: id, name, class, exposureScore; default compact view |
|
|
73
|
-
| `--full` | Show
|
|
203
|
+
| `--fields` | Comma-separated display or wire properties; display names: id, name, class, exposureScore, fqdns, last_observed_at; default compact view |
|
|
204
|
+
| `--full` | Show untruncated text; does not add fields or rows; default false |
|
|
74
205
|
| `--help` | Show help |
|
|
75
206
|
| `--id` | Required exact inventory ID |
|
|
76
207
|
| `--extra-properties` | Comma-separated extra wire properties |
|
|
@@ -354,7 +485,7 @@ tenable-axi config path --fields config
|
|
|
354
485
|
|
|
355
486
|
## connector logs
|
|
356
487
|
|
|
357
|
-
Read connector sync logs; the API has no server paging parameters
|
|
488
|
+
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
|
|
358
489
|
|
|
359
490
|
Operation: `connectors-logs`.
|
|
360
491
|
|
|
@@ -380,7 +511,7 @@ tenable-axi connector logs --status FAILED --start-date 2026-01-01 --end-date 20
|
|
|
380
511
|
|
|
381
512
|
## doctor
|
|
382
513
|
|
|
383
|
-
Check local security and
|
|
514
|
+
Check local security and read access to assets, findings, software, attack paths, attack techniques, initiatives, export jobs and connector logs without retries
|
|
384
515
|
|
|
385
516
|
| Flag | Meaning |
|
|
386
517
|
|---|---|
|
|
@@ -660,8 +791,8 @@ Operation: `inventory-findings-search`.
|
|
|
660
791
|
|---|---|
|
|
661
792
|
| `--config` | Config path; default credential precedence |
|
|
662
793
|
| `--profile` | Profile name; default credential precedence |
|
|
663
|
-
| `--fields` | Comma-separated display or wire properties; display names: id, name, severity, state; default compact view |
|
|
664
|
-
| `--full` | Show
|
|
794
|
+
| `--fields` | Comma-separated display or wire properties; display names: id, name, severity, state, sensor_type; default compact view |
|
|
795
|
+
| `--full` | Show untruncated text; does not add fields or rows; default false |
|
|
665
796
|
| `--help` | Show help |
|
|
666
797
|
| `--limit` | Maximum emitted rows, 1-10000; default 100 |
|
|
667
798
|
| `--all` | Read up to 10000 rows within invocation budgets; excludes --limit |
|
|
@@ -669,7 +800,7 @@ Operation: `inventory-findings-search`.
|
|
|
669
800
|
| `--query` | Simple query text |
|
|
670
801
|
| `--filter` | Repeatable: <property> <operator> <JSON string array>, e.g. severity = ["HIGH"] |
|
|
671
802
|
| `--filter-file` | JSON flat array of {property, operator, value: string[]}; '-' reads stdin; excludes --filter |
|
|
672
|
-
| `--sort` |
|
|
803
|
+
| `--sort` | Sortable display or wire property:asc\|desc; unknown names report valid choices |
|
|
673
804
|
| `--extra-properties` | Comma-separated extra wire properties |
|
|
674
805
|
| `--offset` | Starting record; default 0; excludes --cursor |
|
|
675
806
|
|
|
@@ -692,7 +823,7 @@ Operation: `inventory-finding-properties-list`.
|
|
|
692
823
|
| `--config` | Config path; default credential precedence |
|
|
693
824
|
| `--profile` | Profile name; default credential precedence |
|
|
694
825
|
| `--fields` | Comma-separated output fields; accepted: key, readable_name, operators, sortable, filterable, control, description; default compact view |
|
|
695
|
-
| `--full` | Show
|
|
826
|
+
| `--full` | Show untruncated text; does not add fields or rows; default false |
|
|
696
827
|
| `--help` | Show help |
|
|
697
828
|
| `--limit` | Maximum emitted rows, 1-10000; default 100 |
|
|
698
829
|
| `--all` | Read up to 10000 rows within invocation budgets; excludes --limit |
|
|
@@ -713,8 +844,8 @@ Operation: `inventory-findings-search`.
|
|
|
713
844
|
|---|---|
|
|
714
845
|
| `--config` | Config path; default credential precedence |
|
|
715
846
|
| `--profile` | Profile name; default credential precedence |
|
|
716
|
-
| `--fields` | Comma-separated display or wire properties; display names: id, name, severity, state; default compact view |
|
|
717
|
-
| `--full` | Show
|
|
847
|
+
| `--fields` | Comma-separated display or wire properties; display names: id, name, severity, state, sensor_type, asset_id, cves; default compact view |
|
|
848
|
+
| `--full` | Show untruncated text; does not add fields or rows; default false |
|
|
718
849
|
| `--help` | Show help |
|
|
719
850
|
| `--id` | Required exact inventory ID |
|
|
720
851
|
| `--extra-properties` | Comma-separated extra wire properties |
|
|
@@ -724,6 +855,22 @@ tenable-axi finding show --id <id>
|
|
|
724
855
|
tenable-axi finding show --id <id> --fields id,name,description --full
|
|
725
856
|
```
|
|
726
857
|
|
|
858
|
+
## finding summary
|
|
859
|
+
|
|
860
|
+
Count findings by each published severity and sensor_type value using limit-1 searches; no per-asset grouping
|
|
861
|
+
|
|
862
|
+
Operation: `inventory-findings-search`.
|
|
863
|
+
|
|
864
|
+
| Flag | Meaning |
|
|
865
|
+
|---|---|
|
|
866
|
+
| `--config` | Config path; default credential precedence |
|
|
867
|
+
| `--profile` | Profile name; default credential precedence |
|
|
868
|
+
| `--help` | Show help |
|
|
869
|
+
|
|
870
|
+
```sh
|
|
871
|
+
tenable-axi finding summary
|
|
872
|
+
```
|
|
873
|
+
|
|
727
874
|
## home
|
|
728
875
|
|
|
729
876
|
Show profile state and up to five live exposure cards
|
|
@@ -912,7 +1059,7 @@ Operation: `inventory-software-search`.
|
|
|
912
1059
|
| `--config` | Config path; default credential precedence |
|
|
913
1060
|
| `--profile` | Profile name; default credential precedence |
|
|
914
1061
|
| `--fields` | Comma-separated display or wire properties; display names: name, version, publisher; default compact view |
|
|
915
|
-
| `--full` | Show
|
|
1062
|
+
| `--full` | Show untruncated text; does not add fields or rows; default false |
|
|
916
1063
|
| `--help` | Show help |
|
|
917
1064
|
| `--limit` | Maximum emitted rows, 1-10000; default 100 |
|
|
918
1065
|
| `--all` | Read up to 10000 rows within invocation budgets; excludes --limit |
|
|
@@ -920,7 +1067,7 @@ Operation: `inventory-software-search`.
|
|
|
920
1067
|
| `--query` | Simple query text |
|
|
921
1068
|
| `--filter` | Repeatable: <property> <operator> <JSON string array>, e.g. application = ["example-app"] |
|
|
922
1069
|
| `--filter-file` | JSON flat array of {property, operator, value: string[]}; '-' reads stdin; excludes --filter |
|
|
923
|
-
| `--sort` |
|
|
1070
|
+
| `--sort` | Sortable display or wire property:asc\|desc; unknown names report valid choices |
|
|
924
1071
|
| `--extra-properties` | Comma-separated extra wire properties |
|
|
925
1072
|
| `--offset` | Starting record; default 0; excludes --cursor |
|
|
926
1073
|
|
|
@@ -941,7 +1088,7 @@ Operation: `inventory-software-properties-list`.
|
|
|
941
1088
|
| `--config` | Config path; default credential precedence |
|
|
942
1089
|
| `--profile` | Profile name; default credential precedence |
|
|
943
1090
|
| `--fields` | Comma-separated output fields; accepted: key, readable_name, operators, sortable, filterable, control, description; default compact view |
|
|
944
|
-
| `--full` | Show
|
|
1091
|
+
| `--full` | Show untruncated text; does not add fields or rows; default false |
|
|
945
1092
|
| `--help` | Show help |
|
|
946
1093
|
| `--limit` | Maximum emitted rows, 1-10000; default 100 |
|
|
947
1094
|
| `--all` | Read up to 10000 rows within invocation budgets; excludes --limit |
|