baoyu-image-gen
Audited by Socket on Jul 13, 2026
2 alerts found:
SecurityAnomalyNo strong evidence of intentional malware/backdoor behavior in this fragment (no exec primitives, persistence, or overt malicious payloads). However, the module has high security-impact capabilities if an attacker can influence args.referenceImages or prediction/output values: it can read arbitrary local files via readFile() and exfiltrate their contents by embedding them as base64 data URLs in requests to Replicate. It also downloads from URLs derived from untrusted prediction output without host/scheme allowlisting, and it allows POST destination control via REPLICATE_BASE_URL. Use only with trusted inputs and enforce path/network allowlists at the integration boundary.
No explicit in-code malware or covert JS behavior is present in this snippet. However, it executes a powerful external `codex` binary with permissive/suspicious flags (`danger-full-access` sandbox and skipping repo checks) and supplies unvalidated, user-controlled instruction text and image references to that tool. It also persists complete stdout/stderr to a temp JSONL file without redaction, which can increase sensitive-data exposure risk. Overall, treat this as a high-impact subprocess execution and data-retention risk area; evaluate trust boundaries for `codex` and `parseEventStream` implementation details and consider adding input validation, output redaction/limits, and stronger isolation if feasible.