Motivation
The QuickJS process pool starts its child with Node's default fork() environment behavior. The child therefore inherits the deployment's complete environment, which may contain connector credentials, database URLs, encryption keys, telemetry secrets, and Node runtime options unrelated to code execution.
Guest JavaScript cannot currently access process.env, so this is defense in depth rather than a demonstrated guest escape. The child process and its dependencies still should not receive ambient deployment secrets they do not need. Executor made the same boundary explicit for spawned stdio MCP servers: UsefulSoftwareCo/executor#1595.
This change does not turn the child into an operating-system sandbox. Admission, credential brokerage, and host-call policy remain the security boundary.
Behavioral requirements
- QuickJS children must receive an explicit minimal environment rather than the parent's environment by default.
- Deployment credentials and unrelated process configuration must not cross the child-process boundary.
- Any environment entry required for supported startup or execution must be documented and deliberately included.
- Source-mode development, built-package execution, process reuse, memory limits, timeouts, and shutdown behavior must remain intact.
Acceptance criteria
- A test places a sentinel secret in the parent environment and proves that the QuickJS child does not receive it.
- Sensitive Node configuration such as
NODE_OPTIONS is not inherited unintentionally.
- Tests identify any environment entries that are required by the supported child contract rather than copying the complete parent environment.
- The Node template, package smoke, and existing QuickJS suites continue to pass.
- The QuickJS documentation describes the child environment as part of the containment boundary without claiming full process isolation.
npm run check passes.
Motivation
The QuickJS process pool starts its child with Node's default
fork()environment behavior. The child therefore inherits the deployment's complete environment, which may contain connector credentials, database URLs, encryption keys, telemetry secrets, and Node runtime options unrelated to code execution.Guest JavaScript cannot currently access
process.env, so this is defense in depth rather than a demonstrated guest escape. The child process and its dependencies still should not receive ambient deployment secrets they do not need. Executor made the same boundary explicit for spawned stdio MCP servers: UsefulSoftwareCo/executor#1595.This change does not turn the child into an operating-system sandbox. Admission, credential brokerage, and host-call policy remain the security boundary.
Behavioral requirements
Acceptance criteria
NODE_OPTIONSis not inherited unintentionally.npm run checkpasses.