Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS
JavaScript ai-agentsdashboarddeveloper-toolsdigital-twinquantified-selfsecond-brainself-hostedtailscale
security: document executeCommand env inheritance and return relative upload paths
[._.]/ Adam Eivy7d99718b6c6f
diff --git a/.changelog/NEXT.md b/.changelog/NEXT.mdindex 638283dded..046fca46ef 100644--- a/.changelog/NEXT.md+++ b/.changelog/NEXT.md@@ -4,6 +4,7 @@## Changed+- **2026-06-09 DevSecOps audit sweep** — a full-codebase audit landed as a set of focused PRs. Highlights: crash-safe (atomic) writes for a dozen state files (memory index/embeddings, backup scheduler, calendar/message accounts, activity logs); timeouts on local-LLM and provider model-list requests so a stalled endpoint can't hang the server; guards on background timer callbacks that could previously crash the process on a rejected write; the Templates page is now reachable from ⌘K and voice navigation; faster first loads on Goals, Brain, Chief of Staff, and CoS Memory (their 3D views now load on demand instead of riding in the main bundle); the bulky `googleapis` package replaced by the scoped Calendar/Gmail/auth packages (~190 MB less on disk); screen-reader labels on icon-only buttons and form fields across settings tabs; agent World-tab history now reloads when switching agents; and ~120 new tests covering previously untested services.- **Docs:** Split the AI Toolkit and Dashboard Widgets sections out of the root `CLAUDE.md` into directory-scoped `server/lib/aiToolkit/CLAUDE.md` and `client/src/components/dashboard/CLAUDE.md` files (load on demand when working in those subtrees), leaving discovery pointers at root. Trims root context with no loss of guidance.## Fixeddiff --git a/server/routes/uploads.js b/server/routes/uploads.jsindex 397ccd5f1a..28cc04ab75 100644--- a/server/routes/uploads.js+++ b/server/routes/uploads.js@@ -157,7 +157,7 @@ router.post('/', asyncHandler(async (req, res) => {id,filename: fname,originalName: filename,- path: filepath,+ path: `/api/uploads/${encodeURIComponent(fname)}`,size: buffer.length,sizeFormatted: formatSize(buffer.length),mimeType,@@ -182,7 +182,7 @@ router.get('/', asyncHandler(async (req, res) => {return {filename,- path: filepath,+ path: `/api/uploads/${encodeURIComponent(filename)}`,size: stats.size,sizeFormatted: formatSize(stats.size),mimeType: getMimeType(ext),diff --git a/server/services/commands.js b/server/services/commands.jsindex be8379a34e..229d9177cf 100644--- a/server/services/commands.js+++ b/server/services/commands.js@@ -1,6 +1,7 @@import { spawn } from 'child_process';import { logAction } from './history.js';import { ALLOWED_COMMANDS, validateCommand } from '../lib/commandSecurity.js';+import { safeChildProcessEnv } from '../lib/processEnv.js';// Track active commandsconst activeCommands = new Map();@@ -33,9 +34,13 @@ export function executeCommand(command, workspacePath, onData, onComplete) {// Security: Use spawn with array of args (shell:false) to prevent shell injection.// validateCommand has already rejected shell metacharacters AND parsed quoted args// correctly (e.g. 'git commit -m "msg with spaces"' becomes 4 args, not 5).+ // safeChildProcessEnv matches the other spawn sites (ffmpeg, python, media):+ // it strips macOS Malloc* debug noise but intentionally inherits the rest of+ // the parent env — allowlisted commands like gh/git/npm legitimately need+ // PATH/HOME and their auth tokens.const child = spawn(baseCommand, args, {cwd: workspacePath || process.cwd(),- env: { ...process.env, FORCE_COLOR: '1' },+ env: safeChildProcessEnv({ FORCE_COLOR: '1' }),shell: false,windowsHide: true});