coding-agent-patterns
Audited by Socket on Sep 17, 2026
2 alerts found:
Anomalyx2The code is primarily illustrative agent-configuration and memory-management code, not apparent malware. It contains meaningful security risks if exposed to untrusted project content or user-controlled parameters: plaintext persistence of potentially sensitive data, prompt injection through learned memory, insufficient path validation in SkillLoader.load, and weak command-hook filtering. No direct evidence of data exfiltration, credential theft, destructive behavior, or unauthorized remote control is present in this fragment. Input validation, canonical path containment checks, strict tool-permission enforcement, bounded and protected memory storage, and explicit trust separation for prompt content are recommended.
The fragment is defensive tooling code, not apparent malware. It contains no evident unauthorized data collection, exfiltration, persistence, or destructive behavior. Its principal security concern is that shell=True and a regex blacklist create an unsafe command-execution boundary, especially when dangerous-tool auto-approval is enabled. The protections should be treated as incomplete unless commands are executed without a shell, approval is enforced by default, hooks are consistently applied, and sandbox enforcement is validated on the target platform.