apimart-image-gen

Warn

Audited by Gen Agent Trust Hub on Jun 18, 2026

Risk Level: MEDIUMDATA_EXFILTRATIONEXTERNAL_DOWNLOADS
Full Analysis
  • [DATA_EXFILTRATION]: The Python script scripts/apimart_image_gen.py contains functionality to read local files provided via the --image-file command-line argument. The local_file_to_data_uri function reads the full content of the file and encodes it in base64 to be sent via a POST request to https://api.apimart.ai/v1/images/generations. This could be leveraged to exfiltrate sensitive files (e.g., SSH keys, AWS credentials) if the agent is instructed to use them as reference images.
  • [EXTERNAL_DOWNLOADS]: The skill script includes a download_images function that performs GET requests to URLs provided in the APIMart API response. It saves the retrieved data directly to the local filesystem in a user-specified output directory. This allows for the download of arbitrary content if the remote API provides a malicious URL.
  • [INDIRECT_PROMPT_INJECTION]: The skill is susceptible to indirect prompt injection through the processing of untrusted API responses.
  • Ingestion points: API responses from api.apimart.ai processed in scripts/apimart_image_gen.py.
  • Boundary markers: None detected; the script assumes the structure and content of the API response are safe.
  • Capability inventory: File system read (Path.read_bytes), file system write (Path.write_bytes), and network operations (request.urlopen).
  • Sanitization: The script performs basic JSON parsing but does not validate the reputation or safety of the URLs returned for image downloads.
Audit Metadata
Risk Level
MEDIUM
Analyzed
Jun 18, 2026, 07:34 AM
Security Audit — agent-trust-hub — apimart-image-gen