spawn/sh
A a29d0d8a15
Some checks are pending
Lint / ShellCheck (push) Waiting to run
Lint / Biome Lint (push) Waiting to run
Lint / macOS Compatibility (push) Waiting to run
fix(security): replace variable-stored shell code with named function in verify.sh (#3073)
Fixes #3070

The port_check / port_check_r variables stored executable shell code as
strings and expanded them via ${port_check} inside cloud_exec commands.
This is an eval-equivalent pattern: if any part of the variable were ever
derived from dynamic input, it would be directly exploitable as command
injection.

Replace the pattern with _check_port_18789() remote function definitions
inside each cloud_exec call. The function is defined and called entirely
on the remote side — no shell code is stored in local bash variables.

Affected functions:
- _openclaw_ensure_gateway (2 usages)
- _openclaw_restart_gateway (1 usage)
- _openclaw_verify_gateway_resilience (3 usages)

Agent: security-auditor

Co-authored-by: B <6723574+louisgv@users.noreply.github.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-28 11:25:00 +07:00
..
aws feat: add Cursor CLI agent across all clouds (#3018) 2026-03-26 13:53:49 -07:00
cli fix(security): use grep -F for literal string matching in PATH checks (#3021) 2026-03-27 02:56:07 +07:00
digitalocean feat: add Cursor CLI agent across all clouds (#3018) 2026-03-26 13:53:49 -07:00
docker ci: add cursor agent to Docker image pipeline (#3051) 2026-03-27 13:41:27 +07:00
e2e fix(security): replace variable-stored shell code with named function in verify.sh (#3073) 2026-03-28 11:25:00 +07:00
gcp feat: add Cursor CLI agent across all clouds (#3018) 2026-03-26 13:53:49 -07:00
hetzner feat: add Cursor CLI agent across all clouds (#3018) 2026-03-26 13:53:49 -07:00
local feat: add Cursor CLI agent across all clouds (#3018) 2026-03-26 13:53:49 -07:00
shared fix(github-auth): add sudo availability check before use (#3072) 2026-03-28 08:39:22 +07:00
sprite feat: add Cursor CLI agent across all clouds (#3018) 2026-03-26 13:53:49 -07:00
test fix(e2e): correct stale test expectation for hermes timeout fallback (#3044) 2026-03-26 19:02:23 -07:00