spawn/sh
A a9cd3b700c
security: escape pkill regex metacharacters in app_name (#2412)
* security: escape pkill regex metacharacters in app_name

Fixes #2409 - escape regex metacharacters (., [, \, *, ^, $) in
app_name before using in pkill -f pattern to prevent unintended
process termination. Even though app_name is validated against a
safe character whitelist, . and - are regex metacharacters that
could match broader patterns than intended.

Note: #2410 (unquoted regex in bash conditional) was already fixed
by a prior commit that refactored the code to use sed instead of
[[ =~ BASH_REMATCH ]].

Agent: security-auditor
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>

* fix: remove dead exec_long functions reintroduced from pre-#2407 code

Remove cloud_exec_long dispatcher and all _*_exec_long() functions
from common.sh and cloud driver files (aws, digitalocean, gcp,
hetzner, sprite). These were explicitly removed as dead code in
PR #2407 (commit c4ae1684) and must not be reintroduced.

Issue #2410 (unquoted regex in bash conditional) is already resolved:
the [[ =~ ]] pattern was previously replaced with case/sed parsing.

Fixes #2409
Fixes #2410

Agent: pr-maintainer
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>

---------

Co-authored-by: B <6723574+louisgv@users.noreply.github.com>
Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-03-09 21:23:33 -07:00
..
aws fix: pin bun install to v1.3.9 in all agent scripts (#2345) 2026-03-08 12:47:18 -04:00
cli security: verify symlink targets before overwrite in install.sh (#2404) 2026-03-09 18:37:58 -07:00
digitalocean fix: pin bun install to v1.3.9 in all agent scripts (#2345) 2026-03-08 12:47:18 -04:00
docker fix: pin bun install to v1.3.9 in all agent scripts (#2345) 2026-03-08 12:47:18 -04:00
e2e security: escape pkill regex metacharacters in app_name (#2412) 2026-03-09 21:23:33 -07:00
gcp fix: pin bun install to v1.3.9 in all agent scripts (#2345) 2026-03-08 12:47:18 -04:00
hetzner fix: pin bun install to v1.3.9 in all agent scripts (#2345) 2026-03-08 12:47:18 -04:00
local fix: pin bun install to v1.3.9 in all agent scripts (#2345) 2026-03-08 12:47:18 -04:00
shared fix(security): fail on chmod error in github-auth.sh token persistence (#2375) 2026-03-09 08:18:07 -04:00
sprite fix: pin bun install to v1.3.9 in all agent scripts (#2345) 2026-03-08 12:47:18 -04:00
test refactor: Remove dead code and stale references (#2062) 2026-03-01 11:45:24 -05:00