[GH-ISSUE #4332] Windows staging emits Node DEP0190 child-process shell warning #2347

Closed
opened 2026-10-21 05:47:30 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @thetopham on GitHub (Jul 31, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/4332

Originally assigned to: @SpicyMarinara on GitHub.

Summary

After updating Marinara Engine to the latest staging build on Windows, Node.js 24 emits a DEP0190 warning:

(node:28828) [DEP0190] DeprecationWarning: Passing args to a child process with shell option true can lead to security vulnerabilities, as the arguments are not escaped, only concatenated.
(Use node --trace-deprecation ... to show where the warning was created)

Node.js v24.18.0 was reported. That version is within Marinara Engine's supported >=24 <27 range, so this is a staging code-path warning rather than an unsupported Node installation.

Environment

  • OS: Windows
  • Node.js: v24.18.0
  • Engine channel: staging
  • Latest staging inspected: fcd913930bbb670ad5d66591cb97b74a71d6f615

Likely reproduction

  1. Update a Windows checkout to the latest staging.
  2. Build and start Marinara Engine.
  3. Observe DEP0190 in the console during the update/build or server startup.

A complete --trace-deprecation stack from the reporting machine would still be useful to distinguish the exact observed caller, but the deprecated call shape is confirmed in current staging.

Diagnosis

The newly added build-branch detection runs eagerly while the capability-package catalog URL is initialized:

  • packages/server/src/services/capability-packages/package-manager.service.ts:59
  • packages/server/src/config/build-info.ts:92-96

The Windows path calls:

execFileSync("git", ["branch", "--show-current"], {
  cwd: MONOREPO_ROOT,
  encoding: "utf8",
  shell: process.platform === "win32",
  stdio: ["ignore", "pipe", "ignore"],
});

Passing an argument array together with shell: true is exactly the child-process shape deprecated by Node DEP0190. This startup path was introduced by commit a3abc395e1b5388068382255a8bd6ab0e9bbd4b4.

There are secondary Windows-only instances that may emit the same warning during update/build operations:

  • packages/server/src/routes/updates.routes.ts:534-539
  • packages/client/scripts/build.mjs:11-15
  • scripts/ensure-native-deps.mjs:85-90 and :114-119

Node reference: https://nodejs.org/download/release/latest-v24.x/docs/api/deprecations.html#dep0190-passing-args-to-nodechild_process-execfilespawn-with-shell-option

Impact

  • The warning is non-fatal, but appears alarming to users.
  • The confirmed startup call uses Marinara-controlled literal arguments, so the report is not evidence of exploitation.
  • The deprecated pattern should still be removed because shell arguments are concatenated without escaping and future Node versions may tighten this behavior.

Suggested scope

Keep this as a focused Windows child-process compatibility bugfix:

  • Invoke git.exe directly without a shell for build commit/branch detection.
  • Replace shell-backed pnpm/client build calls with shell-free Windows-safe executable or JavaScript entrypoint invocation.
  • Audit the remaining shell: process.platform === "win32" sites for argument provenance rather than merely suppressing the warning.

Acceptance criteria

  • Starting a Windows staging checkout with supported Node 24 does not emit DEP0190.
  • Staging branch detection still selects the Marinara-Agents staging catalog.
  • Browser-driven staging update and client build remain functional on Windows without DEP0190.
  • Linux/macOS behavior remains unchanged.
Originally created by @thetopham on GitHub (Jul 31, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/4332 Originally assigned to: @SpicyMarinara on GitHub. ## Summary After updating Marinara Engine to the latest `staging` build on Windows, Node.js 24 emits a DEP0190 warning: ```text (node:28828) [DEP0190] DeprecationWarning: Passing args to a child process with shell option true can lead to security vulnerabilities, as the arguments are not escaped, only concatenated. (Use node --trace-deprecation ... to show where the warning was created) ``` Node.js v24.18.0 was reported. That version is within Marinara Engine's supported `>=24 <27` range, so this is a staging code-path warning rather than an unsupported Node installation. ## Environment - OS: Windows - Node.js: v24.18.0 - Engine channel: `staging` - Latest staging inspected: `fcd913930bbb670ad5d66591cb97b74a71d6f615` ## Likely reproduction 1. Update a Windows checkout to the latest `staging`. 2. Build and start Marinara Engine. 3. Observe DEP0190 in the console during the update/build or server startup. A complete `--trace-deprecation` stack from the reporting machine would still be useful to distinguish the exact observed caller, but the deprecated call shape is confirmed in current staging. ## Diagnosis The newly added build-branch detection runs eagerly while the capability-package catalog URL is initialized: - `packages/server/src/services/capability-packages/package-manager.service.ts:59` - `packages/server/src/config/build-info.ts:92-96` The Windows path calls: ```ts execFileSync("git", ["branch", "--show-current"], { cwd: MONOREPO_ROOT, encoding: "utf8", shell: process.platform === "win32", stdio: ["ignore", "pipe", "ignore"], }); ``` Passing an argument array together with `shell: true` is exactly the child-process shape deprecated by Node DEP0190. This startup path was introduced by commit `a3abc395e1b5388068382255a8bd6ab0e9bbd4b4`. There are secondary Windows-only instances that may emit the same warning during update/build operations: - `packages/server/src/routes/updates.routes.ts:534-539` - `packages/client/scripts/build.mjs:11-15` - `scripts/ensure-native-deps.mjs:85-90` and `:114-119` Node reference: https://nodejs.org/download/release/latest-v24.x/docs/api/deprecations.html#dep0190-passing-args-to-nodechild_process-execfilespawn-with-shell-option ## Impact - The warning is non-fatal, but appears alarming to users. - The confirmed startup call uses Marinara-controlled literal arguments, so the report is not evidence of exploitation. - The deprecated pattern should still be removed because shell arguments are concatenated without escaping and future Node versions may tighten this behavior. ## Suggested scope Keep this as a focused Windows child-process compatibility bugfix: - Invoke `git.exe` directly without a shell for build commit/branch detection. - Replace shell-backed pnpm/client build calls with shell-free Windows-safe executable or JavaScript entrypoint invocation. - Audit the remaining `shell: process.platform === "win32"` sites for argument provenance rather than merely suppressing the warning. ## Acceptance criteria - Starting a Windows staging checkout with supported Node 24 does not emit DEP0190. - Staging branch detection still selects the Marinara-Agents staging catalog. - Browser-driven staging update and client build remain functional on Windows without DEP0190. - Linux/macOS behavior remains unchanged.
bsakaguchi 2026-10-21 05:47:30 +07:00
Author
Owner

@SpicyMarinara commented on GitHub (Jul 31, 2026):

Implementation is in progress by @SpicyMarinara with Codex in draft PR #4340. This issue is part of the current focused staging sweep; existing code paths will be reused and kept narrow.

<!-- gh-comment-id:5141427727 --> @SpicyMarinara commented on GitHub (Jul 31, 2026): Implementation is in progress by @SpicyMarinara with Codex in draft PR #4340. This issue is part of the current focused staging sweep; existing code paths will be reused and kept narrow.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Engine#2347
No description provided.