agent-loop-engine
Audited by Socket on Jul 18, 2026
3 alerts found:
Securityx2AnomalyThis module is a synchronous test/execution harness with a high-risk capability: it runs commands via execSync(..., {shell:true}) using a command string that can be provided directly by CLI arguments (and otherwise chosen based on repo markers). If inputs (especially test_command, and potentially ledgerPath in other call contexts) are not fully trusted, it enables command injection and arbitrary code execution with the caller’s privileges. Additionally, it captures and prints/logs stdout/stderr excerpts and derived failure snippets, which can unintentionally disclose secrets present in test logs. No clear standalone malware behavior (e.g., network exfiltration/persistence) is evident in this snippet; the risk is primarily execution-and-leakage within a supply-chain/CI workflow.
This module is security-sensitive because it provides host-level shell command execution via execSync(..., shell:true) using caller-controlled params.test_command (and params.loop_dir in the first tool). While the intended use is running pytest, the lack of allowlisting/validation/escaping for the command string turns it into a command-injection/arbitrary command execution primitive. Additionally, stdout/stderr/error messages are returned to the agent/UI, increasing information disclosure risk. No clear malware/backdoor/persistence behavior is visible in this snippet, but the capability is high impact in untrusted scenarios.
SUSPICIOUS: the core scaffolding behavior is coherent, but the skill references unverified helper skills/components and an unclear global log target. No explicit credential harvesting or malicious payload appears, yet the transitive-install and provenance gaps raise medium trust concerns.