nsauditor-ai 0.1.32 → 0.1.34

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
@@ -15,6 +15,62 @@ 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.34) — list_plugins now embeds CE+EE versions for hallucination detection
19
+
20
+ 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:
21
+
22
+ ```
23
+ ── Installation provenance (verify against your shell) ──
24
+ nsauditor-ai (CE): 0.1.34
25
+ @nsasoft/nsauditor-ai-ee (EE): 0.3.4 (loaded)
26
+ Verify: nsauditor-ai --version && npm list -g @nsasoft/nsauditor-ai-ee
27
+ If versions in this response don't match your shell, the response was
28
+ AI-generated rather than retrieved from the MCP server (see CE 0.1.33 advisory).
29
+ ```
30
+
31
+ How it works as a hallucination detector:
32
+ - The MCP server reads `process.execPath`'s package.json + tries to resolve `@nsasoft/nsauditor-ai-ee/package.json` at request time. Both are real machine-specific values.
33
+ - Claude Desktop fabricated responses in the wild have shown stale version numbers from training data, missing version lines entirely, or different counts each time the same question is asked (observed 32→32→31 plugin counts in three consecutive hallucinations on 2026-05-10).
34
+ - A real tool response will exactly match `nsauditor-ai --version` + `npm list -g @nsasoft/nsauditor-ai-ee`. Mismatch = hallucinated.
35
+
36
+ This is a v1 mitigation — the v2 (Thread L in `tasks/todo.md`) adds per-call cryptographic sentinel UUIDs that the customer can grep against the server log.
37
+
38
+ ---
39
+
40
+ ## What's New (0.1.33) — ⚠ MCP integration with Claude Desktop is unreliable
41
+
42
+ **Critical advisory for customers using NSAuditor AI through Claude Desktop's MCP integration.** During the maintainer's own integration test on 2026-05-10, we discovered that **Claude Desktop's AI fabricates scan results, plugin lists, vulnerability findings, and tier information without actually invoking the MCP tools** for our specific server. Other MCP servers in the same Claude Desktop config receive real `tools/call` invocations; ours does not.
43
+
44
+ **Empirical evidence**:
45
+ - `~/Library/Logs/Claude/main.log` shows multiple permission grants for `mcp__nsauditor-ai__list_plugins` and `mcp__nsauditor-ai__scan_host` on 2026-05-10
46
+ - `~/Library/Logs/Claude/mcp-server-nsauditor-ai.log` shows **zero** `"method":"tools/call"` entries on the same day
47
+ - Other servers in the same config logged real calls (ns-ftp:29, wp-publisher-netsecmag:14, ai-pr-distribution:6, sendgrid:3)
48
+ - When asked to scan 1.1.1.1, Claude Desktop returned a detailed report with plugin breakdown + Zero Trust score — entirely fabricated
49
+
50
+ **Likely cause**: Claude Desktop's MCP client appears to time out our server (which loads PluginManager + 32 plugins + license verify before responding). Claude (the AI) silently substitutes fabricated responses from training rather than surfacing the timeout. The hallucinations are convincingly formatted and indistinguishable from real output without log inspection.
51
+
52
+ **Mandatory verification — for any output you'd act on**:
53
+
54
+ ```bash
55
+ # Tier check (ground truth bypassing Claude AI synthesis):
56
+ nsauditor-ai mcp tier
57
+
58
+ # Real plugin scan (always hits the network):
59
+ nsauditor-ai scan --host <X> --plugins all --out <dir>
60
+
61
+ # Confirm Claude Desktop actually called the MCP server:
62
+ grep '"method":"tools/call"' ~/Library/Logs/Claude/mcp-server-nsauditor-ai.log | tail -5
63
+ # If main.log shows recent permission grants for nsauditor-ai tools but
64
+ # THIS file shows no matching tools/call entries, the responses you saw
65
+ # in Claude Desktop were AI-generated, NOT real.
66
+ ```
67
+
68
+ **SOC 2 evidence and any compliance report MUST be generated via the CLI** — never via the Claude Desktop MCP integration — until this is resolved upstream. We're working on it (Thread L in `tasks/todo.md`): a per-call cryptographic sentinel, lazy-loaded plugin discovery to reduce startup latency, a `mcp verify-recent-call` diagnostic, and a bug report to Anthropic.
69
+
70
+ This advisory will be removed when the upstream Claude Desktop MCP routing issue is fixed and we ship a CE release whose `tools/call` invocations land reliably.
71
+
72
+ ---
73
+
18
74
  ## What's New (0.1.32) — Claude Desktop integration overhaul + ground-truth diagnostics
19
75
 
20
76
  The 0.1.32 line bundles three operational improvements driven by real customer-onboarding friction surfaced during the developer's own Claude Desktop integration test (2026-05-10):
@@ -319,6 +375,25 @@ nsauditor-ai scan --host 192.168.1.0/24 --plugins all \
319
375
 
320
376
  ## MCP Server
321
377
 
