Back to skill

Security audit

Tavily Search with Multi-Key

Security checks for vulnerabilities and agentic risk

Overview

This skill is a straightforward Tavily web-search helper; it sends search queries and the configured Tavily API key to Tavily, which is expected for its purpose.

Install only if you are comfortable sending search queries to Tavily and storing a Tavily API key in environment variables or ~/.openclaw/.env. Avoid using it for secrets, private internal URLs, or proprietary text unless that data is allowed to leave your environment.

Vulnerability Patterns
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Taint TrackingDirect Taint Flow, Variable-Mediated Taint Flow, Credential Exfiltration Chain
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (10)

Tainted flow: 'req' from os.environ.get (line 102, credential/environment) → urllib.request.urlopen (network output)

Critical
Category
Data Flow
Confidence
90% confidence
Finding

Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.

Content

Scanner excerpt · scripts/tavily_search.py (reported line 109)May include surrounding context.

python
method="POST",
    )

    with urllib.request.urlopen(req, timeout=30) as resp:
        body = resp.read().decode("utf-8", errors="replace")

    try:

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/tavily_search.py (reported line 14)May include surrounding context.

python
# 支持多 key 轮询:TAVILY_API_KEYS=key1,key2,key3
def _load_keys():
    """从环境变量或 .env 文件加载多 key"""
    keys_str = os.environ.get("TAVILY_API_KEYS", "")
    if keys_str:
        return [k.strip() for k in keys_str.split(",") if k.strip()]

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/tavily_search.py (reported line 19)May include surrounding context.

python
if keys_str:
        return [k.strip() for k in keys_str.split(",") if k.strip()]

    env_path = pathlib.Path.home() / ".openclaw" / ".env"
    if env_path.exists():
        try:
            txt = env_path.read_text(encoding="utf-8", errors="ignore")

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/tavily_search.py (reported line 69)May include surrounding context.

python
if keys_str:
        return [k.strip() for k in keys_str.split(",") if k.strip()]

    env_path = pathlib.Path.home() / ".openclaw" / ".env"
    if env_path.exists():
        try:
            txt = env_path.read_text(encoding="utf-8", errors="ignore")

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/tavily_search.py (reported line 88)May include surrounding context.

python
if keys_str:
        return [k.strip() for k in keys_str.split(",") if k.strip()]

    env_path = pathlib.Path.home() / ".openclaw" / ".env"
    if env_path.exists():
        try:
            txt = env_path.read_text(encoding="utf-8", errors="ignore")

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
92% confidence
Finding

The skill invokes a Python script that uses environment variables, reads a user home directory config file, and performs outbound network requests, yet the manifest declares no explicit tool scope or allowed-tools restrictions. This weakens least-privilege controls and can cause the skill to be granted broader capabilities than users or orchestrators expect, increasing the blast radius if the script is modified or abused.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The description says to use the skill when the user asks to "search the web / look up sources / find links," which are broad natural-language triggers without tighter scope or exclusion conditions. Because no negative examples or narrower activation boundaries are provided, this could cause unintended invocation in loosely related conversations.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
82% confidence
Finding

The requirements section uses Chinese-only instructional text ("多 key 轮询(推荐)" and "单 key 模式") while the rest of the file is in English, which imposes a language inconsistency without opt-in or documented rationale. This can violate language/locale policy expectations where the skill should not force or assume a specific language unexpectedly.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · scripts/tavily_search.py (reported line 10)May include surrounding context.

python
import sys
import urllib.request

TAVILY_URL = "https://api.tavily.com/search"

# 支持多 key 轮询:TAVILY_API_KEYS=key1,key2,key3
def _load_keys():

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The skill sends user search queries and an API credential to a third-party service without any in-code notice, consent check, or data-sensitivity guard. In an agent setting, users may provide secrets, internal URLs, or proprietary text in a query, and this code will forward that content externally by design.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.