nsauditor-ai-agent-skill 0.2.52 → 0.2.53

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.
@@ -6,79 +6,86 @@ Complete data structures for all MCP tool inputs and outputs.
6
6
 
7
7
  ## Scan Result Schema (`scan_host` output)
8
8
 
9
- The Result Concluder (plugin 008) fuses all plugin outputs into a normalized structure:
9
+ `scan_host` returns the plugin run itself, with the Result Concluder's fused record inside it:
10
10
 
11
11
  ```json
12
12
  {
13
- "summary": {
14
- "host": "192.168.1.1",
15
- "scan_time": "2026-04-11T12:00:00.000Z",
16
- "duration_ms": 15432,
17
- "plugins_run": 16,
18
- "plugins_succeeded": 14,
19
- "plugins_failed": 2,
20
- "services_found": 8,
21
- "findings_count": 3
22
- },
23
- "host": {
24
- "ip": "192.168.1.1",
25
- "hostname": "router.local",
26
- "os": {
27
- "family": "Linux",
28
- "distro": "Ubuntu",
29
- "version": "22.04",
30
- "confidence": "high",
31
- "source": "os_detector"
32
- },
33
- "mac": "AA:BB:CC:DD:EE:FF",
34
- "vendor": "Ubiquiti",
35
- "names": {
36
- "mdns": "router.local",
37
- "netbios": "ROUTER",
38
- "upnp": "Ubiquiti EdgeRouter",
39
- "dns_reverse": "router.example.com"
40
- }
41
- },
42
- "services": [
43
- {
44
- "port": 22,
45
- "protocol": "tcp",
46
- "service": "ssh",
47
- "program": "OpenSSH",
48
- "version": "8.9p1",
49
- "status": "open",
50
- "banner": "SSH-2.0-OpenSSH_8.9p1 Ubuntu-3ubuntu0.4",
51
- "info": null,
52
- "source": "ssh_scanner",
53
- "authoritative": true,
13
+ "host": "192.168.1.1",
14
+ "conclusion": {
15
+ "id": "008",
16
+ "name": "Result Concluder",
17
+ "result": {
18
+ "summary": "Host is UP — OS: Linux — Open: ssh/22, http/80",
19
+ "host": {
20
+ "up": true,
21
+ "os": "Linux",
22
+ "osVersion": null,
23
+ "name": null
24
+ },
25
+ "services": [
26
+ {
27
+ "port": 22,
28
+ "protocol": "tcp",
29
+ "service": "ssh",
30
+ "program": "OpenSSH",
31
+ "version": "8.9p1",
32
+ "status": "open",
33
+ "info": null,
34
+ "banner": "SSH-2.0-OpenSSH_8.9p1 Ubuntu-3ubuntu0.4",
35
+ "source": "ssh",
36
+ "evidence": [
37
+ {
38
+ "probe_protocol": "tcp",
39
+ "probe_port": 22,
40
+ "probe_info": "banner grab",
41
+ "response_banner": "SSH-2.0-OpenSSH_8.9p1 Ubuntu-3ubuntu0.4"
42
+ }
43
+ ],
44
+ "cpe": "cpe:2.3:a:openbsd:openssh:8.9p1:*:*:*:*:*:*:*"
45
+ }
46
+ ],
54
47
  "evidence": [
55
48
  {
56
- "probe_protocol": "tcp",
57
- "probe_port": 22,
58
- "probe_info": "banner grab",
59
- "response_banner": "SSH-2.0-OpenSSH_8.9p1 Ubuntu-3ubuntu0.4"
49
+ "from": "Ping Checker",
50
+ "protocol": "icmp",
51
+ "port": 0,
52
+ "status": null,
53
+ "info": "Ping did not confirm host up"
60
54
  }
61
- ]
55
+ ],
56
+ "source_count": 26,
57
+ "os_source": "013"
62
58
  }
63
- ],
64
- "findings": [
59
+ },
60
+ "manifest": [
61
+ {
62
+ "id": "003",
63
+ "name": "Port Scanner",
64
+ "status": "ran",
65
+ "reason": null,
66
+ "duration_ms": 6016
67
+ },
65
68
  {
66
- "id": "FINDING-001",
67
- "category": "CRYPTO",
68
- "severity": "HIGH",
69
- "title": "TLSv1.0 supported",
70
- "description": "Port 443 accepts TLSv1.0 connections which are deprecated.",
71
- "evidence": { "port": 443, "protocol": "tcp", "tls_version": "TLSv1" },
72
- "remediation": "Disable TLSv1.0 in the server configuration.",
73
- "cwe": "CWE-326",
74
- "mitre_attack": ["T1557"],
75
- "verified": false,
76
- "confidence": "high"
69
+ "id": "070",
70
+ "name": "MCP Scanner",
71
+ "status": "timeout",
72
+ "reason": "Plugin \"MCP Scanner\" timed out after 30000ms",
73
+ "duration_ms": 30001
77
74
  }
78
- ]
75
+ ],
76
+ "pluginsRan": 55,
77
+ "markdown": "# NSAuditor AI Scan Report …"
79
78
  }
80
79
  ```