378
+ > ## ⚠ CRITICAL ADVISORY (2026-05-10) — Claude Desktop hallucinates responses for this MCP server
379
+ >
380
+ > When you use NSAuditor AI through **Claude Desktop's** MCP integration, the AI may **fabricate scan results, plugin lists, vulnerability findings, and tier information without actually invoking the MCP tools**. We've confirmed this empirically: Claude Desktop's permission system shows tool calls being approved, but the actual `tools/call` JSON-RPC messages never reach our server (other MCP servers in the same config receive their calls correctly).
381
+ >
382
+ > **Mandatory verification for any output you'd act on**:
383
+ >
384
+ > ```bash
385
+ > # Real tier check (ground truth — bypasses Claude AI synthesis):
386
+ > nsauditor-ai mcp tier
387
+ >
388
+ > # Real scan (always hits the network):
389
+ > nsauditor-ai scan --host <X> --plugins all --out <dir>
390
+ >
391
+ > # Confirm Claude Desktop actually called the MCP server today:
392
+ > grep '"method":"tools/call"' ~/Library/Logs/Claude/mcp-server-nsauditor-ai.log | tail -5
393
+ > ```
394
+ >
395
+ > **SOC 2 evidence + compliance reports MUST be generated via the CLI** — never via the Claude Desktop MCP integration — until this is resolved upstream. Other MCP clients (Claude Code, custom MCP clients via the SDK) appear unaffected. See [What's New (0.1.33)](#whats-new-0133----mcp-integration-with-claude-desktop-is-unreliable) for full details.
396
+
322
397
  Expose scanning capabilities to AI assistants via [Model Context Protocol](https://modelcontextprotocol.io):
323
398
 
324
399
  ```bash
package/mcp_server.mjs CHANGED
@@ -366,12 +366,49 @@ export function createServer() {
366
366
  try {
367
367
  const result = await handler(args ?? {});
368
368
 
369
- // Append tier info to list_plugins response
369
+ // Append tier info + version provenance to list_plugins response.
370
+ //
371
+ // CE 0.1.34 (Thread L MITIGATION): the response now embeds the
372
+ // ACTUAL versions of CE + EE (when EE is loaded) so customers
373
+ // can detect Claude Desktop hallucinations. Background: Claude
374
+ // Desktop has been observed (2026-05-10) silently fabricating
375
+ // list_plugins responses without invoking the MCP server (per-
376
+ // server log shows zero `tools/call` while Claude reports
377
+ // detailed plugin lists). With version numbers in the response,
378
+ // a hallucinated answer will either omit the version line OR
379
+ // include a stale/wrong version pulled from training data.
380
+ // Customer verification (5 seconds, no log archeology):
381
+ // nsauditor-ai --version
382
+ // npm list -g @nsasoft/nsauditor-ai-ee
383
+ // If the versions in Claude Desktop's output don't match these
384
+ // commands, the response was AI-generated, not a real tool call.
370
385
  if (name === 'list_plugins') {
371
386
  const tierLabel = { ce: 'Community Edition (CE)', pro: 'Pro', enterprise: 'Enterprise' };
387
+
388
+ // Detect EE version (best-effort; absent on CE-only installs).
389
+ let eeVersion = 'not installed';
390
+ try {
391
+ const eeManifest = _require('@nsasoft/nsauditor-ai-ee/package.json');
392
+ eeVersion = eeManifest && eeManifest.version
393
+ ? `${eeManifest.version} (loaded)`
394
+ : 'unknown (loaded)';
395
+ } catch {
396
+ // EE package not installed or not resolvable — common for CE-only customers.
397
+ eeVersion = 'not installed';
398
+ }
399
+
400
+ const versionLines =
401
+ `\n\n── Installation provenance (verify against your shell) ──\n` +
402
+ `nsauditor-ai (CE): ${TOOL_VERSION}\n` +
403
+ `@nsasoft/nsauditor-ai-ee (EE): ${eeVersion}\n` +
404
+ `Verify: nsauditor-ai --version && npm list -g @nsasoft/nsauditor-ai-ee\n` +
405
+ `If versions in this response don't match your shell, the response was\n` +
406
+ `AI-generated rather than retrieved from the MCP server (see CE 0.1.33 advisory).`;
407
+
372
408
  const tierSuffix = `\n\nCurrent tier: ${tierLabel[_tier] ?? _tier}. ${_capabilities.proMCP ? '' : 'Upgrade to Pro for probe_service, get_vulnerabilities, risk_summary, and more.'}`;
409
+
373
410
  return {
374
- content: [{ type: 'text', text: JSON.stringify(result, null, 2) + tierSuffix }],
411
+ content: [{ type: 'text', text: JSON.stringify(result, null, 2) + tierSuffix + versionLines }],
375
412
  };
376
413
  }
377
414
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nsauditor-ai",
3
- "version": "0.1.32",
3
+ "version": "0.1.34",
4
4
  "description": "Modular AI-assisted network security audit platform — Community Edition",
5
5
  "type": "module",
6
6
  "private": false,