registry  /  mindexec-ai  /  0.2.777

mindexec-ai@0.2.777

MindExec local runtime and bridge CLI

AI Security Review

scanned 9h ago · by lpm-firewall-ai

No confirmed malicious install-time attack surface was found. The package is a powerful local AI bridge with shell, file, Codex, browser, remote-agent, and network capabilities exposed after the user starts it.

Static reason
High-risk behavior combination matched malicious policy.
Trigger
User runs mindexec, mind-bridge, npm start, or node launch-bridge.cjs
Impact
Local workspace modification, shell command execution, Codex execution, browser automation, remote agent connection, and outbound API requests if authorized or configured
Mechanism
token-protected localhost bridge with AI agent and remote-control capabilities
Attack narrative
On install, the lifecycle hook only ensures packaged tree-sitter WASM grammars exist. When explicitly launched, the package starts a localhost MindExec bridge that returns a bridge token via /api/status and uses it to guard high-risk APIs for file mutation, shell execution, Codex runs, browser automation, and managed remote agents. Those behaviors are product-aligned but create real agent-facing capability risk.
Rationale
Static source inspection does not show unconsented lifecycle mutation of foreign AI-agent control surfaces, credential exfiltration, destructive persistence, or remote payload execution at install/import time. The runtime bridge intentionally provides high-risk local/remote AI automation capabilities, so warn rather than block.
Evidence
package.jsonscripts/setup-tree-sitter-grammars.mjslaunch-bridge.cjsserver.jscodex-runtime.jsremote-hub.jsport-guard.cjsREADME.mdtree-sitter-grammars/*.wasm.mindexec/~/.mindexec-ai/auth/supabase-session.json~/.mindexec/codex-runtime/config.toml~/.mindexec/codex-runtime/sessions/remote-fast/*/mindexec-remote-fast
Network endpoints9
127.0.0.1:5167127.0.0.1:5077www.googleapis.com/youtube/v3html.duckduckgo.com/html/api.duckduckgo.com/search.brave.com/searchnews.google.com/rss/searchwww.bing.com/searchapi.openai.com/v1

Decision evidence

public snapshot
AI called this Suspicious at 84.0% confidence as Dangerous Capability with medium false-positive risk.
Evidence for block
  • server.js exposes token-protected local APIs for file write/delete, directory delete, shell execution, Codex runs, browser automation, and remote agent control.
  • codex-runtime.js creates an isolated Codex home under ~/.mindexec/codex-runtime, copies ~/.codex/auth.json if present, and can run @openai/codex-sdk or codex exec with caller-selected sandbox/approval options.
  • server.js can spawn bundled remote-fast binaries or npx -y @mindexec/remote@latest to connect to a remote manager after authenticated registry/agent actions.
  • server.js contains live network integrations for YouTube, DuckDuckGo/Brave/Bing/news search, Supabase, CompanyCore proxy, and OpenAI-compatible embeddings.
Evidence against
  • package.json postinstall only runs scripts/setup-tree-sitter-grammars.mjs, which copies missing tree-sitter WASM grammar files into the package tree.
  • No install-time writes to .mcp.json, CLAUDE.md, Claude/Codex/Cursor settings, shell startup files, VCS hooks, or OS autostart entries were found.
  • server.js listens on 127.0.0.1 and protects file/shell/Codex/remote routes with X-Bridge-Token by default.
  • Dangerous capabilities are documented as the local MindExec bridge behavior and require running the CLI/server, not import-time execution.
  • Workspace file APIs validate paths under the configured workspace, and Codex additional directories are constrained under the working directory.
Behavioral surface
Source
ChildProcessCryptoDynamicRequireEnvironmentVarsEvalFilesystemNetworkShellWebSocket
Supply chain
HighEntropyStringsMinifiedTelemetryUrlStrings
ManifestNo manifest risk signals triggered.
scanned 51 file(s), 4.48 MB of source, external domains: 127.0.0.1, api.duckduckgo.com, api.imagerouter.io, api.openai.com, bulkmd.pages.dev, clipbrd.pages.dev, developers.cloudflare.com, duckduckgo.com, example.com, github.com, html.duckduckgo.com, img.youtube.com, markdown-link-checker.pages.dev, md2html-4r7.pages.dev, mdoutln.pages.dev, mdtable-3ik.pages.dev, mdview-die.pages.dev, mindexec.pages.dev, mindexecution.pages.dev, news.google.com, openrouter.ai, quickpad.pages.dev, reactjs.org, readme-1o4.pages.dev, schema.org, search.brave.com, www.bing.com, www.googleapis.com, www.w3.org, www.youtube.com

Source & flagged code

12 flagged · loading source
package.jsonView file
scripts.postinstall = npm run setup:grammars
High
Install Time Lifecycle Scripts

Package defines install-time lifecycle scripts.

package.jsonView on unpkg
scripts.postinstall = npm run setup:grammars
Medium
Ambiguous Install Lifecycle Script

Install-time lifecycle script is not statically allowlisted and needs review.

package.jsonView on unpkg
server.jsView file
18import sharp from 'sharp'; L19: import { createServer } from 'http'; L20: import { WebSocket, WebSocketServer } from 'ws'; ... L28: L29: const execAsync = promisify(exec); L30: const execFileAsync = promisify(execFile); ... L33: const app = express(); L34: const PORT = normalizePort(process.env.BRIDGE_PORT); L35: const BRIDGE_ROOT = path.dirname(fileURLToPath(import.meta.url));
Critical
Same File Env Network Execution

