T09 · Insecure Skill Coding Practices
- Location
index.js:88- Finding
Alternative Provider Credential Is Transmitted to the MiniMax Endpoint
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This image-generation skill mostly matches its stated purpose, but it can send an AIMLAPI credential to the MiniMax endpoint and logs full prompts in plaintext.
Review before installing. Use only a MiniMax-specific API key, avoid configuring AIMLAPI_API_KEY for this skill unless the provider routing is fixed, and do not include sensitive or confidential details in prompts because prompts are sent to MiniMax and also written to runtime logs. Prefer a version that removes plaintext prompt logging, binds each credential to its own endpoint, and refreshes dependencies from a trusted registry.
index.js:88Alternative Provider Credential Is Transmitted to the MiniMax Endpoint
index.js:108User Prompts Are Written to Runtime Logs in Plaintext
package-lock.json:17Locked Dependencies Are Retrieved from a Third-Party Package Mirror
Skill contains instructions that could directly expose system prompts, internal rules, or hidden instructions to users or external parties.
// If prompt is already in English, just add quality keywords
if (/^[a-zA-Z0-9\s,]+$/.test(prompt)) {
return prompt + ', ' + qualityKeywords;
}
// Map common Chinese subjects to English
Skill contains instructions that could directly expose system prompts, internal rules, or hidden instructions to users or external parties.
// If prompt is already in English, just add quality keywords
if (/^[a-zA-Z0-9\s,]+$/.test(prompt)) {
return prompt + ', ' + qualityKeywords;
}
// Map common Chinese subjects to English
The lockfile pins axios 1.13.6, which the scanner reports as having multiple known advisories including SSRF/proxy-bypass and prototype-pollution-related attack paths. In an image-generation skill that likely makes outbound API requests using user-influenced prompts and possibly remote URLs, a vulnerable HTTP client increases risk of request misrouting, credential leakage, or unsafe redirect/proxy handling.
form-data 4.0.5 is reported as vulnerable to CRLF injection via unescaped multipart field names/filenames. If the skill uploads user-controlled files or constructs multipart requests from user input, this could let an attacker manipulate request boundaries or inject unintended headers/content into outbound requests.
The package explicitly depends on axios 1.13.6, which the finding indicates is affected by multiple published advisories, including SSRF/proxy-bypass and prototype-pollution-related issues. For an image-generation skill that likely makes outbound API requests and may process user-influenced URLs, headers, or proxy settings, a vulnerable HTTP client increases the risk of request tampering, credential leakage, SSRF, or response hijacking.
The skill declares access to environment-backed secrets via required API keys but does not define an explicit tool scope or permission boundary. This creates ambiguity about what runtime capabilities the skill needs and can lead to overbroad execution contexts where secrets are accessible without clear user or platform control.
The description uses broad trigger phrases such as general requests to generate pictures or draw, which increases the chance of accidental or overly eager invocation. In an agent setting, broad activation is risky because it can cause unintentional transmission of user prompts to an external service without sufficiently explicit user intent.
The skill sends user prompts to an external API but does not provide a clear user-facing warning in the description or usage notes. Users may supply sensitive, proprietary, or personal information assuming local handling, creating privacy and data-governance risk when that content is transmitted off-platform.
The skill automatically rewrites prompts into English without user opt-in or justification, which can alter meaning, remove safety qualifiers, or transform sensitive content before external transmission. This is especially risky for creative or safety-sensitive prompts because silent prompt mutation reduces user control and auditability.
The skill explicitly transmits user-supplied content to a third-party endpoint, which is a real data egress path. In the context of a general-purpose image tool with broad invocation phrases and no prominent warning, this external transmission meaningfully increases privacy, compliance, and inadvertent disclosure risk.
## API
- Endpoint: `https://api.minimaxi.com/v1/image_generation`
- Model: `image-01`
- Aspect Ratio: 16:9 (default)
The code is explicitly built around Chinese-only prompt stripping patterns and later returns Chinese-only user-facing messages. This creates a language/locale constraint without any opt-in or documented justification, which matches the policy category for forced language behavior.
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
return { text: "❌ 未找到 API Key,请设置 MINIMAX_API_KEY 或 AIMLAPI_API_KEY 环境变量。" };
}
const API_URL = "https://api.minimaxi.com/v1/image_generation";
// Get user input
let userInput = context.args.join(' ').trim();
The skill sends user-supplied prompt content to a third-party API without any explicit user-facing disclosure or consent flow. If users include sensitive personal, proprietary, or regulated information in prompts, that data is transmitted externally and may be logged, retained, or processed by the provider.
The manifest frames this skill as generating images and optimizing prompts, but the code also directly accesses process environment variables to retrieve credentials. While needed for implementation, credential access is a capability not stated in the skill purpose and can be context-inappropriate when the manifest does not declare it.
follow-redirects 1.15.11 is flagged for leaking custom authentication headers across cross-domain redirects. If this skill sends authenticated requests to the MiniMax API, an attacker able to trigger or influence redirects could cause API keys or bearer tokens to be forwarded to an unintended host.
The dependency is specified with a caret range, which allows automatic installation of newer minor/patch versions without a lock to an exact reviewed release. In a security-sensitive agent skill, this weakens supply-chain integrity and can unexpectedly pull in vulnerable or behavior-changing code during install or rebuilds.
"author": "",
"license": "ISC",
"dependencies": {
"axios": "^1.13.6"
}
}