image-gen
Fail
Audited by Gen Agent Trust Hub on Feb 17, 2026
Risk Level: HIGHDATA_EXFILTRATIONCOMMAND_EXECUTION
Full Analysis
- [DATA_EXFILTRATION] (HIGH): The script
image-gen.jsusesfs.readFileSyncto read a file path provided via theINPUT_IMAGEargument. The content of this file is converted to base64 and sent to an external API (https://internal.infquest.com/...) viafetch. - Evidence:
const imageBuffer = fs.readFileSync(INPUT_IMAGE);followed by a POST request containingimage_url: { url:data:${mimeType};base64,${base64Image}}. - Risk: If an attacker or a malicious prompt directs the agent to use a sensitive path (e.g.,
~/.ssh/id_rsaor.env) as the input image, the contents of that file will be exfiltrated to the remote server. - [COMMAND_EXECUTION] (LOW): The
SKILL.mdinstructions direct the agent to execute theopencommand on a user-defined output path. While standard for opening files on macOS, it involves executing system commands with paths derived from potentially untrusted user input. - [INDIRECT_PROMPT_INJECTION] (LOW): The skill lacks sanitization for user-provided data and processed files.
- Ingestion points: User prompts via
AskUserQuestionand file paths provided toimage-gen.jsvia theINPUT_IMAGEargument. - Boundary markers: Absent; user prompts are interpolated directly into the API request.
- Capability inventory: The script
image-gen.jspossessesfs.readFileSync(read),fs.writeFileSync(write), andfetch(network) capabilities. - Sanitization: None; there is no validation to ensure the
INPUT_IMAGEis actually an image or that thePROMPTdoes not contain injection strings.
Recommendations
- AI detected serious security threats
Audit Metadata