baoyu-image-gen

Warn

Audited by Socket on Sep 9, 2026

3 alerts found:

SecurityAnomalyx2
SecurityMEDIUM
scripts/codex-imagegen/spawn.ts

This module itself does not implement classic JS malware primitives (no eval/Function, no direct network calls, no credential theft logic visible in the snippet). However, it orchestrates execution of an external `codex` CLI with explicitly permissive/unsafe sandbox settings (`--sandbox danger-full-access`) and weakened safety checks (`--skip-git-repo-check`). It passes fully caller-controlled instruction content via stdin and caller-controlled `--image` arguments via the command line, then persists the child’s raw stdout/stderr to disk and parses stdout. In any threat model where `input.instruction` or environment/PATH cannot be strictly trusted, this design creates a high-impact security risk because it enables powerful behavior inside the spawned tool rather than constraining or validating inputs at this layer.

Confidence: 60%Severity: 78%
AnomalyLOW
scripts/providers/openai.ts

This module primarily acts as an OpenAI image client. No clear malware/backdoor behavior is present in the fragment. However, it introduces meaningful security risks typical for image-generation tooling: (1) potential arbitrary local file read/upload via `args.referenceImages` -> `readFile(refPath)` -> edits request, (2) potential SSRF/egress-control risk via `fetch(img.url)` using a URL returned by the API response, and (3) environment-controlled outbound destination (`OPENAI_BASE_URL`) which could leak the bearer token if misconfigured. If upstream code strictly validates `referenceImages` to an allowlisted directory and restricts/normalizes returned URLs (or relies on trusted vendor guarantees), overall risk would be lower; otherwise, it warrants security review and hardening.

Confidence: 66%Severity: 56%
AnomalyLOW
scripts/providers/openrouter.ts

This module appears intended for legitimate image-generation orchestration, not for malware. However, it contains meaningful security risks in common deployment scenarios: it performs unrestricted local file reads based on CLI-provided reference image paths, and it may issue outbound fetch requests to arbitrary http/https URLs found in the OpenRouter response without host allowlisting. If attackers can influence reference image paths or the response contents/URLs, the risk can rise to local file disclosure and SSRF-like network access.

Confidence: 72%Severity: 62%
Audit Metadata
Analyzed At
Sep 9, 2026, 07:48 AM
Package URL
pkg:socket/skills-sh/full-aigc-skills%2Fbaoyu-skills%2Fbaoyu-image-gen%2F@349dec081be100ed8e4a7d6445480ff6ac74d6eb9c7189c6c37387bde8c375f7
Security Audit — socket — baoyu-image-gen