Node-based terminal manager for AI coding agents — tmux-backed terminals and parallel agent sessions as draggable nodes on an infinite pan/zoom canvas. macOS, Linux, and a browser Server Edition.
TypeScript adhdagent-orchestrationai-agentscanvasclaude-codecodexcoding-agentsdeveloper-toolselectrongeminilinuxmacosmultiplexeropencodeparallel-agentsterminalterminal-emulatorterminal-multiplexertmuxworkspace-manager
test: fresh mkdtemp userDataDir in the two fakes that still used a /tmp literal
enes974d2386a3c0
diff --git a/src/core/canvas-sync.test.ts b/src/core/canvas-sync.test.tsindex 7d6caa88d..7c472109f 100644--- a/src/core/canvas-sync.test.ts+++ b/src/core/canvas-sync.test.ts@@ -1,4 +1,7 @@import { describe, it, expect, beforeEach, afterEach } from 'vitest'+import { mkdtempSync } from 'fs'+import os from 'os'+import path from 'path'import { initPlatform, resetPlatformForTests, type CorePlatform } from './platform'import { fakePlatform } from './platform-fake'import {@@ -28,7 +31,11 @@ function testPlatform() {let clients: number[] = []const senderListeners = new Map<string, (senderId: number, ...args: any[]) => void>()const p: CorePlatform = {- userDataDir: '/tmp/nodeterm-canvas-sync-test',+ // A fresh mkdtemp dir, never a fixed literal: this platform is registered via initPlatform,+ // so a predictable '/tmp/...' here reads (to CodeQL's js/insecure-temporary-file, and to a+ // parallel test run) as every production write through platform().userDataDir landing on a+ // shared guessable temp path — the exact fix platform-fake.ts documents.+ userDataDir: mkdtempSync(path.join(os.tmpdir(), 'nodeterm-canvas-sync-')),appVersion: '0.0.0-test',isPackaged: false,handle: () => {},diff --git a/src/main/peer-registry.test.ts b/src/main/peer-registry.test.tsindex 8958f9cde..bb334bc7a 100644--- a/src/main/peer-registry.test.ts+++ b/src/main/peer-registry.test.ts@@ -1,4 +1,7 @@import { describe, it, expect, beforeEach, afterEach, vi } from 'vitest'+import { mkdtempSync } from 'fs'+import os from 'os'+import path from 'path'import {registerPeerSink,unregisterPeerSink,@@ -32,7 +35,9 @@ function fakeSink(buffered = () => 0) {function fakePlatformWithPeers(wc: { sent: Array<{ id: number; channel: string; args: any[] }> }) {const wcIds = [1]const p: CorePlatform = {- userDataDir: '/tmp/ud',+ // mkdtemp, not a '/tmp/ud' literal: registered via initPlatform below, so a fixed temp path+ // taints every platform().userDataDir write as js/insecure-temporary-file (see platform-fake.ts).+ userDataDir: mkdtempSync(path.join(os.tmpdir(), 'nodeterm-peer-registry-')),appVersion: '0.0.0',isPackaged: false,handle: () => {},