agent-builder
Audited by Socket on Aug 23, 2026
1 alert found:
SecurityThis fragment is a high-impact agent tooling layer. The primary security risk is arbitrary command execution via subprocess.run(..., shell=True) with a free-form, unvalidated command string; authorization is only weakly enforced by an environment variable and an interactive prompt that can be bypassed (AGENT_ALLOW_SHELL=1). File read/write/edit primitives are constrained to the current working directory by safe_path, reducing traversal risk, but still allow disclosure and tampering within the workspace. No direct malicious payload is evident in the snippet, but the capability exposure is sufficiently dangerous that it warrants strict access control, command allowlisting (or shell=False with argv), and strong governance of who can invoke these tools.