T09 · Insecure Skill Coding Practices
- Location
scripts/grok_image_api.py:187- Finding
Bearer Credentials and Sensitive Image Data Can Be Sent to Untrusted or Plaintext Endpoints
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill does what it claims, but its helper script gives remote or misconfigured endpoints too much control over where credentials, images, network requests, and downloaded files go.
Review before installing. Use only a trusted HTTPS API base URL, keep the API key scoped and revocable, avoid sending sensitive images or prompts, prefer `--keep-url` or a controlled output path when appropriate, and be aware that the helper may download and save remote content locally by default.
scripts/grok_image_api.py:187Bearer Credentials and Sensitive Image Data Can Be Sent to Untrusted or Plaintext Endpoints
scripts/grok_image_api.py:138Automatic Download of Server-Controlled URLs Enables SSRF and Resource Exhaustion
Skill contains instructions that could directly expose system prompts, internal rules, or hidden instructions to users or external parties.
def apply_style(prompt: str, style: str | None):
if not style:
return prompt
return f"{prompt}, {STYLE_PRESETS[style]}"
The skill instructs use of environment variables, local file reads/writes, and outbound network access, but it does not declare any tool scope or permission boundaries. This increases the chance an agent can use broader capabilities than the user expects, especially when handling local images and API credentials.
The skill directs users to send prompts and, for edits, local image files and optional masks to a remote API endpoint, but it does not clearly warn that this data leaves the local environment. Users may unknowingly transmit sensitive prompts or images to third-party infrastructure.
The skill says results should be saved locally and defaults to a local output directory, but the top-level description does not warn users that generated or edited images will be stored on disk. This can cause unintended retention of sensitive or private image content on the local machine.
The skill tells users to load API credentials from environment variables but does not explicitly warn that these values are sensitive secrets that must not be exposed in logs, outputs, or prompts. In practice, this can lead to accidental disclosure during debugging or user interaction.
This markdown file applies to SQP-2, and it documents that a helper script will save returned images to a local output directory by default. The notes describe the behavior but do not warn users that files will be written locally or that remote URLs will be fetched and persisted unless --keep-url is used.
The skill downloads remote image content and writes it to a local output path, and also decodes base64 image data and saves it to disk. Although these writes are part of the tool's functionality, there is no confirmation prompt, warning, or explicit user-facing disclosure in the code about where files will be created by default.
No suspicious patterns detected.