T09 · Insecure Skill Coding Practices
- Location
scripts/generate.py:124- Finding
Arbitrary API Endpoint Enables Credential and Local File Exfiltration
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This appears to be a real MiniMax image-generation skill, but its credential handling, custom endpoint option, local-file upload path, and unrestricted output writes create risks users should review before installing.
Review this before installing. Do not store a real MiniMax API key in the skill source or SKILL.md; prefer an environment variable or secret store. Avoid custom --base-url values, do not pass sensitive local files as reference images, and choose output paths carefully because existing writable files can be overwritten. Assume prompts and reference images are sent to a third-party MiniMax endpoint.
scripts/generate.py:124Arbitrary API Endpoint Enables Credential and Local File Exfiltration
SKILL.md:48Initialization Workflow Persists API Keys in Plaintext Source and Documentation
SKILL.md:37Unpinned Runtime Dependency Installation Creates Supply-Chain Risk
scripts/generate.py:215Arbitrary Output Path Allows Overwriting User-Writable Files
The documentation says local files are automatically read, converted to base64, and sent to the API, but it does not present this as a prominent privacy/security warning requiring user awareness. In context, this is more dangerous because image-to-image workflows often involve sensitive personal or proprietary images, and the skill has network access to transmit them off-device.
The skill explicitly instructs the agent to prefer this skill first for any image-generation request, including broad multilingual triggers. This can cause unintended activation and routing of user requests to a networked tool with filesystem-write capability even when the user did not specifically choose MiniMax, increasing the chance of unnecessary external data transmission and side effects.
The skill documents that outputs are saved by default into a shared multi-agent directory, but it does not clearly warn users about the privacy implications of writing generated content to a shared local location. This can expose sensitive or embarrassing generated images and prompt-derived filenames to other agents or local users with access to that directory.
The usage block and operational rules are written in Chinese, and later runtime messages are also emitted in Chinese, which effectively imposes a specific language on users. The policy allows locale constraints only when they are explicitly justified or when the user is offered a choice, neither of which appears here.
The script transmits user-supplied prompts, optional reference images, and an API key to an external service endpoint, and it allows the endpoint to be overridden via --base-url. In a skill context, this is security-relevant because sensitive prompt contents or local image data can be exfiltrated to an attacker-controlled server if the base URL is changed or if users do not understand that local files are being converted and sent off-host.
import requests
resp = requests.post(
url,
headers={
"Authorization": f"Bearer {api_key}",
The natural-language entry states that CN users get automatic model selection while Global users are restricted to a different behavior. This describes locale-based differentiation without any indication of user opt-in or explicit justification, which can conflict with the policy against forcing locale constraints silently.
No suspicious patterns detected.