registry  /  @iicp/client  /  0.7.79

@iicp/client@0.7.79

Use the open IICP AI mesh from TypeScript or JavaScript without running a node

AI Security Review

scanned 13d ago · by lpm-firewall-ai

No confirmed malware or install-time attack behavior was found. The main unresolved risk is a default-on runtime self-updater that can globally reinstall the package after a user starts long-running provider commands.

Static reason
One or more suspicious static signals were detected.; previous stored version diff introduced dangerous source
Trigger
User runs iicp-node serve or iicp-node mcp-gateway
Impact
Could mutate the global npm installation at runtime; otherwise behavior is package-aligned provider node, client, tunnel, and gateway functionality.
Mechanism
default-on runtime npm self-update plus network provider/gateway operations
Rationale
Static inspection shows risky runtime behaviors, especially default-on global self-update, but no lifecycle hook, hidden credential harvesting, destructive action, or off-purpose exfiltration. The risky primitives are largely explicit provider-node functionality, so this should warn rather than block as malware.
Evidence
package.jsondist/cli.jsdist/updater.jsdist/tunnel.jsdist/node.jsdist/client.jsdist/identity.js~/.iicp/operator.json~/.iicp/nodes/<name>.json~/.iicp/state/quick_tunnel_rate_limit.json~/.iicp/state/quick_tunnel_create_gate.json~/.iicp/state/quick_tunnel_create.lock
Network endpoints8
registry.npmjs.org/@iicp/client/latestiicp.network/apiapi.ipify.orgapi.anthropic.comcloudflare-dns.com/dns-query*.trycloudflare.comlocalhost:11434localhost:8001

Decision evidence

public snapshot
AI called this Suspicious at 86.0% confidence as Dangerous Capability with medium false-positive risk.
Evidence for warning
  • dist/updater.js performs default-on runtime self-update via spawn("npm", ["install","-g","@iicp/client@latest"]).
  • dist/cli.js starts auto-update timers during serve and mcp-gateway, first check within 5 minutes unless IICP_AUTO_UPDATE disables it.
  • dist/cli.js init can run execSync("npm install --no-save ...") after an interactive prompt for optional peers.
  • dist/cli.js mcp-gateway exposes user-allowed MCP tools over /v1/task to IICP directory-discovered callers.
Evidence against
  • package.json has no install/preinstall/postinstall lifecycle hooks.
  • Main import dist/index.js only re-exports SDK modules; no import-time execution observed.
  • Network calls are aligned with IICP directory, backend probing, npm version check, Cloudflare tunnel health, and user-configured endpoints.
  • Identity secrets are stored locally under ~/.iicp and public registration omits operator_secret/contact.
  • MCP gateway requires explicit command plus --tools/IICP_MCP_TOOLS and deny-lists shell/interpreter tool names.
  • Quick Tunnel spawns existing cloudflared only after explicit/serve reachability logic and never auto-installs it.
Behavioral surface
Source
ChildProcessCryptoDynamicRequireEnvironmentVarsEvalFilesystemNetworkShell
Supply chain
HighEntropyStringsUrlStrings
ManifestNo manifest risk signals triggered.
scanned 42 file(s), 499 KB of source, external domains: 127.0.0.1, api.anthropic.com, api.ipify.org, api6.ipify.org, cloudflare-dns.com, iicp.network, pkg.cloudflare.com, registry.npmjs.org, schemas.xmlsoap.org

Source & flagged code

6 flagged · loading source
dist/tunnel.jsView file
22exports.openQuickTunnel = openQuickTunnel; L23: const node_child_process_1 = require("node:child_process"); L24: const fs = require("node:fs");
High
Child Process

Package source references child process execution.

dist/tunnel.jsView on unpkg · L22
dist/node.jsView file
matchType = previous_version_dangerous_delta matchedPackage = @iicp/client@0.7.78 matchedIdentity = npm:QGlpY3AvY2xpZW50:0.7.78 similarity = 0.952 summary = stored previous version shares package body but lacks this dangerous source file
Critical
Previous Version Dangerous Delta

This package version adds a dangerous source file absent from the previous stored version.

dist/node.jsView on unpkg
762// eslint-disable-next-line @typescript-eslint/no-explicit-any L763: this._prom = await eval('import("prom-client")'); L764: this._tasksCounter = new this._prom.Counter({
Low
Eval

Package source references a known benign dynamic code generation pattern.

dist/node.jsView on unpkg · L762
dist/client.jsView file
7exports.IicpClient = void 0; L8: const node_crypto_1 = require("node:crypto"); L9: const errors_js_1 = require("./errors.js");
Medium
Dynamic Require

Package source references dynamic require/import behavior.

dist/client.jsView on unpkg · L7
dist/cli.jsView file
2109const _MCP_DANGEROUS = new Set([ L2110: "bash", "sh", "zsh", "fish", "shell", "powershell", "pwsh", "cmd", L2111: "exec", "execute", "run_command", "run", "system", "eval", ... L2120: if (helpFlag) { L2121: process.stdout.write(`usage: iicp-node mcp-gateway [options]\n\n` + L2122: `Bridge a local MCP server into the IICP mesh as a registered provider node.\n\n` + L2123: `Options:\n` + L2124: ` --mcp-url URL IICP_MCP_URL — MCP server base URL (default http://localhost:8001)\n` + L2125: ` --tools NAMES IICP_MCP_TOOLS — comma-separated tool names to advertise (required)\n` +
High
Command Output Exfiltration

Source combines command execution, command-output handling, and outbound requests; review data flow before blocking.

dist/cli.jsView on unpkg · L2109
404try { L405: (0, node_child_process_1.execSync)(`npm install --no-save ${extras.join(" ")}`, { stdio: "inherit" }); L406: process.stdout.write(" ✓ done\n");
High
Runtime Package Install

Package source invokes a package manager install command at runtime.

dist/cli.jsView on unpkg · L404

Findings

1 Critical4 High4 Medium5 Low
CriticalPrevious Version Dangerous Deltadist/node.js
HighChild Processdist/tunnel.js
HighShell
HighCommand Output Exfiltrationdist/cli.js
HighRuntime Package Installdist/cli.js
MediumDynamic Requiredist/client.js
MediumNetwork
MediumEnvironment Vars
MediumStructural Risk Force Deep Review
LowScripts Present
LowEvaldist/node.js
LowFilesystem
LowHigh Entropy Strings
LowUrl Strings