Skip to content

security: harden system.run against env injection and shell-wrapper bypass#187

Closed
shanselman wants to merge 106 commits intomasterfrom
feature/voice-mode
Closed

security: harden system.run against env injection and shell-wrapper bypass#187
shanselman wants to merge 106 commits intomasterfrom
feature/voice-mode

Conversation

@shanselman
Copy link
Copy Markdown
Collaborator

Summary

Closes #184.

This complements PR #186 by covering the remaining wrapper-bypass portion as well.

NichUK added 30 commits March 23, 2026 01:34
NichUK and others added 27 commits March 26, 2026 22:30
…lient.cs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…aming provider route kinds"

Reverts CoPilot fix
This reverts commit 78d0a3d.
Move voice-mode test-targeted logic out of the WinUI app and into a dedicated shared project so tray tests no longer need to reference OpenClaw.Tray.WinUI directly.

This restores the original CI assumption that the tray test project can be built on its own without transitively building a Windows App SDK application with an implicit architecture. It also keeps the voice/chat extraction scoped away from the broader OpenClaw.Shared library, which remains general-purpose and non-tray-specific.

The new OpenClaw.Tray.Shared project now contains the shared voice/chat surface used by both the tray app and tray tests, including voice transport helpers, provider catalog loading, cloud TTS support, chat coordination, and the web chat DOM bridge. The WinUI app retains the UI shell pieces, including DispatcherQueueAdapter and the app-level icon path helper.

As a follow-up cleanup during the extraction, split the previous IconHelper into AppIconHelper in the WinUI project and VoiceTrayIconHelper in the shared tray project so the new shared library stays focused on voice-related behavior rather than wider tray infrastructure.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Refactor tray voice code into OpenClaw.Tray.Shared
Cover the pure shared logic in VoiceProviderConfigurationStoreExtensions with focused unit tests for case-insensitive provider lookup, case-insensitive setting lookup, SetValue creation/update behavior, and removal of blank or null values.
Add tests for voice provider configuration helpers
# Conflicts:
#	tests/OpenClaw.Shared.Tests/OpenClawGatewayClientTests.cs
Closes #184 by blocking dangerous environment overrides and by re-evaluating nested shell-wrapper payloads and chained commands against the exec approval policy.

This extends the partial env-only approach discussed in PR #186 so the Windows node closes both vectors called out in the issue.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@shanselman
Copy link
Copy Markdown
Collaborator Author

Opened from the wrong long-lived branch by mistake; superseded by #188 with only the intended #184 security changes.

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.

[Security] system.run: env variable injection and shell wrapper approval bypass

3 participants