81
80
 
81
+ - `conclusion.result.summary` is a **one-line string**, not an object.
82
+ - `conclusion.result.services[]` has one record per discovered or probed service; each carries its own
83
+ `evidence[]` and, where one could be built, a `cpe` for `get_vulnerabilities`.
84
+ - `manifest[]` is every plugin's run status: `ran`, `skipped` (with its `reason`), `timeout` or
85
+ `error`. A `timeout` or `error` means that surface was **NOT measured** — never read it as clean.
86
+ - There is **no `findings` array** in a `scan_host` result, and no `techniques`: the CLI adds ATT&CK
87
+ techniques to its own report, and this tool does not.
88
+
82
89
  ---
83
90
 
84
91
  ## ServiceRecord Interface
@@ -188,71 +195,104 @@ export default {
188
195
 
189
196
  ---
190
197
 
191
- ## Finding Schema
198
+ ## Finding Schema (the Pro / Enterprise finding queue)
192
199
 
193
- Structured finding format used across all tiers:
200
+ Pro and Enterprise write a network host's findings to `scan_finding_queue.json` in that host's scan
201
+ directory: the CVE engine's rows, the analysis agents' rows, and their coverage-gap records. Community
202
+ never writes a queue. A CVE row, which carries every field:
194
203
 
195
204
  ```json
196
205
  {
197
- "id": "F-<uuid-v4>",
198
- "category": "AUTH | CRYPTO | CONFIG | SERVICE | EXPOSURE | CVE",
199
- "severity": "CRITICAL | HIGH | MEDIUM | LOW | INFO",
200
- "status": "UNVERIFIED | VERIFIED | POTENTIAL | FALSE_POSITIVE",
201
- "title": "Short descriptive title",
202
- "description": "Detailed explanation of the finding",
206
+ "id": "F-e36aa296-e81d-4986-a5ed-66cc36897c06",
207
+ "category": "CVE",
208
+ "status": "UNVERIFIED",
209
+ "title": "CVE-2020-25681 — udp/dns",
210
+ "description": "A flaw was found in dnsmasq before version 2.83. A heap-based buffer overflow …",
211
+ "severity": "HIGH",
212
+ "cvss": 8.1,
203
213
  "target": {
204
214
  "host": "192.168.1.1",
205
- "port": 22,
206
- "protocol": "tcp"
215
+ "port": 53,
216
+ "protocol": "udp",
217
+ "service": "dns",
218
+ "program": "dnsmasq",
219
+ "version": "2.78"
207
220
  },
208
221
  "evidence": {
209
- "banner": "OpenSSH_7.4",
210
- "version": "7.4p1 Debian",
211
- "detectionMethod": "SSH banner grabbing",
212
- "verification": {
213
- "probeType": "safe-connect",
214
- "timestamp": "2026-04-11T12:00:00Z",
215
- "result": "confirmed"
222
+ "source": "intelligence_engine",
223
+ "cve": [
224
+ "CVE-2020-25681"
225
+ ],
226
+ "mitre": [
227
+ "T1590.002 — Gather Victim Network Information: DNS"
228
+ ],
229
+ "raw": {
230
+ "cpe": "cpe:2.3:a:thekelleys:dnsmasq:2.78:*:*:*:*:*:*:*",
231
+ "cvssVector": "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H",
232
+ "published": "2021-01-20T17:15:00.000"
216
233
  }
217
234
  },
218
235
  "remediation": {
219
- "action": "Upgrade OpenSSH to 9.x+",
220
- "priority": "HIGH",
221
- "timeline": "Immediate"
236
+ "summary": "Update dnsmasq 2.78 to a patched version. See CVE-2020-25681.",
237
+ "effort": "MEDIUM",
238
+ "references": [
239
+ "https://nvd.nist.gov/vuln/detail/CVE-2020-25681"
240
+ ]
222
241
  },
223
- "cwe": "CWE-326",
224
- "mitre_attack": ["T1021.004"],
225
- "cves": ["CVE-2023-38408"],
226
- "verified": false,
227
- "confidence": "high | medium | low"
242
+ "riskScore": 0.49,
243
+ "kev": false,
244
+ "knownRansomwareCampaignUse": null,
245
+ "kevMatchedCve": null,
246
+ "kevAsOf": "2026-09-18T19:00:05.0974Z",
247
+ "kevStoreState": "fresh",
248
+ "epssScore": 0.81191,
249
+ "epssPercentile": 0.99616,
250
+ "epssMatchedCve": "CVE-2020-25681",
251
+ "epssAsOf": "2026-09-20T12:00:23Z",
252
+ "epssModelVersion": "v2026.06.15",
253
+ "epssStoreState": "fresh",
254
+ "exploitPriority": "ELEVATED",
255
+ "exploitPriorityReason": null
228
256
  }
229
257
  ```
230
258
 
259
+ **Every row:** `id` · `category` · `status` · `title` · `severity` · `cvss` · `target` · `evidence` · `remediation` · `riskScore`
260
+
261
+ **Most rows:** `description` — the analysis agents' own findings omit it: `auth_agent` · `config_agent` · `crypto_agent` · `exposure_agent` · `service_agent`. The CVE engine's rows and every coverage-gap record carry it.
262
+
263
+ **CVE-bearing rows, once KEV / EPSS data is loaded:** `kev` · `knownRansomwareCampaignUse` · `kevMatchedCve` · `kevAsOf` · `kevStoreState` · `epssScore` · `epssPercentile` · `epssMatchedCve` · `epssAsOf` · `epssModelVersion` · `epssStoreState` · `exploitPriority` · `exploitPriorityReason`
264
+
265
+ - `id` is `F-<uuid-v4>`, assigned when the row is queued.
266
+ - `target` is `{ host, port, protocol, service, program, version }`; `evidence` is `{ source, cve[], mitre[], raw }`,
267
+ where `raw` belongs to the producer (a CVE row's `cpe`, `cvssVector`, `published`; a coverage-gap row's
268
+ `evidenceGap`, `gapClass`, …); `remediation` is `{ summary, effort, references[] }` on every row.
269
+ - `evidence.cwe[]` and `evidence.owasp[]` are accepted by the validator, but no shipped producer emits them.
270
+
271
+ **Severities:** `CRITICAL` · `HIGH` · `MEDIUM` · `LOW` · `INFO`
272
+
231
273
  ### Finding Categories
232
274
 
233
- | Category | Description | Examples |
234
- |----------|-------------|---------|
235
- | `AUTH` | Authentication weaknesses | Default credentials, anonymous login, weak auth |
236
- | `CRYPTO` | Encryption / TLS issues | Weak ciphers, deprecated TLS, expired certificates |
237
- | `CONFIG` | Misconfigurations | Debug mode, dangerous HTTP methods, CORS misconfig |
238
- | `SERVICE` | Service-level risks | Exposed management ports, known CVEs |
239
- | `EXPOSURE` | Network exposure | Internet-facing services, broadcast protocols |
240
- | `CVE` | Known CVE matches | NVD-confirmed vulnerabilities |
275
+ | Category | What produces it |
276
+ |----------|------------------|
277
+ | `AUTH` | Authentication checks: anonymous access, default credentials, password and cleartext logins |
278
+ | `CRYPTO` | Transport-encryption checks: TLS versions, cipher suites, certificates, cleartext protocols |
279
+ | `CONFIG` | Configuration checks: version disclosure, directory listing, debug endpoints, exposed legacy services |
280
+ | `SERVICE` | End-of-life software checks |
281
+ | `EXPOSURE` | Exposure checks: database, management and lateral-movement ports |
282
+ | `CVE` | CVE matches from NVD for a detected program and version, and the engine's coverage-gap notes |
241
283
 
242
284
  ### Finding Statuses
243
285
 
244
286
  | Status | Meaning |
245
287
  |--------|---------|
246
- | `UNVERIFIED` | Detected by a scanner. **This is the status every finding carries today** — see the WITHDRAWN note below. |
247
- | `VERIFIED` | Reserved for the planned Verification Engine. No shipped code sets it. |
248
- | `POTENTIAL` | Reserved for the planned Verification Engine. No shipped code sets it. |
249
- | `FALSE_POSITIVE` | Set by an operator suppression, not by a probe. |
288
+ | `UNVERIFIED` | Detected by a scanner. **Every row a scan writes carries this status.** |
289
+ | `VERIFIED` | Reserved. No shipped code sets it; the Verification Engine that would have is WITHDRAWN and not planned. |
290
+ | `POTENTIAL` | Reserved. No shipped code sets it; the Verification Engine that would have is WITHDRAWN and not planned. |
291
+ | `FALSE_POSITIVE` | Reserved. No shipped code sets it on a queued row. (An operator suppression marks a compliance *violation* as a false positive — a different object, in the compliance pack.) |
250
292
 
251
- > **The Verification Engine is planned, not shipped** (withdrawn as a capability claim at EE
252
- > 0.32.7). The status field and its risk-weighting scaffolding exist — which is why the enum
253
- > is documented here — but the probe machinery that would populate `VERIFIED` / `POTENTIAL`
254
- > is WITHDRAWN and does not ship. Read `UNVERIFIED` as "this is what the scanner detected", never as
255
- > "this was tried and could not be confirmed".
293
+ > **The Verification Engine is WITHDRAWN and not planned** (withdrawn as a capability claim at EE
294
+ > 0.32.7; no release schedules it). Read `UNVERIFIED` as "this is what the scanner detected", never as "this was tried and
295
+ > could not be confirmed".
256
296
 
257
297
  ---
258
298
 
@@ -261,28 +301,25 @@ Structured finding format used across all tiers:
261
301
  ```json
262
302
  {
263
303
  "cpe": "cpe:2.3:a:openbsd:openssh:8.9p1:*:*:*:*:*:*:*",
264
- "totalResults": 3,
265
- "vulnerabilities": [
304
+ "totalResults": 1,
305
+ "cves": [
266
306
  {
267
- "cve_id": "CVE-2023-38408",
307
+ "cveId": "CVE-2023-38408",
268
308
  "description": "PKCS#11 feature in ssh-agent allows remote code execution...",
269
- "published": "2023-07-20T00:00:00.000Z",
270
- "lastModified": "2023-08-01T00:00:00.000Z",
271
- "cvss": {
272
- "version": "3.1",
273
- "baseScore": 9.8,
274
- "severity": "CRITICAL",
275
- "vector": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
276
- },
277
- "cwe": ["CWE-428"],
278
- "references": [
279
- "https://nvd.nist.gov/vuln/detail/CVE-2023-38408"
280
- ]
309
+ "cvssScore": 9.8,
310
+ "severity": "CRITICAL",
311
+ "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H",
312
+ "published": "2023-07-20T03:15:10.170",
313
+ "lastModified": "2023-08-01T00:00:00.000"
281
314
  }
282
315
  ]
283
316
  }
284
317
  ```
285
318
 
319
+ - The CVSS fields (`cvssScore`, `severity`, `vectorString`) are NVD's v3.1 metric, else v3.0; a CVE with
320
+ neither carries `null` in all three.
321
+ - `totalResults` counts the CVEs **returned** — after `maxResults`, if one was passed.
322
+
286
323
  ---
287
324
 
288
325
  ## SARIF Output Schema (CI/CD Integration)
@@ -362,11 +399,17 @@ Keys dropped entirely: `IP6`, `deviceWebPage`, `hardwareVersion`, `firmwareVersi
362
399
 
363
400
  ## Scan History Schema (JSONL)
364
401
 
365
- Each line in `.scan_history/` is one scan record:
402
+ Every scan appends one line per host to `scan_history.jsonl` in its output directory (`--out`, default `out/`):
366
403
 
367
404
  ```jsonl
368
- {"timestamp":"2026-04-11T12:00:00Z","host":"192.168.1.1","pluginsRan":25,"services":8,"findings":3,"conclusion":{...}}
369
- {"timestamp":"2026-04-11T13:00:00Z","host":"192.168.1.1","pluginsRan":25,"services":8,"findings":2,"conclusion":{...}}
405
+ {"timestamp":"2026-09-24T01:32:08.915Z","host":"192.168.1.1","servicesCount":12,"openPorts":[21,22,53,80,443],"os":"Embedded Linux","findingsCount":64,"findingsCountBasis":"loader-shaped-v2","tier":"enterprise","cloudFindingsCount":0,"services":[{"port":22,"protocol":"tcp","service":"ssh","version":"8.2p1"}]}
406
+ {"timestamp":"2026-09-24T01:20:45.180Z","host":"aws","servicesCount":0,"openPorts":[],"os":null,"findingsCount":139,"findingsCountBasis":"loader-shaped-v2","tier":"enterprise","cloudFindingsCount":159,"services":[]}
370
407
  ```
371
408
 
372
- Used for CTEM delta/trend analysis. CE retains 7 days; Pro/Enterprise configurable.
409
+ - `findingsCountBasis` and `tier` say what `findingsCount` counted. The scan-to-scan diff refuses to compare
410
+ two lines whose basis or tier differs, or whose tier is unknown, rather than reading the change as new
411
+ or resolved findings.
412
+ - `cloudFindingsCount` is the raw number of findings the plugins returned (evidence gaps and scope
413
+ statements included); `findingsCount` is the report loader's shaped count, so the raw figure can exceed it.
414
+ - Retention: Community keeps **7 days** (older lines are pruned after each scan); Pro and Enterprise keep
415
+ every line. Neither is configurable.
@@ -13,13 +13,14 @@ Step 1: list_plugins()
13
13
  → Understand available scanners, confirm what will run
14
14
 
15
15
  Step 2: scan_host({ host: "<target>" })
16
- → Returns fused results: summary, host{os}, services[], findings[]
16
+ → Returns the run: conclusion.result (summary, host, services[]) and manifest[]
17
+ → A `timeout` or `error` in manifest[] means that surface was NOT measured
17
18
 
18
19
  Step 3: For each service with a detected program + version:
19
20
  → Construct CPE: cpe:2.3:a:<vendor>:<product>:<version>:*:*:*:*:*:*:*
20
21
  → get_vulnerabilities({ cpe: "<constructed_cpe>" })
21
22
 
22
- Step 4: Correlate CVEs with scan findings
23
+ Step 4: Correlate CVEs with the services they were built from
23
24
  → Present prioritized list: Critical → High → Medium → Low
24
25
  → Include remediation guidance for each finding
25
26
  ```
@@ -85,9 +86,9 @@ Step 3: Analyze evidence for specific weaknesses:
85
86
  | 012 | OpenSearch Scanner | Elasticsearch/OpenSearch detection |
86
87
  | 014 | NetBIOS Scanner | SMB/NetBIOS enumeration |
87
88
  | 015 | SUN RPC Scanner | NFS, portmapper services |
88
- | 040 | TLS Cert & Cipher Auditor | Full certificate chain audit *(Pro)* |
89
- | 050 | TRIBE v2 Probe | Debug leaks, CORS misconfig *(Pro)* |
90
- | 060 | DNS Security Auditor | SPF/DKIM/DMARC, DNSSEC *(Pro)* |
89
+ | 040 | TLS Cert & Cipher Auditor | Full certificate chain audit |
90
+ | 050 | TRIBE v2 Probe | Debug leaks, CORS misconfig |
91
+ | 060 | DNS Security Auditor | SPF/DKIM/DMARC, DNSSEC |
91
92
 
92
93
  ---
93
94
 
@@ -169,8 +170,8 @@ nsauditor-ai scan --host 192.168.1.0/24 --plugins all \
169
170
  - Rescans on configurable interval (minutes)
170
171
  - Delta detection: new services, removed services, version changes
171
172
  - Fires JSON POST webhook on changes exceeding severity threshold
172
- - Scan history stored in `.scan_history/` (JSONL format)
173
- - CE: 7-day retention; Pro/Enterprise: configurable
173
+ - Scan history appended to `scan_history.jsonl` in the output directory (`--out`, default `out/`), one line per host
174
+ - CE: 7-day retention; Pro/Enterprise: every line kept (neither is configurable)
174
175
 
175
176
  **Webhook Payload:**
176
177
 
@@ -266,9 +267,9 @@ User wants to...
266
267
  ├── Check a specific service/port → probe_service (Pro)
267
268
  ├── Look up CVEs for software version → get_vulnerabilities (Pro)
268
269
  ├── See available plugins → list_plugins
269
- ├── Audit TLS certificates → probe_service with plugin 040 (Pro)
270
- ├── Check DNS security (SPF/DKIM/DMARC) → probe_service with plugin 060 (Pro)
271
- ├── Detect debug leaks / CORS issues → probe_service with plugin 050 (Pro)
270
+ ├── Audit TLS certificates → scan_host, or probe_service (Pro) with plugin 040
271
+ ├── Check DNS security (SPF/DKIM/DMARC) → scan_host, or probe_service (Pro) with plugin 060
272
+ ├── Detect debug leaks / CORS issues → scan_host, or probe_service (Pro) with plugin 050
272
273
  ├── Scan a subnet → CLI: --host CIDR --parallel N
273
274
  ├── Set up continuous monitoring → CLI: --watch --interval N
274
275
  ├── Compare two scans → CLI: diff the per-run out-dirs (no compare tool)
@@ -307,6 +308,13 @@ User wants to...
307
308
  3. NVD API rate limits apply — wait and retry if rate-limited
308
309
  4. Not all software has NVD entries; absence ≠ safety
309
310
 
311
+ ### "A CLI cloud scan says coverage UNVERIFIED and suggests checking credentials"
312
+
313
+ 1. Read `pluginStatus` in `scan_conclusion_raw.json` before the summary. If every cloud plugin there is `"status": "skipped"` with `"reason": "missing capabilities: cloudScanners"`, the cause is the licence tier: the cloud plugins require an Enterprise licence, and a Community or Pro install skips all of them.
314
+ 2. In that case the summary's advice ("Verify cloud credentials are configured and the CE platform is ≥ 0.1.30") names the wrong cause. This is a known limit of this release; the per-plugin skip reason is the true one. Do not tell the user to fix credentials.
315
+ 3. The run is still correctly NOT a clean verdict: nothing was measured.
316
+ 4. MCP `scan_cloud` does not reach this path; below Enterprise it refuses before scanning, with an upgrade message.
317
+
310
318
  ### "License gate (🔒) error"
311
319
 
312
320
  1. `probe_service` and `get_vulnerabilities` require Pro license