T05 · Unauthorized Access and Privilege Escalation
- Location
model/scripts/veo_worker.py:67- Finding
Arbitrary OpenClaw Provider Credential Transmitted to an External Service
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This video-generation skill has a coherent purpose, but it automatically uses local API credentials, sends them to a hard-coded external service, and opens returned URLs without confirmation.
Review carefully before installing. Use only a dedicated, low-quota Wanjie API key, do not keep unrelated provider keys as the first OpenClaw provider entry, and avoid use until the skill requires explicit confirmation before network calls and browser opening, pins dependencies, and documents how to disable any background monitoring.
model/scripts/veo_worker.py:67Arbitrary OpenClaw Provider Credential Transmitted to an External Service
model/scripts/veo_worker.py:108Untrusted API Response URL Is Automatically Opened
model/scripts/video_interface.py:7Runtime Installation of an Unpinned Third-Party Dependency
The README describes a natural-language trigger and fully automated background execution, but it does not narrowly define what inputs are allowed or what safety checks constrain activation. In a skill that can launch long-running generation jobs, broad trigger wording increases the chance of accidental invocation, prompt misuse, or unreviewed task execution, especially when paired with auto-restart and polling behavior.
The trigger phrase is very broad ('生成视频:[您的提示词]') and the document says commands are intercepted automatically, which increases the chance of unintended activation from ordinary conversation. In the context of a skill that launches background processing and writes results to files, ambiguous triggering can cause unauthorized or unexpected task execution rather than a harmless UX issue.
The skill explicitly describes persistent background monitoring every 5 minutes, automatic task handling, dependency installation, timeout cleanup, file output, and Windows scheduled-task deployment, but does not provide clear user warnings, consent, or operational boundaries. This is dangerous because it establishes a persistence mechanism and ongoing filesystem activity that could surprise users, consume resources, or be abused for unauthorized automated behavior in an agent environment.
The activation phrase and response string are hard-coded in Chinese, which imposes a specific language requirement without offering the user a choice. This is a natural-language policy concern because the skill only appears usable for Chinese-language input and output with no documented opt-in or locale justification.
The skill spawns a detached Python process to generate a video in the background, which is a subprocess execution covered by the missing-warning rule for code files. Although the return message tells the user after launching that generation is happening, there is no prior confirmation, visible logging, or explanatory comment intended for the user about this background process behavior.
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
if platform.system() == 'Windows':
os.startfile(url)
elif platform.system() == 'Darwin': # macOS
subprocess.Popen(['open', url])
else: # Linux
subprocess.Popen(['xdg-open', url])
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
elif platform.system() == 'Darwin': # macOS
subprocess.Popen(['open', url])
else: # Linux
subprocess.Popen(['xdg-open', url])
def is_process_running(pid):
"""检查指定 PID 的进程是否在运行"""
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
# 如果没有 psutil,使用简单但有效的方法
import subprocess
if platform.system() == 'Windows':
res = subprocess.run(['tasklist', '/FI', f'PID eq {pid}'], capture_output=True, text=True)
return str(pid) in res.stdout
return True # 默认不删除锁,以防误删
The script reads an API key from a user home-directory configuration file and uses it without any visible disclosure, consent, or validation of necessity. In a skill context, silent credential access increases the risk of unauthorized use of the user's provider account and makes the behavior harder for users to audit or safely approve.
The code silently extracts an API key from a local config file and immediately uses it in an outbound request. In a skill environment, undeclared credential use is dangerous because it can consume paid resources, act on behalf of the user without informed approval, and normalize hidden secret access patterns that are hard to distinguish from exfiltration.
The outbound POST itself is not inherently malicious, but it becomes a real security concern in context because it combines external data transmission with hidden credential usage from the user's home directory. That creates account-abuse and transparency risks even if the intended function is legitimate video generation or link retrieval.
}
print(f"[*] API 请求发送中... (Model: {model})", flush=True)
res = requests.post("https://maas-openapi.wanjiedata.com/api/v1/chat/completions",
headers={"Authorization": f"Bearer {key}", "Content-Type": "application/json"},
json=payload, stream=True)
The outbound POST itself is not inherently malicious, but it becomes a real security concern in context because it combines external data transmission with hidden credential usage from the user's home directory. That creates account-abuse and transparency risks even if the intended function is legitimate video generation or link retrieval.
}
print(f"[*] API 请求发送中... (Model: {model})", flush=True)
res = requests.post("https://maas-openapi.wanjiedata.com/api/v1/chat/completions",
headers={"Authorization": f"Bearer {key}", "Content-Type": "application/json"},
json=payload, stream=True)
A video interface helper should not silently modify the Python environment during normal execution unless that behavior is clearly declared and consented to. Runtime package installation broadens the skill's capabilities beyond its apparent purpose and can introduce arbitrary third-party code into the environment, making the context more dangerous because users would not reasonably expect environment mutation here.
Installing a Python package automatically without meaningful warning or confirmation is an unsafe software practice because it executes trust-sensitive actions in the user's environment. This is especially concerning in a helper script where users expect application logic, not package management with network and code-execution implications.
Automatically invoking pip at runtime changes the local environment and executes package installation logic without explicit user approval. Even though the package name is hardcoded, this exposes users to unintended code execution through package install hooks, dependency confusion or index compromise, and breaks the principle of least surprise for a helper script.
importlib.import_module("requests")
except ImportError:
print("[*] 正在安装缺失依赖: requests...")
subprocess.check_call([sys.executable, "-m", "pip", "install", "requests"])
def trigger_veo_generation(prompt, model="veo3.1-fast", seconds=8):
# 在触发前确保环境就绪
The function spawns a detached background worker process, allowing code to continue running outside the initiating interaction and reducing user visibility and control. In the context of an undeclared video helper, that capability is riskier because it can persist work, consume resources, or perform follow-on actions without clear supervision or lifecycle management.
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
# 跨平台进程启动设置
if platform.system() == 'Windows':
# Windows 上使用 CREATE_NEW_PROCESS_GROUP
subprocess.Popen(cmd, creationflags=subprocess.CREATE_NEW_PROCESS_GROUP)
else:
# Linux/macOS 上启动新进程
subprocess.Popen(cmd, start_new_session=True)
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
subprocess.Popen(cmd, creationflags=subprocess.CREATE_NEW_PROCESS_GROUP)
else:
# Linux/macOS 上启动新进程
subprocess.Popen(cmd, start_new_session=True)
return f"[*] 任务已提交: {prompt},请在聊天窗口耐心等待结果通知。"
整个技能说明均以中文呈现,且未说明是否支持其他语言或允许用户自行选择语言。若组织要求避免在无用户选择的情况下强制特定语言,这种单一语言约束可能构成自然语言层面的策略问题。
The comment states that old results should be read first and that an existing success should not be overwritten, but the implementation immediately opens veo_result.txt in write mode and replaces its contents. This is a direct contradiction between the documented intent and the actual file-writing behavior.
User-visible output and inline natural-language documentation in this file are written only in Chinese, including the returned status message and printed installation notice. This can violate language/locale policy when the skill does not offer any language choice or document a justified locale restriction.
The code does return a message that a task was submitted, but it does not clearly disclose that a detached OS-level background process is being launched and left running independently. This lack of transparency weakens user consent and operational awareness, though the impact is lower than direct code-execution issues because the launched script path is fixed.
The dependency is specified as requests>=2.25.1, which allows any future version and does not guarantee a reproducible or reviewed install set. This is dangerous because builds may silently pull in an unexpected release, including one with breaking changes or a known vulnerable version, making security posture non-deterministic.
requests>=2.25.1
requests has multiple known advisories, and because the manifest does not pin an exact version, it is impossible to verify whether installations will resolve to an affected release. The danger is less about a guaranteed vulnerable package in the file today and more that the open-ended specifier permits insecure versions or inconsistent environments over time.
Detected: suspicious.dangerous_exec