* security: sanitize user input in execInContainer
This change implements command injection protection for the 'vm exec' command
by adding a command whitelist and robust shell argument escaping.
Changes:
- Added `escapeShellArg` utility in `pkg/container/linuxkit.go` to safely quote
arguments for the remote shell.
- Updated `LinuxKitManager.Exec` to escape all command arguments before
passing them to SSH.
- Implemented `allowedExecCommands` whitelist in `internal/cmd/vm/cmd_container.go`.
- Added i18n support for new security-related error messages.
- Added unit tests for escaping logic and whitelist validation.
Fixes findings from OWASP Top 10 Security Audit (PR #205).
* security: sanitize user input in execInContainer
This change implements command injection protection for the 'vm exec' command
by adding a command whitelist and robust shell argument escaping.
Changes:
- Added `escapeShellArg` utility in `pkg/container/linuxkit.go` to safely quote
arguments for the remote shell.
- Updated `LinuxKitManager.Exec` to escape all command arguments before
passing them to SSH.
- Implemented `allowedExecCommands` whitelist in `internal/cmd/vm/cmd_container.go`.
- Added i18n support for new security-related error messages.
- Added unit tests for escaping logic and whitelist validation.
- Fixed minor formatting issue in `pkg/io/local/client.go`.
Fixes findings from OWASP Top 10 Security Audit (PR #205).
* security: sanitize user input in execInContainer
This change implements command injection protection for the 'vm exec' command
by adding a command whitelist and robust shell argument escaping.
Changes:
- Added `escapeShellArg` utility in `pkg/container/linuxkit.go` to safely quote
arguments for the remote shell (mitigates SSH command injection).
- Updated `LinuxKitManager.Exec` to escape all command arguments.
- Implemented `allowedExecCommands` whitelist in `internal/cmd/vm/cmd_container.go`.
- Added i18n support for new security-related error messages in `en_GB.json`.
- Added unit tests for escaping logic and whitelist validation.
- Fixed a minor pre-existing formatting issue in `pkg/io/local/client.go`.
Note: The 'merge / auto-merge' CI failure was identified as an external
reusable workflow issue (missing repository context for the 'gh' CLI), and
has been left unchanged to maintain PR scope and security policies.
Fixes findings from OWASP Top 10 Security Audit (PR #205).