T09 · Insecure Skill Coding Practices
- Location
scripts/aigc_textgen.py:73- Finding
Unrestricted Gateway Override Can Exfiltrate API Credentials and User Content
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill is mostly coherent for LinkFox text generation, but it needs review because a configurable gateway can receive the API key, user prompts, media URLs, and session metadata without destination validation.
Review this skill before installing in environments with sensitive prompts, private media URLs, or production LinkFox keys. Only run it when LINKFOX_TOOL_GATEWAY is unset or explicitly points to a trusted HTTPS LinkFox gateway, avoid submitting secrets or confidential media unless you accept remote processing, and be aware it may save large outputs locally and chain into other AIGC skills for image/video workflows.
scripts/aigc_textgen.py:73Unrestricted Gateway Override Can Exfiltrate API Credentials and User Content
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.
req = _lf_Request(url, headers={"User-Agent": "LinkFox-Skill/2.0"})
try:
with _lf_urlopen(req, timeout=timeout) as resp:
if guessed_ext == "bin":
ct = resp.headers.get("Content-Type", "")
if "mp4" in ct:
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.
}
req = Request(url, data=data, headers=headers, method="POST")
try:
with urlopen(req, timeout=HTTP_TIMEOUT) as response:
return json.loads(response.read().decode("utf-8"))
except HTTPError as e:
body = e.read().decode("utf-8") if e.fp else ""
The skill clearly documents execution of local Python scripts, polling remote endpoints, use of stdin/stdout, savedPath file output, and chaining into other skills, but it declares no explicit tool scope or permissions. That mismatch increases the risk that an agent can invoke network and file-capable behaviors without transparent consent boundaries or least-privilege controls.
The trigger phrases include very common requests like '帮我写一段', 'AI写作', 'text generation', and '图片识别', which can match ordinary conversations and cause the skill to activate unexpectedly. In this skill, accidental activation is more dangerous because activation can send user text and media URLs to remote APIs and may initiate chained downstream calls to other AIGC skills.
The skill instructs users to provide prompts and media URLs and describes remote asynchronous API calls, but it does not warn that user text, images, and videos will be transmitted to external model services. This creates a privacy and data-handling risk, especially because users may provide sensitive media or proprietary text without understanding that it leaves the local agent context.
The API documentation shows that prompts, media URLs, and optional member IDs are sent to remote services, but it does not indicate any requirement to notify users, obtain consent, or minimize sensitive data before transmission. In a text/image/video analysis skill, user inputs may contain personal, confidential, or regulated content, so silent external transmission creates a real privacy and compliance risk.
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
| 10009 | 任务不存在 | 检查 taskId 是否正确 |
| 其他 | 业务异常 | 参考 errmsg 字段 |
# 1. 创建任务