mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-03 21:31:26 +00:00
fix(windows): reject unresolved cmd wrappers (#58436)
* fix(windows): reject unresolved cmd wrappers * fix(windows): add wrapper policy coverage * fix(windows): document wrapper fallback migration * fix(windows): drop changelog entry from pr * chore: add changelog for Windows wrapper fail-closed behavior --------- Co-authored-by: Devin Robison <drobison@nvidia.com> Co-authored-by: Devin Robison <drobison00@users.noreply.github.com>
This commit is contained in:
@@ -49,6 +49,29 @@ is a small, self-contained module with a clear purpose and documented contract.
|
||||
## How to migrate
|
||||
|
||||
<Steps>
|
||||
<Step title="Audit Windows wrapper fallback behavior">
|
||||
If your plugin uses `openclaw/plugin-sdk/windows-spawn`, unresolved Windows
|
||||
`.cmd`/`.bat` wrappers now fail closed unless you explicitly pass
|
||||
`allowShellFallback: true`.
|
||||
|
||||
```typescript
|
||||
// Before
|
||||
const program = applyWindowsSpawnProgramPolicy({ candidate });
|
||||
|
||||
// After
|
||||
const program = applyWindowsSpawnProgramPolicy({
|
||||
candidate,
|
||||
// Only set this for trusted compatibility callers that intentionally
|
||||
// accept shell-mediated fallback.
|
||||
allowShellFallback: true,
|
||||
});
|
||||
```
|
||||
|
||||
If your caller does not intentionally rely on shell fallback, do not set
|
||||
`allowShellFallback` and handle the thrown error instead.
|
||||
|
||||
</Step>
|
||||
|
||||
<Step title="Find deprecated imports">
|
||||
Search your plugin for imports from either deprecated surface:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user