fix(security): harden ExecTool defaults against command injection (#506) (#507)
* fix(security): harden ExecTool defaults against command injection (#506) - Default restrict_to_workspace to True (was False), confining commands to the working directory unless explicitly opted out - Add deny patterns for network exfiltration (curl, wget, nc, ssh, scp, rsync, ftp, socat) - Add deny patterns for script interpreter exfiltration (python -c, perl -e, ruby -e) - Add deny patterns for sensitive file access (/etc/passwd, /etc/shadow, /etc/sudoers) and privilege escalation (useradd, usermod, crontab, chmod world-writable) - Add comprehensive test suite (32 tests) covering deny patterns, workspace restriction, and command execution * fix(tests): use pytest.mark.asyncio for Python 3.14 compatibility asyncio.get_event_loop() raises RuntimeError in Python 3.14 when no event loop is running. Switch to pytest-asyncio's async test decorator which is already a project dependency.
K
Kagura committed
c90fae56091f3d9bdb2c5356c042e9775095cb83
Parent: 1218236
Committed by GitHub <noreply@github.com>
on 5/27/2026, 12:21:48 PM