T09 · Insecure Skill Coding Practices
- Location
SKILL.md:3- Finding
Hard-Coded API Credential in Skill Metadata
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill is a coherent third-party image-generation wrapper, but it exposes and handles API credentials in ways that warrant review before installation.
Review this skill before installing. Use only a rotated, limited WuyinKeji API key, avoid sensitive prompts or private reference images, and be aware that the helper sends credentials to the provider and places the key in a polling URL. Consider requiring safer credential handling and result-URL validation before production use.
SKILL.md:3Hard-Coded API Credential in Skill Metadata
scripts/generate.sh:76API Credential Disclosed Through Polling Query String
scripts/generate.sh:44JSON Injection Through Unescaped User-Controlled Values
scripts/generate.sh:87Unvalidated Provider-Controlled Result URL Is Followed and Downloaded
The documentation instructs users to send prompts, reference image URLs, and API credentials to a third-party API but does not clearly warn about that data transfer. Because prompts and reference URLs may contain sensitive personal, proprietary, or regulated content, the lack of disclosure undermines informed consent and can lead to unintended data exposure.
The helper command fetches an untrusted URL directly to disk with redirect following and no host validation. In this skill context, returned image URLs are expected, but the absence of allowlisting or verification makes the download step more dangerous because it bridges trusted automation with untrusted network input.
curl -sL "<RESULT_URL>" -o output.png
Typical resolution: 1672×941 (the API output is fixed at this resolution regardless of the size parameter; use the size parameter mainly for aspect ratio hints).
The helper command fetches an untrusted URL directly to disk with redirect following and no host validation. In this skill context, returned image URLs are expected, but the absence of allowlisting or verification makes the download step more dangerous because it bridges trusted automation with untrusted network input.
curl -sL "<RESULT_URL>" -o output.png
Typical resolution: 1672x941 (the API output is fixed at this resolution regardless of the size parameter; use the size parameter mainly for aspect ratio hints).
The skill documents shell-based behavior and a helper script but does not declare any tool scope or allowed-tools constraints. This increases the chance an agent may invoke shell/network capabilities more broadly than intended, reducing policy enforcement and making misuse or accidental execution easier.
The manifest says to use the skill whenever the user wants image generation and especially when they mention a specific API key or domain, which is an overly broad trigger. Broad activation conditions can cause the skill to engage in contexts where users did not explicitly consent to using this third-party service or exposing related secrets.
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
| Action | Method | URL |
|--------|--------|-----|
| Submit task | POST | `https://api.wuyinkeji.com/api/async/image_gpt` |
| Query result | GET | `https://api.wuyinkeji.com/api/async/detail?id=<task_id>&key=<key>` |
## Authentication
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
| Action | Method | URL |
|--------|--------|-----|
| Submit task | POST | `https://api.wuyinkeji.com/api/async/image_gpt` |
| Query result | GET | `https://api.wuyinkeji.com/api/async/detail?id=<task_id>&key=<key>` |
## Authentication
The POST example shows active external transmission to the WuyinKeji API. While aligned with the skill's purpose, it still creates a real exposure path for prompts, reference URLs, and credentials, especially since the API key is included in multiple places.
curl -s -X POST "https://api.wuyinkeji.com/api/async/image_gpt" \
-H "Content-Type: application/json" \
-H "Authorization: <API_KEY>" \
-d '{
The POST example shows active external transmission to the WuyinKeji API. While aligned with the skill's purpose, it still creates a real exposure path for prompts, reference URLs, and credentials, especially since the API key is included in multiple places.
curl -s -X POST "https://api.wuyinkeji.com/api/async/image_gpt" \
-H "Content-Type: application/json" \
-H "Authorization: <API_KEY>" \
-d '{
The polling request places the API key in the URL query string, which is more easily exposed via logs, browser history, proxies, and monitoring systems than header-based authentication. Even if this matches the vendor API, query-parameter secrets materially increase credential leakage risk.
curl -s "https://api.wuyinkeji.com/api/async/detail?id=<TASK_ID>&key=<API_KEY>"
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
JSON_BODY+="}"
RESPONSE=$(curl -s -X POST "$API_BASE/api/async/image_gpt" \
-H "Content-Type: application/json" \
-H "Authorization: $KEY" \
-d "$JSON_BODY")
The script sends the API key in the URL query string when polling task status (?id=$TASK_ID&key=$KEY). Query parameters are commonly exposed in shell history, process listings, proxy logs, web server logs, monitoring tools, and crash reports, which increases the chance of credential leakage even over HTTPS. In this skill context, handling a real third-party API key is central to the tool, so leaking it is materially dangerous rather than theoretical.