Skip to content

[OpenClaw #4702] Harden Windows binary detection and command execution - #419

Merged
adolago merged 1 commit into
mainfrom
fix/openclaw-4702-issue-344
Feb 14, 2026
Merged

adolago merged 1 commit into
mainfrom
fix/openclaw-4702-issue-344

Conversation

@adolago

@adolago adolago commented Feb 14, 2026

Copy link
Copy Markdown
Owner

Summary

  • update hasBinary checks in skills/hooks config to respect Windows PATHEXT candidates
  • normalize command env values in runCommandWithTimeout by stringifying values and dropping undefined
  • enable shell spawning on Windows in runCommandWithTimeout for command execution parity
  • add regression coverage for env coercion/undefined filtering in process exec tests

Testing

  • cd packages/zee/Swabble && bunx vitest run src/process/exec.test.ts

Fixes #344

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 30ee377078

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

cwd,
env: resolvedEnv,
windowsVerbatimArguments,
shell: process.platform === "win32",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Stop forcing cmd.exe for all Windows subprocesses

runCommandWithTimeout now unconditionally enables shell on Windows, which makes cmd.exe parse every argument instead of passing argv entries through verbatim. That changes behavior for existing call sites that forward user-provided strings (for example, plugins-cli passes raw CLI input into installPluginFromNpmSpec, which executes npm pack <spec>), so metacharacters like ^, &, |, and % are interpreted by the shell rather than treated as data. This regresses prior direct-spawn semantics and can both break valid inputs (e.g. semver range specs) and introduce command-injection risk on Windows.

Useful? React with 👍 / 👎.

@adolago
adolago merged commit 8dcd382 into main Feb 14, 2026
1 of 3 checks passed
@adolago
adolago deleted the fix/openclaw-4702-issue-344 branch February 14, 2026 06:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[OpenClaw #4702] Harden Windows command execution and binary detection parity

1 participant