T08 · Insecure Dependencies
- Location
feishu_voice_sender.py:24- Finding
Unpinned External Skill Executes with Access to the Full Parent Environment
- Content
View full analysis
Vulnerability Details
File Location:
feishu_voice_sender.py:24-41; installation guidance inSKILL.md:42-45and dependency declaration inSKILL.md:186-191
Vulnerability Type: Unsafe third-party dependency execution and excessive environment-variable exposure
Risk Level: HighVulnerable Code
python # 检查脚本路径 script_path = os.path.expanduser("~/.openclaw/skills/xiaomi-mimo-tts/scripts/smart/mimo_tts_smart.js") if not os.path.exists(script_path): print(f"❌ 错误: 找不到脚本 {script_path}") return False try: # 运行小米 MiMo TTS 脚本 env = os.environ.copy() env['MIMO_API_KEY'] = api_key result = subprocess.run( ['node', script_path, text, output_file], env=env, capture_output=True, text=True )The corresponding installation instruction is:
bash # 安装小米 MiMo TTS 技能 clawhub install xiaomi-mimo-ttsTechnical Analysis
The skill executes a Node.js file supplied by the separately installed
xiaomi-mimo-ttsskill. No dependency version, package digest, script checksum, trusted publisher identity, ownership, or filesystem permissions are verified before execution. The existence check confirms only that a file is present at the expected path; it does not establish that the file is authentic or safe.The subprocess is also given
os.environ.copy(), which exposes every environment variable available to the Python process. Although onlyMIMO_API_KEYis required for the documented operation, the external script can access unrelated API keys, cloud credentials, messaging tokens, database passwords, and other secrets present in the environment.Passing arguments as a list without
shell=Trueprevents direct shell injection throughtextoroutput_filein this code. The principal risk is instead the trust placed in an unverified external executable and the unnecessarily broad secret exposure.Attack Path
- An a ...[truncated 1617 chars]
- Remediation
View remediation
Remediation Suggestions
-
Pin the external skill to an explicitly reviewed version rather than installing an unconstrained latest release.
-
Verify the package publisher and cryptographic digest during installation.
-
Verify the script's checksum, ownership, and permissions before every execution, or bundle a reviewed implementation directly with this skill.
-
Replace
os.environ.copy()with a minimal environment containing only required variables. For example:python env = { "PATH": os.environ.get("PATH", ""), "MIMO_API_KEY": api_key, }If Node requires additional variables, add only those that have been individually reviewed.
-
Run the TTS process under a restricted account or sandbox with narrowly scoped filesystem and network access.
-
Use a dedicated, least-privileged TTS API credential that cannot access unrelated services.
-
Prevent unauthorized modification of the installed script through restrictive ownership and filesystem permissions.
-
Document the exact trusted dependency version and integrity value in the project metadata.
-
