wails/v3/internal/setupwizard
Lea Anthony 330bc4e3de fix(security): prevent command injection in setup wizard
The handleInstallDependency endpoint was vulnerable to command injection
attacks. User-provided commands were split and executed directly without
validation, allowing attackers to run arbitrary commands.

Changes:
- Add whitelist of allowed commands (package managers only)
- Validate commands against whitelist before execution
- Handle privilege escalation commands (sudo/pkexec/doas) by also
  validating the elevated command
- Reject any command not in the whitelist with a clear error message

The whitelist includes common package managers across platforms:
- Linux: apt, dnf, pacman, zypper, emerge, eopkg, nix-env
- macOS: brew, port
- Windows: winget, choco, scoop

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-22 06:05:55 +11:00
..
frontend feat(setup): add global defaults, light/dark mode, and UI improvements 2025-12-07 17:40:53 +11:00
defaults.go feat(setup): add global defaults, light/dark mode, and UI improvements 2025-12-07 17:40:53 +11:00
wizard.go fix(security): prevent command injection in setup wizard 2026-01-22 06:05:55 +11:00
wizard_darwin.go feat(setup): Preserve existing setup wizard design 2025-12-06 17:02:35 +11:00
wizard_linux.go feat(setup): improve dependency UX with retry button and loading animations 2025-12-07 10:30:44 +11:00
wizard_windows.go feat(setup): Preserve existing setup wizard design 2025-12-06 17:02:35 +11:00