Loading npm security reports…
termdock@1.4.218: Install hook abuse – npm package flagged | LPM Firewall
Flagged — allowed with a warning
Allowed by default policy, but 39 finding(s) warrant review before installing.
AI Security Reviewscanned 1mo ago · by lpm-firewall-ai The package contains a concrete, automatic install-hook mutation of system software, including privileged commands. The inspected behavior is risky but does not establish malware-style exfiltration, persistence, or an AI-agent control-surface mutation.
Static reason
High-risk behavior combination matched malicious policy.; source matched previously finalized malicious package; routed for review
Trigger
npm postinstall, or a normal Termdock CLI startup without a successful boot-check marker
Impact
It can alter system software and prompt for or use elevated package-manager privileges without an explicit setup command.
Mechanism
automatic system dependency installation and native-module rebuilding
AI rationale
The package contains a concrete, automatic install-hook mutation of system software, including privileged commands. The inspected behavior is risky but does not establish malware-style exfiltration, persistence, or an AI-agent control-surface mutation.
Evidence
package.json scripts/postinstall.mjs dist/server/utils/bootCheck.js node_modules/node-pty/prebuilds/* ~/.termdock/.boot-check-ok
Decision evidencepublic snapshot AI called this Suspicious at 90.0% confidence as Dangerous Capability with low false-positive risk.
Evidence for warning
The npm postinstall hook automatically runs a package script. That script attempts to install tmux through system package managers, including sudo commands, without an interactive user action. Normal CLI startup repeats the dependency check and can retry system installation. Evidence against
No credential harvesting, secret exfiltration, or covert network endpoint was found in the inspected lifecycle and boot-check code. AI-agent hook changes are exposed through explicit install routes rather than automatically during installation. Behavioral surface
Source ChildProcess Crypto EnvironmentVars Eval Filesystem Network Shell WebSocket
Supply chain HighEntropyStrings Minified PossibleObfuscation Telemetry UrlStrings
Manifest No manifest risk signals triggered.
Source & flagged code30 flagged · loading source • scripts.postinstall = node scripts/postinstall.mjs
High Install Time Lifecycle Scripts
Package defines install-time lifecycle scripts.
package.json View on unpkg • scripts.postinstall = node scripts/postinstall.mjs
Medium Ambiguous Install Lifecycle Script
Install-time lifecycle script is not statically allowlisted and needs review.
package.json View on unpkg 1 import { EventEmitter } from 'events';
L2: import { execFile } from 'child_process';
L3: import { promisify } from 'util';
High Child Process
Package source references child process execution.
dist/server/certificateWatcher.js View on unpkg · L1 Findings3 Critical 23 High 7 Medium 6 Low
Critical Download Execute dist/server/cli.js
Critical Trojan Source Unicode dist/client/assets/terminal-C7X98Amf.js
Critical Trigger Reachable Dangerous Capability dist/server/cli.js
High Install Time Lifecycle Scripts package.json
High Child Process dist/server/certificateWatcher.js
High Shell dist/server/utils/bootCheck.js
High Eval dist/client/assets/passwordBootstrap-DWIbLBpG.js
High Sandbox Evasion Gated Capability scripts/postinstall.mjs
High Trigger Reachable External Ai Agent Control Surface Mutation dist/server/agent/installers.js
High Spawned Bundled Service Listener dist/server/cli.js
High Trigger Reachable Persistence
Affected versions and remediation This report applies to termdock@1.4.218 .
See all versions of termdock for other recorded verdicts.
Review the evidence and your use of termdock@1.4.218 before allowing it. Restrict the permissions described in this report. Choose an independently verified alternative or release. This report does not establish that other versions are safe. Evidence last updated: 2026-09-15 02:19:08.549Z (UTC) .
Think this verdict is wrong? Dispute it on GitHub or read how reports are produced .
scanned 227 file(s), 10.2 MB of source, external domains: 127.0.0.1, api.anthropic.com, api.github.com, api.kimi.com, api.openai.com, api.x.ai, bit.ly, brew.sh, bugzilla.mozilla.org, chatgpt.com, chevrotain.io, en.wikipedia.org, generativelanguage.googleapis.com, github.com, jcgt.org, langium.org, nodejs.org, reactjs.org, redux.js.org, registry.npmjs.org, term.example.com, termdock-preview.invalid, termdock.invalid, www.w3.org
51 const r = spawnSync(cmd, [], {
L52: shell: true,
L53: timeout: timeoutMs,
High Shell
Package source references shell execution.
dist/server/utils/bootCheck.js View on unpkg · L51 • matchType = normalized_sha256
matchedPackage = termdock@1.4.211
matchedPath = dist/server/utils/bootCheck.js
matchedIdentity = npm:dGVybWRvY2s:1.4.211
similarity = 1.000
summary = normalized source hash matched finalized malicious source
High Known Malware Source Similarity
Source file is highly similar to a previously finalized malicious package; route for source-aware review.
dist/server/utils/bootCheck.js View on unpkg dist/client/assets/passwordBootstrap-DWIbLBpG.js View file 1 import{o as JA,y as NA,p as y,aW as EA,aK as cA,G as z,a2 as hA,c1 as DA,r as GA,c3 as AA,bC as G,bX as wA,u as aA,aJ as ZA}from"./app-DIA5Fax_.js";import"./react-XDCjal2T.js";impo...
L2: ${g.stack}`:Q}function iA(g,A){return g=g>>>0,u().subarray(g/1,g/1+A)}let K=null;function l(){return(K===null||K.buffer.detached===!0||K.buffer.detached===void 0&&K.buffer!==k.memo...
High Eval
Package source references dynamic code evaluation.
dist/client/assets/passwordBootstrap-DWIbLBpG.js View on unpkg · L1 14 Trigger-reachable persistence chain: manifest.exports -> dist/server/entry.js -> dist/server/routes/terminal.js
L14: import QRCode from 'qrcode';
L15: import { execFile, spawn } from 'child_process';
L16: import { createHash, randomBytes, randomUUID } from 'crypto';
...
L67: const execFileAsync = promisify(execFile);
L68: const TERMDOCK_DIR = `${os.homedir()}/.termdock`;
L69: const automationStore = new AutomationStore(`${TERMDOCK_DIR}/automations.json`);
...
L83: const raw = await fs.promises.readFile(filePath, 'utf-8');
L84: return JSON.parse(raw);
L85: }
...
L115: const require_ = createRequire(import.meta.url);
L116: // dist/server/routes/terminal.js → ../../../package.json
L117: const pkg = require_(path.join(__dirname || '', '..', '..', '..', 'package.json'));
High Trigger Reachable Persistence
A manifest entrypoint or package-local install chain reaches persistence behavior.
dist/server/routes/terminal.js View on unpkg · L14 • matchType = normalized_sha256
matchedPackage = termdock@1.4.211
matchedPath = dist/server/routes/terminal.js
matchedIdentity = npm:dGVybWRvY2s:1.4.211
similarity = 1.000
summary = normalized source hash matched finalized malicious source
High Known Malware Source Similarity
Source file is highly similar to a previously finalized malicious package; route for source-aware review.
dist/server/routes/terminal.js View on unpkg 14 import QRCode from 'qrcode';
L15: import { execFile, spawn } from 'child_process';
L16: import { createHash, randomBytes, randomUUID } from 'crypto';
...
L67: const execFileAsync = promisify(execFile);
L68: const TERMDOCK_DIR = `${os.homedir()}/.termdock`;
L69: const automationStore = new AutomationStore(`${TERMDOCK_DIR}/automations.json`);
...
L83: const raw = await fs.promises.readFile(filePath, 'utf-8');
L84: return JSON.parse(raw);
L85: }
...
L115: const require_ = createRequire(import.meta.url);
L116: // dist/server/routes/terminal.js → ../../../package.json
L117: const pkg = require_(path.join(__dirname || '', '..', '..', '..', 'package.json'));
Medium Install Persistence
Source writes installer persistence such as shell profile or service configuration.
dist/server/routes/terminal.js View on unpkg · L14 4 // 设置(同步 fs 不占线程池,所以放在文件体顶部仍然足够早)。
L5: process.env.UV_THREADPOOL_SIZE ||= '16';
L6: import { config as loadDotenv } from 'dotenv';
...
L10: // dotenv 不会覆盖已存在的环境变量,因此系统环境变量和命令行参数优先级最高
L11: loadDotenv({ path: resolve(os.homedir(), '.termdock', '.env'), quiet: true });
L12: loadDotenv({ path: resolve(process.cwd(), '.env'), quiet: true });
...
L20: import fs from 'fs';
L21: import http from 'http';
L22: import https from 'https';
...
L25: import { createHash, randomUUID } from 'crypto';
L26: import { spawn, spawnSync, execFile } from 'child_process';
L27: import { promisify } from 'util';
Critical Download Execute
Source downloads or fetches remote code and executes it.
dist/server/cli.js View on unpkg · L4 4 Trigger-reachable chain: scripts.start -> dist/server/cli.js
L4: // 设置(同步 fs 不占线程池,所以放在文件体顶部仍然足够早)。
L5: process.env.UV_THREADPOOL_SIZE ||= '16';
L6: import { config as loadDotenv } from 'dotenv';
...
L10: // dotenv 不会覆盖已存在的环境变量,因此系统环境变量和命令行参数优先级最高
L11: loadDotenv({ path: resolve(os.homedir(), '.termdock', '.env'), quiet: true });
L12: loadDotenv({ path: resolve(process.cwd(), '.env'), quiet: true });
...
L20: import fs from 'fs';
L21: import http from 'http';
L22: import https from 'https';
...
L25: import { createHash, randomUUID } from 'crypto';
L26: import { spawn, spawnSync, execFile } from 'child_process';
L27: import { promisify } from 'util';
Critical Trigger Reachable Dangerous Capability
A package entrypoint or install-time lifecycle script reaches a source file with blocking dangerous behavior.
dist/server/cli.js View on unpkg · L4 4 Detached bundled service listener: dist/server/cli.js spawns dist/server/entry.js; helper exposes a broad-bound HTTP listener.
L4: // 设置(同步 fs 不占线程池,所以放在文件体顶部仍然足够早)。
L5: process.env.UV_THREADPOOL_SIZE ||= '16';
L6: import { config as loadDotenv } from 'dotenv';
...
L10: // dotenv 不会覆盖已存在的环境变量,因此系统环境变量和命令行参数优先级最高
L11: loadDotenv({ path: resolve(os.homedir(), '.termdock', '.env'), quiet: true });
L12: loadDotenv({ path: resolve(process.cwd(), '.env'), quiet: true });
...
L20: import fs from 'fs';
L21: import http from 'http';
L22: import https from 'https';
...
L25: import { createHash, randomUUID } from 'crypto';
L26: import { spawn, spawnSync, execFile } from 'child_process';
L27: import { promisify } from 'util';
High Spawned Bundled Service Listener
Source launches a detached bundled service that exposes a broad-bound HTTP listener.
dist/server/cli.js View on unpkg · L4 10 L11: import { execSync, spawnSync } from 'child_process';
L12: import { createRequire } from 'module';
...
L31: const r = spawnSync(cmd, [], { shell: true, timeout: timeoutMs, encoding: 'utf-8', stdio: ['pipe', 'pipe', 'pipe'] });
L32: return { ok: r.status === 0, stdout: r.stdout, stderr: r.stderr };
L33: } catch {
...
L51: const { ensureNodePty } = require_('./ensure-node-pty.cjs');
L52: const PTY_PATH = require_.resolve('node-pty/package.json', { paths: [pkgRoot] }).replace('/package.json', '');
L53:
...
L83: const pty = require_(PTY_PATH);
L84: const proc = pty.spawn(process.env.SHELL || '/bin/bash', [], { name: 'xterm', cols: 80, rows: 24 });
L85: proc.kill();
High Sandbox Evasion Gated Capability
Source gates dangerous network, credential, or execution behavior behind CI, host, platform, time, or geo fingerprint checks.
scripts/postinstall.mjs View on unpkg · L10 • matchType = normalized_sha256
matchedPackage = termdock@1.4.211
matchedPath = scripts/postinstall.mjs
matchedIdentity = npm:dGVybWRvY2s:1.4.211
similarity = 1.000
summary = normalized source hash matched finalized malicious source
High Known Malware Source Similarity
Source file is highly similar to a previously finalized malicious package; route for source-aware review.
scripts/postinstall.mjs View on unpkg • Manifest-trigger-reachable source links an external AI-agent control path to a behavior-bearing write operation.
import fs from 'node:fs';
import os from 'node:os';
import path from 'node:path';
import { execfile, spawn } from 'node:child_process';
import { agentbyslug, ispluginagent } from './registry.js';
import { loadplugins, resolvehooktarget } from './plugins.js';
export const hook_agents = ['claude', 'codex', 'copilot', 'opencode', 'pi', 'grok', 'kimi'];
const display_names = {
claude: 'claude code',
codex: 'codex',
copilot: 'copilot cli',
opencode: 'opencode',
pi: 'pi',
grok: 'grok build',
kimi: 'kimi code',
};
High Trigger Reachable External Ai Agent Control Surface Mutation
Manifest-trigger-reachable source writes behavior-bearing configuration into a user or project AI-agent control surface.
dist/server/agent/installers.js View on unpkg • matchType = normalized_sha256
matchedPackage = termdock@1.4.211
matchedPath = dist/server/agent/installers.js
matchedIdentity = npm:dGVybWRvY2s:1.4.211
similarity = 1.000
summary = normalized source hash matched finalized malicious source
High Known Malware Source Similarity
Source file is highly similar to a previously finalized malicious package; route for source-aware review.
dist/server/agent/installers.js View on unpkg dist/client/assets/terminal-C7X98Amf.js View file 4 contains invisible/control Unicode U+200E (left-to-right mark)
`)})),this._register(this._bufferService.onResize(()=>this.queueSync())),this._register(this._bufferService.buffers.onBufferActivate(()=>{this._latestYDisp=void 0,this.queueSync()})),this._register(this._bufferService.onScroll(()=>this._syn
Critical Trojan Source Unicode
Source contains bidi control or invisible Unicode characters associated with Trojan Source attacks.
dist/client/assets/terminal-C7X98Amf.js View on unpkg · L4 51 console.log('Rebuilding node-pty with the Termdock macOS FD cleanup fix...');
L52: const result = spawnSync('npx', ['--yes', 'node-gyp', 'rebuild'], {
L53: cwd: ptyRoot, stdio: 'inherit', timeout: 180_000,
High Runtime Package Install
Package source invokes a package manager install command at runtime.
scripts/ensure-node-pty.cjs View on unpkg · L51 dist/client/shell-integration/termdock.bash View file • path = dist/client/shell-integration/termdock.bash
kind = build_helper
sizeBytes = 3514
magicHex = [redacted]
Medium Ships Build Helper
Package ships non-JavaScript build or shell helper files.
dist/client/shell-integration/termdock.bash View on unpkg dist/client/sw-encrypted-background.js.br View file • path = dist/client/sw-encrypted-background.js.br
kind = high_entropy_blob
sizeBytes = 64690
magicHex = [redacted]
High Ships High Entropy Blob
Package ships high-entropy non-source blobs.
dist/client/sw-encrypted-background.js.br View on unpkg • path = dist/client/sw-encrypted-background.js.br
kind = compressed_blob
sizeBytes = 64690
magicHex = [redacted]
Medium Ships Compressed Blob
Package ships compressed or archive-like blobs.
dist/client/sw-encrypted-background.js.br View on unpkg dist/client/assets/chunk-TICWLB2K-rRYUR8B8.js#virtual:normalized:round1 View file • stage = ast_semantic_analysis; reason = ast_parse_error; limitedFiles = 4
High Semantic Analysis Limited
A bounded semantic-analysis stage reached its safety limit; remaining detectors completed, but this package requires AI review.
dist/client/assets/chunk-TICWLB2K-rRYUR8B8.js#virtual:normalized:round1 View on unpkg • matchType = normalized_sha256
matchedPackage = termdock@1.4.211
matchedPath = scripts/prepare-desktop-runtime.mjs
matchedIdentity = npm:dGVybWRvY2s:1.4.211
similarity = 1.000
summary = normalized source hash matched finalized malicious source
High Known Malware Source Similarity
Source file is highly similar to a previously finalized malicious package; route for source-aware review.
scripts/prepare-desktop-runtime.mjs View on unpkg • matchType = normalized_sha256
matchedPackage = termdock@1.4.211
matchedPath = .desktop-dist/main.js
matchedIdentity = npm:dGVybWRvY2s:1.4.211
similarity = 1.000
summary = normalized source hash matched finalized malicious source
High Known Malware Source Similarity
Source file is highly similar to a previously finalized malicious package; route for source-aware review.
.desktop-dist/main.js View on unpkg • matchType = normalized_sha256
matchedPackage = termdock@1.4.211
matchedPath = [redacted].js
matchedIdentity = npm:dGVybWRvY2s:1.4.211
similarity = 1.000
summary = normalized source hash matched finalized malicious source
High Known Malware Source Similarity
Source file is highly similar to a previously finalized malicious package; route for source-aware review.
dist/server/agent/pluginPackages.js View on unpkg • matchType = normalized_sha256
matchedPackage = termdock@1.4.211
matchedPath = dist/server/utils/npmUpdate.js
matchedIdentity = npm:dGVybWRvY2s:1.4.211
similarity = 1.000
summary = normalized source hash matched finalized malicious source
High Known Malware Source Similarity
Source file is highly similar to a previously finalized malicious package; route for source-aware review.
dist/server/utils/npmUpdate.js View on unpkg dist/server/agent/titleNamerCatalog.js View file • matchType = normalized_sha256
matchedPackage = termdock@1.4.211
matchedPath = [redacted].js
matchedIdentity = npm:dGVybWRvY2s:1.4.211
similarity = 1.000
summary = normalized source hash matched finalized malicious source
High Known Malware Source Similarity
Source file is highly similar to a previously finalized malicious package; route for source-aware review.
dist/server/agent/titleNamerCatalog.js View on unpkg • matchType = normalized_sha256
matchedPackage = termdock@1.4.211
matchedPath = dist/server/ptyhost/manager.js
matchedIdentity = npm:dGVybWRvY2s:1.4.211
similarity = 1.000
summary = normalized source hash matched finalized malicious source
High Known Malware Source Similarity
Source file is highly similar to a previously finalized malicious package; route for source-aware review.
dist/server/ptyhost/manager.js View on unpkg • matchType = token_shingles
matchedPackage = termdock@1.4.211
matchedPath = dist/client/assets/App-ecJnsxAe.js
matchedIdentity = npm:dGVybWRvY2s:1.4.211
similarity = 1.000
shingleOverlap = 48
summary = source token shingles overlapped finalized malicious source
High Known Malware Source Similarity
Source file is highly similar to a previously finalized malicious package; route for source-aware review.
dist/client/assets/App-B5iubRB9.js View on unpkg dist/client/assets/index-UqXCGE5m.js View file • matchType = normalized_sha256
matchedPackage = termdock@1.4.211
matchedPath = dist/client/assets/index-UqXCGE5m.js
matchedIdentity = npm:dGVybWRvY2s:1.4.211
similarity = 1.000
summary = normalized source hash matched finalized malicious source
High Known Malware Source Similarity
Source file is highly similar to a previously finalized malicious package; route for source-aware review.
dist/client/assets/index-UqXCGE5m.js View on unpkg dist/server/routes/terminal.js
High Runtime Package Install scripts/ensure-node-pty.cjs
High Ships High Entropy Blob dist/client/sw-encrypted-background.js.br
High Semantic Analysis Limited dist/client/assets/chunk-TICWLB2K-rRYUR8B8.js#virtual:normalized:round1
High Known Malware Source Similarity dist/server/utils/bootCheck.js
High Known Malware Source Similarity scripts/postinstall.mjs
High Known Malware Source Similarity dist/server/routes/terminal.js
High Known Malware Source Similarity scripts/prepare-desktop-runtime.mjs
High Known Malware Source Similarity .desktop-dist/main.js
High Known Malware Source Similarity dist/server/agent/pluginPackages.js
High Known Malware Source Similarity dist/server/utils/npmUpdate.js
High Known Malware Source Similarity dist/server/agent/installers.js
High Known Malware Source Similarity dist/server/agent/titleNamerCatalog.js
High Known Malware Source Similarity dist/server/ptyhost/manager.js
High Known Malware Source Similarity dist/client/assets/App-B5iubRB9.js
High Known Malware Source Similarity dist/client/assets/index-UqXCGE5m.js
Medium Ambiguous Install Lifecycle Script package.json
Medium Install Persistence dist/server/routes/terminal.js
Medium Ships Build Helper dist/client/shell-integration/termdock.bash
Medium Ships Compressed Blob dist/client/sw-encrypted-background.js.br
Medium Structural Risk Force Deep Review
Low Non Install Lifecycle Scripts
Entrypoints main → .desktop-dist/main.js exports map bin → td, termdock
Artifact 30.9 MB · 766 files 2 signature(s)
Install lifecycle postinstall prepublishOnly
Behavioral surface ChildProcess Crypto EnvironmentVars Eval Filesystem Network Shell WebSocket HighEntropyStrings Minified PossibleObfuscation Telemetry UrlStrings Manifest: clean
Source & flagged code30 flagged • scripts.postinstall = node scripts/postinstall.mjs
High Install Time Lifecycle Scripts
Package defines install-time lifecycle scripts.
package.json View on unpkg • scripts.postinstall = node scripts/postinstall.mjs
Medium Ambiguous Install Lifecycle Script
Install-time lifecycle script is not statically allowlisted and needs review.
package.json View on unpkg 1 import { EventEmitter } from 'events';
L2: import { execFile } from 'child_process';
L3: import { promisify } from 'util';
High Child Process
Package source references child process execution.
dist/server/certificateWatcher.js View on unpkg · L1 51 const r = spawnSync(cmd, [], {
L52: shell: true,
L53: timeout: timeoutMs,
High Shell
Package source references shell execution.
dist/server/utils/bootCheck.js View on unpkg · L51 • matchType = normalized_sha256
matchedPackage = termdock@1.4.211
matchedPath = dist/server/utils/bootCheck.js
matchedIdentity = npm:dGVybWRvY2s:1.4.211
similarity = 1.000
summary = normalized source hash matched finalized malicious source
High Known Malware Source Similarity
Source file is highly similar to a previously finalized malicious package; route for source-aware review.
dist/server/utils/bootCheck.js View on unpkg dist/client/assets/passwordBootstrap-DWIbLBpG.js View file 1 import{o as JA,y as NA,p as y,aW as EA,aK as cA,G as z,a2 as hA,c1 as DA,r as GA,c3 as AA,bC as G,bX as wA,u as aA,aJ as ZA}from"./app-DIA5Fax_.js";import"./react-XDCjal2T.js";impo...
L2: ${g.stack}`:Q}function iA(g,A){return g=g>>>0,u().subarray(g/1,g/1+A)}let K=null;function l(){return(K===null||K.buffer.detached===!0||K.buffer.detached===void 0&&K.buffer!==k.memo...
High Eval
Package source references dynamic code evaluation.
dist/client/assets/passwordBootstrap-DWIbLBpG.js View on unpkg · L1 14 Trigger-reachable persistence chain: manifest.exports -> dist/server/entry.js -> dist/server/routes/terminal.js
L14: import QRCode from 'qrcode';
L15: import { execFile, spawn } from 'child_process';
L16: import { createHash, randomBytes, randomUUID } from 'crypto';
...
L67: const execFileAsync = promisify(execFile);
L68: const TERMDOCK_DIR = `${os.homedir()}/.termdock`;
L69: const automationStore = new AutomationStore(`${TERMDOCK_DIR}/automations.json`);
...
L83: const raw = await fs.promises.readFile(filePath, 'utf-8');
L84: return JSON.parse(raw);
L85: }
...
L115: const require_ = createRequire(import.meta.url);
L116: // dist/server/routes/terminal.js → ../../../package.json
L117: const pkg = require_(path.join(__dirname || '', '..', '..', '..', 'package.json'));
High Trigger Reachable Persistence
A manifest entrypoint or package-local install chain reaches persistence behavior.
dist/server/routes/terminal.js View on unpkg · L14 • matchType = normalized_sha256
matchedPackage = termdock@1.4.211
matchedPath = dist/server/routes/terminal.js
matchedIdentity = npm:dGVybWRvY2s:1.4.211
similarity = 1.000
summary = normalized source hash matched finalized malicious source
High Known Malware Source Similarity
Source file is highly similar to a previously finalized malicious package; route for source-aware review.
dist/server/routes/terminal.js View on unpkg 14 import QRCode from 'qrcode';
L15: import { execFile, spawn } from 'child_process';
L16: import { createHash, randomBytes, randomUUID } from 'crypto';
...
L67: const execFileAsync = promisify(execFile);
L68: const TERMDOCK_DIR = `${os.homedir()}/.termdock`;
L69: const automationStore = new AutomationStore(`${TERMDOCK_DIR}/automations.json`);
...
L83: const raw = await fs.promises.readFile(filePath, 'utf-8');
L84: return JSON.parse(raw);
L85: }
...
L115: const require_ = createRequire(import.meta.url);
L116: // dist/server/routes/terminal.js → ../../../package.json
L117: const pkg = require_(path.join(__dirname || '', '..', '..', '..', 'package.json'));
Lines 1-24 javascript
2 // libuv 线程池默认只有 4 个线程,慢/挂起的异步 IO(fs.promises、crypto 等)
3 // 会把池耗尽,表现为整个服务的 IO 全部卡死。必须在任何异步 fs 调用之前
4 // 设置(同步 fs 不占线程池,所以放在文件体顶部仍然足够早)。
5 process.env. UV_THREADPOOL_SIZE ||= '16' ;
6 import { config as loadDotenv } from 'dotenv' ;
10 L11: import { execSync, spawnSync } from 'child_process';
L12: import { createRequire } from 'module';
...
L31: const r = spawnSync(cmd, [], { shell: true, timeout: timeoutMs, encoding: 'utf-8', stdio: ['pipe', 'pipe', 'pipe'] });
L32: return { ok: r.status === 0, stdout: r.stdout, stderr: r.stderr };
L33: } catch {
...
L51: const { ensureNodePty } = require_('./ensure-node-pty.cjs');
L52: const PTY_PATH = require_.resolve('node-pty/package.json', { paths: [pkgRoot] }).replace('/package.json', '');
L53:
...
L83: const pty = require_(PTY_PATH);
L84: const proc = pty.spawn(process.env.SHELL || '/bin/bash', [], { name: 'xterm', cols: 80, rows: 24 });
L85: proc.kill();
High Sandbox Evasion Gated Capability
Source gates dangerous network, credential, or execution behavior behind CI, host, platform, time, or geo fingerprint checks.
scripts/postinstall.mjs View on unpkg · L10 • matchType = normalized_sha256
matchedPackage = termdock@1.4.211
matchedPath = scripts/postinstall.mjs
matchedIdentity = npm:dGVybWRvY2s:1.4.211
similarity = 1.000
summary = normalized source hash matched finalized malicious source
High Known Malware Source Similarity
Source file is highly similar to a previously finalized malicious package; route for source-aware review.
scripts/postinstall.mjs View on unpkg • Manifest-trigger-reachable source links an external AI-agent control path to a behavior-bearing write operation.
import fs from 'node:fs';
import os from 'node:os';
import path from 'node:path';
import { execfile, spawn } from 'node:child_process';
import { agentbyslug, ispluginagent } from './registry.js';
import { loadplugins, resolvehooktarget } from './plugins.js';
export const hook_agents = ['claude', 'codex', 'copilot', 'opencode', 'pi', 'grok', 'kimi'];
const display_names = {
claude: 'claude code',
codex: 'codex',
copilot: 'copilot cli',
opencode: 'opencode',
pi: 'pi',
grok: 'grok build',
kimi: 'kimi code',
};
High Trigger Reachable External Ai Agent Control Surface Mutation
Manifest-trigger-reachable source writes behavior-bearing configuration into a user or project AI-agent control surface.
dist/server/agent/installers.js View on unpkg • matchType = normalized_sha256
matchedPackage = termdock@1.4.211
matchedPath = dist/server/agent/installers.js
matchedIdentity = npm:dGVybWRvY2s:1.4.211
similarity = 1.000
summary = normalized source hash matched finalized malicious source
High Known Malware Source Similarity
Source file is highly similar to a previously finalized malicious package; route for source-aware review.
dist/server/agent/installers.js View on unpkg dist/client/assets/terminal-C7X98Amf.js View file 4 contains invisible/control Unicode U+200E (left-to-right mark)
`)})),this._register(this._bufferService.onResize(()=>this.queueSync())),this._register(this._bufferService.buffers.onBufferActivate(()=>{this._latestYDisp=void 0,this.queueSync()})),this._register(this._bufferService.onScroll(()=>this._syn
Critical Trojan Source Unicode
Source contains bidi control or invisible Unicode characters associated with Trojan Source attacks.
dist/client/assets/terminal-C7X98Amf.js View on unpkg · L4 51 console.log('Rebuilding node-pty with the Termdock macOS FD cleanup fix...');
L52: const result = spawnSync('npx', ['--yes', 'node-gyp', 'rebuild'], {
L53: cwd: ptyRoot, stdio: 'inherit', timeout: 180_000,
High Runtime Package Install
Package source invokes a package manager install command at runtime.
scripts/ensure-node-pty.cjs View on unpkg · L51 dist/client/shell-integration/termdock.bash View file • path = dist/client/shell-integration/termdock.bash
kind = build_helper
sizeBytes = 3514
magicHex = [redacted]
Medium Ships Build Helper
Package ships non-JavaScript build or shell helper files.
dist/client/shell-integration/termdock.bash View on unpkg dist/client/sw-encrypted-background.js.br View file • path = dist/client/sw-encrypted-background.js.br
kind = high_entropy_blob
sizeBytes = 64690
magicHex = [redacted]
High Ships High Entropy Blob
Package ships high-entropy non-source blobs.
dist/client/sw-encrypted-background.js.br View on unpkg • path = dist/client/sw-encrypted-background.js.br
kind = compressed_blob
sizeBytes = 64690
magicHex = [redacted]
Medium Ships Compressed Blob
Package ships compressed or archive-like blobs.
dist/client/sw-encrypted-background.js.br View on unpkg dist/client/assets/chunk-TICWLB2K-rRYUR8B8.js#virtual:normalized:round1 View file • stage = ast_semantic_analysis; reason = ast_parse_error; limitedFiles = 4
High Semantic Analysis Limited
A bounded semantic-analysis stage reached its safety limit; remaining detectors completed, but this package requires AI review.
dist/client/assets/chunk-TICWLB2K-rRYUR8B8.js#virtual:normalized:round1 View on unpkg • matchType = normalized_sha256
matchedPackage = termdock@1.4.211
matchedPath = scripts/prepare-desktop-runtime.mjs
matchedIdentity = npm:dGVybWRvY2s:1.4.211
similarity = 1.000
summary = normalized source hash matched finalized malicious source
High Known Malware Source Similarity
Source file is highly similar to a previously finalized malicious package; route for source-aware review.
scripts/prepare-desktop-runtime.mjs View on unpkg • matchType = normalized_sha256
matchedPackage = termdock@1.4.211
matchedPath = .desktop-dist/main.js
matchedIdentity = npm:dGVybWRvY2s:1.4.211
similarity = 1.000
summary = normalized source hash matched finalized malicious source
High Known Malware Source Similarity
Source file is highly similar to a previously finalized malicious package; route for source-aware review.
.desktop-dist/main.js View on unpkg • matchType = normalized_sha256
matchedPackage = termdock@1.4.211
matchedPath = [redacted].js
matchedIdentity = npm:dGVybWRvY2s:1.4.211
similarity = 1.000
summary = normalized source hash matched finalized malicious source
High Known Malware Source Similarity
Source file is highly similar to a previously finalized malicious package; route for source-aware review.
dist/server/agent/pluginPackages.js View on unpkg • matchType = normalized_sha256
matchedPackage = termdock@1.4.211
matchedPath = dist/server/utils/npmUpdate.js
matchedIdentity = npm:dGVybWRvY2s:1.4.211
similarity = 1.000
summary = normalized source hash matched finalized malicious source
High Known Malware Source Similarity
Source file is highly similar to a previously finalized malicious package; route for source-aware review.
dist/server/utils/npmUpdate.js View on unpkg dist/server/agent/titleNamerCatalog.js View file • matchType = normalized_sha256
matchedPackage = termdock@1.4.211
matchedPath = [redacted].js
matchedIdentity = npm:dGVybWRvY2s:1.4.211
similarity = 1.000
summary = normalized source hash matched finalized malicious source
High Known Malware Source Similarity
Source file is highly similar to a previously finalized malicious package; route for source-aware review.
dist/server/agent/titleNamerCatalog.js View on unpkg • matchType = normalized_sha256
matchedPackage = termdock@1.4.211
matchedPath = dist/server/ptyhost/manager.js
matchedIdentity = npm:dGVybWRvY2s:1.4.211
similarity = 1.000
summary = normalized source hash matched finalized malicious source
High Known Malware Source Similarity
Source file is highly similar to a previously finalized malicious package; route for source-aware review.
dist/server/ptyhost/manager.js View on unpkg • matchType = token_shingles
matchedPackage = termdock@1.4.211
matchedPath = dist/client/assets/App-ecJnsxAe.js
matchedIdentity = npm:dGVybWRvY2s:1.4.211
similarity = 1.000
shingleOverlap = 48
summary = source token shingles overlapped finalized malicious source
High Known Malware Source Similarity
Source file is highly similar to a previously finalized malicious package; route for source-aware review.
dist/client/assets/App-B5iubRB9.js View on unpkg dist/client/assets/index-UqXCGE5m.js View file • matchType = normalized_sha256
matchedPackage = termdock@1.4.211
matchedPath = dist/client/assets/index-UqXCGE5m.js
matchedIdentity = npm:dGVybWRvY2s:1.4.211
similarity = 1.000
summary = normalized source hash matched finalized malicious source
High Known Malware Source Similarity
Source file is highly similar to a previously finalized malicious package; route for source-aware review.
dist/client/assets/index-UqXCGE5m.js View on unpkg Medium Install Persistence
Source writes installer persistence such as shell profile or service configuration.
dist/server/routes/terminal.js View on unpkg · L14 7
import os from 'os' ;
8 import { resolve } from 'path' ;
9 // 加载 .env 配置:用户级 ~/.termdock/.env 为基准,项目级 CWD .env 可覆盖
10 // dotenv 不会覆盖已存在的环境变量,因此系统环境变量和命令行参数优先级最高
11 loadDotenv ({ path: resolve (os. homedir (), '.termdock' , '.env' ), quiet: true });
12 loadDotenv ({ path: resolve (process. cwd (), '.env' ), quiet: true });
13 // Federation commands run before normal server/terminal CLI initialization.
14 if (process.argv. slice ( 2 ). some ( arg => arg === '--federation-pairing' || arg === '--federation-relay' )) {
15 const { runFederationCli } = await import ( './federation/cli.js' );
16 process. exit ( await runFederationCli (process.argv. slice ( 2 )));
18 import { parseAutomationCommand, executeAutomationCommand, AUTOMATION_HELP } from './agent/automationCli.js' ;
19 import { parseCollaborationCommand, executeCollaborationCommand, COLLAB_HELP } from './agent/collaborationCli.js' ;
21 import http from 'http' ;
22 import https from 'https' ;
Critical Download Execute
Source downloads or fetches remote code and executes it.
dist/server/cli.js View on unpkg · L4 23 import path from 'path' ;
24 import readline from 'readline' ;
4 Trigger-reachable chain: scripts.start -> dist/server/cli.js
L4: // 设置(同步 fs 不占线程池,所以放在文件体顶部仍然足够早)。
L5: process.env.UV_THREADPOOL_SIZE ||= '16';
L6: import { config as loadDotenv } from 'dotenv';
...
L10: // dotenv 不会覆盖已存在的环境变量,因此系统环境变量和命令行参数优先级最高
L11: loadDotenv({ path: resolve(os.homedir(), '.termdock', '.env'), quiet: true });
L12: loadDotenv({ path: resolve(process.cwd(), '.env'), quiet: true });
...
L20: import fs from 'fs';
L21: import http from 'http';
L22: import https from 'https';
...
L25: import { createHash, randomUUID } from 'crypto';
L26: import { spawn, spawnSync, execFile } from 'child_process';
L27: import { promisify } from 'util';
Critical Trigger Reachable Dangerous Capability
A package entrypoint or install-time lifecycle script reaches a source file with blocking dangerous behavior.
dist/server/cli.js View on unpkg · L4 4 Detached bundled service listener: dist/server/cli.js spawns dist/server/entry.js; helper exposes a broad-bound HTTP listener.
L4: // 设置(同步 fs 不占线程池,所以放在文件体顶部仍然足够早)。
L5: process.env.UV_THREADPOOL_SIZE ||= '16';
L6: import { config as loadDotenv } from 'dotenv';
...
L10: // dotenv 不会覆盖已存在的环境变量,因此系统环境变量和命令行参数优先级最高
L11: loadDotenv({ path: resolve(os.homedir(), '.termdock', '.env'), quiet: true });
L12: loadDotenv({ path: resolve(process.cwd(), '.env'), quiet: true });
...
L20: import fs from 'fs';
L21: import http from 'http';
L22: import https from 'https';
...
L25: import { createHash, randomUUID } from 'crypto';
L26: import { spawn, spawnSync, execFile } from 'child_process';
L27: import { promisify } from 'util';
High Spawned Bundled Service Listener
Source launches a detached bundled service that exposes a broad-bound HTTP listener.
dist/server/cli.js View on unpkg · L4