T08 · Insecure Dependencies
- Location
scripts/install.py:41- Finding
Unpinned Third-Party Package Installation and Execution
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This is a coherent web-search skill, but it needs review because it can expose proxy credentials in output/cache and installs an unpinned third-party package into the user environment.
Install only if you are comfortable with queries being sent to third-party search engines. Avoid putting credentials in --proxy URLs, consider using --no-cache for sensitive searches, and install ddgs in an isolated environment with pinned versions rather than running the bundled installer directly.
scripts/install.py:41Unpinned Third-Party Package Installation and Execution
scripts/search.py:696Proxy Credentials May Be Exposed in Plaintext Output and Cache Files
scripts/url_builder.py:107Unvalidated Region Value Can Inject Downstream Tool-Call Syntax
Code enumerates, copies, or searches environment variables for secrets. Bulk environment access can collect credentials unrelated to the skill's stated purpose.
capture_output=True,
text=True,
timeout=5,
env={**os.environ, "HTTPX_DISABLE_HTTP2": "1"}
)
return result.returncode == 0
except (FileNotFoundError, subprocess.TimeoutExpired):
Code enumerates, copies, or searches environment variables for secrets. Bulk environment access can collect credentials unrelated to the skill's stated purpose.
capture_output=True,
text=True,
timeout=5,
env={**os.environ, "HTTPX_DISABLE_HTTP2": "1"}
)
return result.returncode == 0
except (FileNotFoundError, subprocess.TimeoutExpired):
Code enumerates, copies, or searches environment variables for secrets. Bulk environment access can collect credentials unrelated to the skill's stated purpose.
capture_output=True,
text=True,
timeout=5,
env={**os.environ, "HTTPX_DISABLE_HTTP2": "1"}
)
return result.returncode == 0
except (FileNotFoundError, subprocess.TimeoutExpired):
The changelog content from L08 onward is written in Chinese, with no indication that language selection is optional or that the skill is intentionally region-specific. Per the policy, forcing a specific language without user opt-in is a natural-language policy violation.
The trigger phrases are broad and include common user intents like '搜索一下', '帮我搜', '技术文档', and '最新新闻', which can cause this skill to activate in many ordinary conversations. Because the skill performs live web searches and may route queries to third-party engines or through proxies, over-triggering can unintentionally exfiltrate user queries and cause unintended network actions.
The skill promotes 'free' and 'privacy-friendly' search but does not clearly warn that user queries are transmitted to external search engines such as Google, Baidu, Bing, Brave, or DuckDuckGo. In this context, users may reasonably assume searches are local or privacy-preserving, when in fact sensitive prompts, domains, and possibly proxy metadata may be disclosed to third parties.
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
def run(cmd, check=True):
print(f" → {' '.join(cmd)}")
result = subprocess.run(cmd, check=check, capture_output=True, text=True)
if result.stdout:
for line in result.stdout.decode().strip().split("\n"):
if line.strip():
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
print("\n🧪 Quick test (DuckDuckGo Lite fallback)...")
search_script = os.path.join(script_dir, "search.py")
if os.path.exists(search_script):
result = subprocess.run(
[sys.executable, search_script, "-q", "test", "-m", "1", "--lite"],
capture_output=True, text=True, timeout=15
)
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
# 6. Try ddgs test
if ddgs_path or shutil.which("ddgs"):
print("\n🧪 Quick test (ddgs)...")
result = subprocess.run(
[sys.executable, search_script, "-q", "test", "-m", "1", "-b", "duckduckgo"],
capture_output=True, text=True, timeout=15
)
This code file contains user-facing natural-language documentation that assumes Chinese as the required language. Under the policy, forcing a specific language without user opt-in or clear justification is a natural-language policy violation.
The module docstring and CLI help present DHT as a real acceleration feature, but the runtime only toggles a boolean flag and reports it in output. No command-line argument, environment variable, or alternate execution path uses DHT to change how searches are performed, so the documentation overstates implemented behavior.
The file presents the fallback path as URL generation/web_fetch guidance, but later performs live HTTP requests and HTML parsing itself. That mismatch weakens user consent and trust boundaries, because queries and fetched pages are transmitted to third parties even when the interface implies a safer or more controlled fallback behavior.
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
def check_ddgs_available() -> bool:
"""检查 ddgs CLI 是否可用"""
try:
result = subprocess.run(
[DDGS_CLI, "version"],
capture_output=True,
text=True,
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
def check_dht_available() -> bool:
"""检查 DHT 网络是否可用(需要 ddgs[dht])"""
try:
result = subprocess.run(
[DDGS_CLI, "--help"],
capture_output=True,
text=True,
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
for attempt in range(max_retries):
try:
env = _build_env()
result = subprocess.run(
cmd,
capture_output=True,
text=True,
This skill sends user search queries and, in fallback mode, may fetch and parse result pages from external services without a prominent user-facing warning or consent mechanism. In an agent setting, queries often contain sensitive prompts, internal identifiers, or investigative targets, so silent external transmission creates meaningful privacy and data-leakage risk.
This Python file contains natural-language documentation and printed messages exclusively in Chinese, such as the module description and usage notes. Under the policy, forcing a specific language without offering a user choice or documenting a justified locale constraint is a language/locale policy violation.
The skill routes Wikipedia searches specifically to en.wikipedia.org, which imposes an English-language choice in configuration without any visible user opt-in or locale selection. This is a natural-language policy concern because it fixes a language preference rather than allowing the user to choose or documenting a justified regional constraint.
This JSON manifest states that the skill will perform an "automatic fallback to web_fetch" when ddgs is unavailable, but it does not define the exact conditions, limits, or exclusions for when that fallback occurs. In a manifest file, this kind of broad activation behavior can be ambiguous and may lead to unintended invocation of alternate retrieval mechanisms.
The module docstring and surrounding comments present the skill's descriptive text exclusively in Chinese. Under the policy, forcing a specific language without offering choice or documenting a justified locale constraint is a natural-language policy concern.
The module docstring says the installer "Verifies all scripts are runnable". In practice, the code in the verification step only uses os.path.exists() for a fixed list of scripts and never checks execute permissions, shebang validity, or whether the scripts can actually run; only search.py is later test-executed.
The installer automatically performs a pip install from the network, which modifies the user's environment and introduces supply-chain risk without an explicit consent step. In a skill-install context, unexpected package installation can surprise users and may execute third-party package code during installation if the package or dependency chain is compromised.
The installer runs quick tests that perform outbound search requests without clearly warning the user first. While the requests are low sensitivity, automatic network activity during installation can leak metadata such as IP address and usage patterns, and is riskier in restricted or privacy-sensitive environments.
The primary docstring, comments, and many CLI help strings are presented in Chinese, which can impose a specific language on users without indicating that alternatives are available. The policy allows locale constraints when explicitly justified or optional, but no such opt-in or justification appears here.
This code file contains natural-language documentation entirely in Chinese, including the module description and later user-facing output labels, with no indication that users can choose another language. The policy requires flagging language or locale constraints when a specific language is imposed without user opt-in.
No suspicious patterns detected.