A single source file combines environment access, network access, and code or shell execution with blocking evidence.

server.jsView on unpkg · L18
Trigger-reachable chain: manifest.main -> server.js Reachable file contains a blocking source-risk pattern.
Critical
Trigger Reachable Dangerous Capability

A package entrypoint or install-time lifecycle script reaches a source file with blocking dangerous behavior.

server.jsView on unpkg
12import path from 'path'; L13: import { exec, spawn, spawnSync, execFile } from 'child_process'; L14: import { promisify } from 'util';
High
Child Process

Package source references child process execution.

server.jsView on unpkg · L12
28L29: const execAsync = promisify(exec); L30: const execFileAsync = promisify(execFile);
High
Shell

Package source references shell execution.

server.jsView on unpkg · L28
wwwroot/assets/MindCanvas-DBzHER9x.jsView file
817})(); L818: `}function $w(t){const e=performance.now(),a=[],i={log:(...r)=>a.push(QA(r.map(s=>String(s)).join(" "))),warn:(...r)=>a.push(QA(r.map(s=>String(s)).join(" "))),error:(...r)=>a.push... L819: `));return{ok:!0,output:await Promise.resolve(r(t.input,i)),logs:a,error:"",durationMs:Math.round(performance.now()-e),isolation:"inline-test-fallback"}}).catch(r=>({ok:!1,output:n...
High
Eval

Package source references dynamic code evaluation.

wwwroot/assets/MindCanvas-DBzHER9x.jsView on unpkg · L817
wwwroot/assets/supabaseAuthAdapter-DjshhyTD.jsView file
43${b}`}class C extends Error{constructor({message:e,code:r,cause:s,name:n}){var i;super(e,{cause:s}),this.__isWebAuthnError=!0,this.name=(i=n??(s instanceof Error?s.name:void 0))!==... L44: `);const A=await E.signMessage(new TextEncoder().encode(p),"utf8");if(!A||!(A instanceof Uint8Array))throw new Error("@supabase/auth-js: Wallet signMessage() API returned an recogn...
Medium
Dynamic Require

Package source references dynamic require/import behavior.

wwwroot/assets/supabaseAuthAdapter-DjshhyTD.jsView on unpkg · L43
scripts/remote-fast-mdm-browser-smoke.mjsView file
3Detached bundled service listener: scripts/remote-fast-mdm-browser-smoke.mjs spawns server.js; helper exposes a broad-bound HTTP listener. L3: import assert from 'node:assert/strict'; L4: import { spawn } from 'node:child_process'; L5: import { mkdtemp, rm } from 'node:fs/promises'; L6: import net from 'node:net'; L7: import os from 'node:os'; ... L14: const LOCAL_BRIDGE_DIR = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..'); L15: const REQUESTED_FPS = Number(process.env.MINDEXEC_REMOTE_MDM_BROWSER_REQUEST_FPS || 12); L16: const SAMPLE_MS = Number(process.env.MINDEXEC_REMOTE_MDM_BROWSER_SAMPLE_MS || 1500); ... L47: L48: const payload = await response.json().catch(() => null); L49: return { status: response.status, ok: response.ok, payload }; ... L90:
High
Spawned Bundled Service Listener

Source launches a detached bundled service that exposes a broad-bound HTTP listener.

scripts/remote-fast-mdm-browser-smoke.mjsView on unpkg · L3
remote-fast/osx-x64/mindexec-remote-fastView file
path = remote-fast/osx-x64/mindexec-remote-fast kind = native_binary sizeBytes = 83704 magicHex = [redacted]
Medium
Ships Native Binary

Package ships native binary artifacts.

remote-fast/osx-x64/mindexec-remote-fastView on unpkg
tree-sitter-grammars/tree-sitter-go.wasmView file
path = tree-sitter-grammars/tree-sitter-go.wasm kind = wasm_module sizeBytes = 235957 magicHex = [redacted]
Medium
Ships Wasm Module

Package ships WebAssembly modules.

tree-sitter-grammars/tree-sitter-go.wasmView on unpkg
start-bridge.batView file
path = start-bridge.bat kind = build_helper sizeBytes = 558 magicHex = [redacted]
Medium
Ships Build Helper

Package ships non-JavaScript build or shell helper files.

start-bridge.batView on unpkg

Findings

2 Critical5 High8 Medium5 Low
CriticalSame File Env Network Executionserver.js
CriticalTrigger Reachable Dangerous Capabilityserver.js
HighInstall Time Lifecycle Scriptspackage.json
HighChild Processserver.js
HighShellserver.js
HighEvalwwwroot/assets/MindCanvas-DBzHER9x.js
HighSpawned Bundled Service Listenerscripts/remote-fast-mdm-browser-smoke.mjs
MediumAmbiguous Install Lifecycle Scriptpackage.json
MediumDynamic Requirewwwroot/assets/supabaseAuthAdapter-DjshhyTD.js
MediumNetwork
MediumEnvironment Vars
MediumShips Native Binaryremote-fast/osx-x64/mindexec-remote-fast
MediumShips Wasm Moduletree-sitter-grammars/tree-sitter-go.wasm
MediumShips Build Helperstart-bridge.bat
MediumStructural Risk Force Deep Review
LowScripts Present
LowFilesystem
LowHigh Entropy Strings
LowTelemetry
LowUrl Strings