registry  /  @iicp/client  /  0.7.81

@iicp/client@0.7.81

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 malicious behavior, but the provider CLI has a default-on self-update path that can mutate the global npm installation during runtime. Other child-process and network primitives are visible CLI features for node hosting and tunnel reachability.

Static reason
One or more suspicious static signals were detected.
Trigger
Running `iicp-node serve` with auto-update enabled, or user-invoked init/tunnel workflows.
Impact
Unconsented package upgrade risk if a newer registry version is available; no evidence of credential theft, destructive action, or hidden exfiltration in this version.
Mechanism
runtime npm self-update and optional cloudflared subprocess
Attack narrative
A provider operator who runs `iicp-node serve` starts a background updater that checks the npm registry and, if a newer version exists, runs `npm install -g @iicp/client@latest` then re-execs the CLI. This is package-aligned maintenance behavior and opt-out via environment variable, but it is a real runtime package mutation surface.
Rationale
Static inspection does not show malicious install/import-time execution, credential harvesting, hidden exfiltration, persistence, or destructive behavior. The default-on runtime self-updater is a meaningful supply-chain risk, so warn rather than block.
Evidence
package.jsondist/index.jsdist/cli.jsdist/updater.jsdist/tunnel.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
Network endpoints5
registry.npmjs.org/@iicp/client/latestiicp.network/apicloudflare-dns.com/dns-queryapi.ipify.orgapi.anthropic.com

Decision evidence

public snapshot
AI called this Suspicious at 78.0% confidence as Dangerous Capability with medium false-positive risk.
Evidence for warning
  • dist/updater.js default-on serve updater fetches npm latest and runs `npm install -g @iicp/client@latest`.
  • dist/cli.js startProviderAutoUpdate schedules updater for long-running provider processes unless IICP_AUTO_UPDATE disables it.
  • dist/cli.js init can run `npm install --no-save` for optional peer deps after interactive confirmation.
  • dist/tunnel.js spawns `cloudflared tunnel --url http://127.0.0.1:<port>` when NAT/tunnel path is requested or auto-selected.
Evidence against
  • package.json has no install/preinstall/postinstall lifecycle hooks.
  • dist/index.js only re-exports SDK modules; no install-time or simple import-time updater execution observed.
  • Network use is aligned with IICP SDK/node operation: directory registration, backend probing, NAT checks, proxy/query, and update checks.
  • dist/client.js includes SSRF guards for discovered node endpoints.
  • Identity/config writes are user-invoked CLI/provider state under ~/.iicp, not hidden credential harvesting.
Behavioral surface
Source
ChildProcessCryptoDynamicRequireEnvironmentVarsEvalFilesystemNetworkShell
Supply chain
HighEntropyStringsUrlStrings
ManifestNo manifest risk signals triggered.
scanned 44 file(s), 511 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

5 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
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 confidentiality_js_1 = require("./confidentiality.js");
Medium
Dynamic Require

Package source references dynamic require/import behavior.

dist/client.jsView on unpkg · L7
dist/cli.jsView file
2133const _MCP_DANGEROUS = new Set([ L2134: "bash", "sh", "zsh", "fish", "shell", "powershell", "pwsh", "cmd", L2135: "exec", "execute", "run_command", "run", "system", "eval", ... L2144: if (helpFlag) { L2145: process.stdout.write(`usage: iicp-node mcp-gateway [options]\n\n` + L2146: `Bridge a local MCP server into the IICP mesh as a registered provider node.\n\n` + L2147: `Options:\n` + L2148: ` --mcp-url URL IICP_MCP_URL — MCP server base URL (default http://localhost:8001)\n` + L2149: ` --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 · L2133
407try { L408: (0, node_child_process_1.execSync)(`npm install --no-save ${extras.join(" ")}`, { stdio: "inherit" }); L409: process.stdout.write(" ✓ done\n");
High
Runtime Package Install

Package source invokes a package manager install command at runtime.

dist/cli.jsView on unpkg · L407

Findings

4 High4 Medium5 Low
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