T09 · Insecure Skill Coding Practices
- Location
scripts/llm-proxy.py:371- Finding
Streaming safety filter output is discarded
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This LLM proxy mostly matches its stated purpose, but its control script can kill unrelated local processes and its advertised safety filtering has bypasses, so it should be reviewed before installation.
Install only if you are comfortable running a local LLM traffic proxy that forwards prompts and API credentials to configured providers. Keep it bound to 127.0.0.1, avoid running the control script as root, inspect the configured port before using start/stop, and do not rely on its safety filter as a security boundary until the PID handling, port-kill behavior, streaming filtering, whitelist logic, and thread limiting are fixed.
scripts/llm-proxy.py:371Streaming safety filter output is discarded
scripts/llm-proxy.py:141Global whitelist match bypasses all content-filtering rules
scripts/llm-proxy-ctl.sh:43Controller force-kills every process using the configured port
scripts/llm-proxy-ctl.sh:11Predictable and unvalidated PID file permits arbitrary same-user process termination
scripts/llm-proxy.py:274Configured maximum thread count is not enforced
Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.
start() {
# 检查是否已在运行
if curl -s --max-time 3 "$PROXY_URL" > /dev/null 2>&1; then
echo "✅ 代理已在运行"
curl -s "$PROXY_URL" | python3 -m json.tool
return 0
Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.
echo "✅ 代理 PID: $(cat "$PID_FILE")"
sleep 3
if curl -s --max-time 5 "$PROXY_URL" > /dev/null 2>&1; then
echo "✅ 健康检查通过"
curl -s "$PROXY_URL" | python3 -m json.tool
else
Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).
# 清理临时文件
rm -f "$PID_FILE"
rm -f /tmp/llm-proxy-wrapper.sh
echo "✅ 已完全停止"
}
Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.
}
status() {
if curl -s --max-time 2 "$PROXY_URL" > /dev/null 2>&1; then
echo "✅ 代理运行中 ($LISTEN_HOST:$PROXY_PORT)"
curl -s "$PROXY_URL" | python3 -m json.tool
else
Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).
"禁用杀毒",
"关闭安全",
"sudo su",
"chmod 777",
"rm -rf"
])
# 线程安全的统计
Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).
"禁用杀毒",
"关闭安全",
"sudo su",
"chmod 777",
"rm -rf"
])
# 线程安全的统计
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
"/your-provider": {
"url": "https://api.your-provider.com/v1",
"name": "Your Provider",
"description": "描述信息",
"pricing": "paid"
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
"/your-provider": {
"url": "https://api.your-provider.com/v1",
"name": "Your Provider",
"description": "描述信息",
"pricing": "paid"
The README explicitly documents request logging for proxy traffic but does not warn that proxied prompts, model outputs, and possibly authorization-bearing headers may be written to local log files. For an LLM proxy, this creates a realistic risk of sensitive data exposure because users may assume the service is only forwarding traffic, not persistently storing it.
The usage examples show bearer-token-authenticated API calls sent through the local proxy without warning that all prompts and authentication-bearing traffic traverse the proxy process first. In this skill's context, that omission is security-relevant because operators may route sensitive commercial or personal data through the proxy without understanding the trust boundary.
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
curl http://127.0.0.1:18888/openai/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $OPENAI_API_KEY" \
-d '{
The skill advertises routing traffic to many third-party LLM providers, but it does not warn users that their prompts, attachments, and model outputs may be transmitted to external services with separate privacy, retention, and training policies. This omission can cause unintended disclosure of sensitive or regulated data, especially because the proxy is designed to simplify sending the same content across multiple providers.
The skill explicitly documents that request and service logs are written under ~/.openclaw/logs/llm-proxy/, including request logs, but it does not warn users that prompts and responses may be persisted to disk. This creates a privacy and secret-handling risk because users may send credentials, personal data, or proprietary content through the proxy without understanding that local artifacts remain after use.
The natural-language metadata and prompt strings require the skill to operate in Chinese, including the description and the LLM review instruction. This is a locale/language constraint, and the file does not indicate any user choice or explicit region-specific justification for enforcing Chinese-only behavior.
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
"关闭杀毒",
"禁用杀毒",
"关闭安全",
"sudo su",
"chmod 777",
"rm -rf",
"关闭防护",
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
"关闭杀毒",
"禁用杀毒",
"关闭安全",
"sudo su",
"chmod 777",
"rm -rf",
"关闭防护",
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
"关闭杀毒",
"禁用杀毒",
"关闭安全",
"sudo su",
"chmod 777",
"rm -rf",
"关闭防护",
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
"关闭杀毒",
"禁用杀毒",
"关闭安全",
"sudo su",
"chmod 777",
"rm -rf",
"关闭防护",
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
"禁用杀毒",
"关闭安全",
"sudo su",
"chmod 777",
"rm -rf",
"关闭防护",
"禁用安全",
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
"禁用杀毒",
"关闭安全",
"sudo su",
"chmod 777",
"rm -rf",
"关闭防护",
"禁用安全",
This JSON config contains user-facing descriptive text and comments predominantly in Chinese, including provider descriptions and annotations. Because no opt-in or alternative locale is indicated in the file, this can be interpreted as a language/locale policy issue if the skill is expected to support users without forcing a specific language.
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
"pricing": "freemium"
},
"/groq": {
"url": "https://api.groq.com/openai/v1",
"name": "Groq",
"description": "免费快速推理 (LLaMA, Mixtral等)",
"pricing": "freemium"
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
"pricing": "freemium"
},
"/cloudflare": {
"url": "https://api.cloudflare.com/client/v4/accounts",
"name": "Workers AI",
"description": "免费额度 (10万次/天)",
"pricing": "freemium"
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
"pricing": "freemium"
},
"/deepseek": {
"url": "https://api.deepseek.com/v1",
"name": "DeepSeek",
"description": "新用户免费额度",
"pricing": "freemium"
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
"pricing": "freemium"
},
"/moonshot": {
"url": "https://api.moonshot.cn/v1",
"name": "月之暗面",
"description": "新用户免费额度",
"pricing": "freemium"
No suspicious patterns detected.