nsauditor-ai 0.1.34 → 0.1.35

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.
Files changed (3) hide show
  1. package/README.md +24 -0
  2. package/cli.mjs +34 -0
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -15,6 +15,30 @@ NSAuditor AI is the open-source core of a privacy-first security intelligence pl
15
15
 
16
16
  **Zero Data Exfiltration by design.** NSAuditor AI works fully offline. AI analysis, CVE correlation, and continuous monitoring all happen locally. External calls (to AI APIs, NVD, etc.) are opt-in and use your own API keys. We never see your scan data.
17
17
 
18
+ ## What's New (0.1.35) — CLI provenance footer matches MCP response (so the comparison actually works)
19
+
20
+ 0.1.34 added the version-provenance block to the MCP server's `list_plugins` response, but **the CLI baseline (`license --plugins` / `license --status`) didn't show versions** — so customers couldn't easily compare. 0.1.35 fixes that asymmetry.
21
+
22
+ Both CLI commands now emit an identical provenance block:
23
+
24
+ ```
25
+ ── Installation provenance ──
26
+ nsauditor-ai (CE): 0.1.35
27
+ @nsasoft/nsauditor-ai-ee (EE): 0.3.4 (loaded)
28
+ ```
29
+
30
+ **Customer hallucination-detection workflow (5 seconds, no log archeology):**
31
+
32
+ 1. In Claude Desktop: ask "list plugins" → receive a response that should end with the provenance block
33
+ 2. In your terminal: run `nsauditor-ai license --plugins`
34
+ 3. Compare the two `── Installation provenance ──` blocks character-for-character
35
+ 4. **Match** → real MCP `tools/call` happened, response is trustworthy
36
+ 5. **Mismatch / missing block** → Claude fabricated the response (see CE 0.1.33 advisory)
37
+
38
+ This is the v1 mitigation; the v2 (Thread L Phase 2) adds per-call cryptographic sentinel UUIDs that the customer can grep against the server log directly. v1 catches the common case where Claude either omits the block entirely (unlikely to fabricate the new structure verbatim) or includes a stale version pulled from training data.
39
+
40
+ ---
41
+
18
42
  ## What's New (0.1.34) — list_plugins now embeds CE+EE versions for hallucination detection
19
43
 
20
44
  Companion to the 0.1.33 advisory. The `list_plugins` MCP tool's response now appends the actual installed CE + EE version numbers, so customers can verify a Claude Desktop response in **5 seconds** without log archeology:
package/cli.mjs CHANGED
@@ -5,8 +5,10 @@ import { buildHtmlReport } from './utils/report_html.mjs';
5
5
  import fsp from 'node:fs/promises';
6
6
  import { dirname } from 'node:path';
7
7
  import { fileURLToPath } from 'node:url';
8
+ import { createRequire } from 'node:module';
8
9
 
9
10
  const __dirname = dirname(fileURLToPath(import.meta.url));
11
+ const _require = createRequire(import.meta.url);
10
12
  import path from 'node:path';
11
13
  import { platform } from 'node:os';
12
14
  import { openaiSimplePrompt, openaiPrompt as openaiProPrompt, openaiPromptOptimized } from './utils/prompts.mjs';
@@ -931,6 +933,20 @@ Docs: https://www.nsauditor.com/ai/ | Pricing: https://www.nsauditor.com/ai/
931
933
  console.log('\n→ Start a free 14-day Pro trial: https://www.nsauditor.com/ai/trial');
932
934
  }
933
935
  }
936
+ // CE 0.1.35 (Thread L mitigation v2): version provenance footer
937
+ // matches the MCP server's list_plugins suffix exactly. Customer
938
+ // verification flow: read versions in Claude Desktop's MCP
939
+ // response → compare against `license --status` output here.
940
+ // Mismatch ⇒ Claude hallucinated.
941
+ let _eeVersion = 'not installed';
942
+ try {
943
+ const ee = _require('@nsasoft/nsauditor-ai-ee/package.json');
944
+ _eeVersion = ee && ee.version ? `${ee.version} (loaded)` : 'unknown (loaded)';
945
+ } catch { /* CE-only — fine */ }
946
+ console.log('');
947
+ console.log('── Installation provenance ──');
948
+ console.log(` nsauditor-ai (CE): ${TOOL_VERSION}`);
949
+ console.log(` @nsasoft/nsauditor-ai-ee (EE): ${_eeVersion}`);
934
950
  } else if (rawArgs.includes('--capabilities')) {
935
951
  const tier = getTierFromEnv();
936
952
  const caps = resolveCapabilities(tier);
@@ -1004,6 +1020,24 @@ Docs: https://www.nsauditor.com/ai/ | Pricing: https://www.nsauditor.com/ai/
1004
1020
  console.log('');
1005
1021
  console.log(` ${totalRendered} plugin${totalRendered === 1 ? '' : 's'} total · current tier: ${tier}`);
1006
1022
  }
1023
+
1024
+ // CE 0.1.35 (Thread L mitigation v2): emit installation provenance
1025
+ // identical in shape to the MCP server's list_plugins suffix.
1026
+ // Customers comparing Claude Desktop's MCP response against the
1027
+ // CLI baseline now see the SAME version block in both places.
1028
+ // Mismatch → Claude hallucinated. Match → real tool call.
1029
+ const ceVersion = TOOL_VERSION;
1030
+ let eeVersion = 'not installed';
1031
+ try {
1032
+ const eeManifest = _require('@nsasoft/nsauditor-ai-ee/package.json');
1033
+ eeVersion = eeManifest && eeManifest.version
1034
+ ? `${eeManifest.version} (loaded)`
1035
+ : 'unknown (loaded)';
1036
+ } catch { /* CE-only install — fine */ }
1037
+ console.log('');
1038
+ console.log('── Installation provenance ──');
1039
+ console.log(` nsauditor-ai (CE): ${ceVersion}`);
1040
+ console.log(` @nsasoft/nsauditor-ai-ee (EE): ${eeVersion}`);
1007
1041
  } else if (rawArgs.includes('install')) {
1008
1042
  // CE-0.1.30.4 — install command. Verify the JWT FIRST, then persist
1009
1043
  // to a platform-appropriate location (macOS Keychain / file).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nsauditor-ai",
3
- "version": "0.1.34",
3
+ "version": "0.1.35",
4
4
  "description": "Modular AI-assisted network security audit platform — Community Edition",
5
5
  "type": "module",
6
6
  "private": false,