baoyu-compress-image
Fail
Audited by Gen Agent Trust Hub on Feb 16, 2026
Risk Level: HIGHEXTERNAL_DOWNLOADSREMOTE_CODE_EXECUTIONCOMMAND_EXECUTIONPROMPT_INJECTION
Full Analysis
- Indirect Prompt Injection (HIGH): The skill processes file paths derived from potentially untrusted inputs and possesses the capability to delete or overwrite files, creating a significant attack surface for data loss or file manipulation.
- Ingestion points: The
<input>CLI argument and--outputoption inscripts/main.ts(handled viaprocess.argv). - Boundary markers: None identified.
- Capability inventory:
unlinkSync(file deletion),renameSync(file overwrite), and execution of external binaries (sips,cwebp,convert) viaspawnacrossscripts/main.ts. - Sanitization: The script uses
path.resolve()and checks for a list ofSUPPORTED_EXTS. It usesspawnwith argument arrays to prevent shell-based command injection. - Unverifiable Dependencies & Remote Code Execution (MEDIUM): The script dynamically imports the
sharplibrary (await import("sharp")) and the documentation suggests usingnpxto execute the script withbun. The absence of apackage.jsonor lockfile means these dependencies are not pinned to specific versions, posing a risk of executing unverified code if fetched at runtime. - Command Execution (LOW): The skill executes external system binaries (
sips,cwebp,convert). While the usage ofspawnwith argument arrays is a secure implementation pattern, the tool is inherently dependent on the presence and security of these third-party utilities. - Data Exposure & Exfiltration (LOW): The skill defaults to deleting the original input file after successful compression (
!opts.keep). While this is a documented feature for optimizing storage, it is a destructive operation that increases the impact of accidental or malicious misdirection by the AI agent.
Recommendations
- AI detected serious security threats
Audit Metadata