Back to skill

Security audit

安卓手机自动化,类似豆包手机

Security checks for vulnerabilities and agentic risk

Overview

This phone-automation skill is useful but needs Review because it can install and update code, remember and reconnect to devices, expose model keys, and carry out phone actions with limited confirmation.

Install only if you are comfortable with a skill that can change local tooling, download and run upstream code, control a connected phone, remember device connection details, and perform the phone task you requested without a final confirmation. Use a dedicated test phone/account where possible, prefer HTTPS model endpoints, avoid shared machines, rotate any exposed model key, and clear ~/.openclaw/workspace/.device-memory/zhiyierxing-auto-phone.json if you do not want device reuse.

Vulnerability Patterns
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (3)

T03 · Remote Payload Retrieval and Execution

Warning
Location
scripts/deploy_open_autoglm.py:47
Finding

Automatic Retrieval and Execution of Unpinned Upstream Code

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/run_phone_task.py:34
Finding

Model API Key Exposed in Child-Process Command-Line Arguments

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/verify_open_autoglm.py:7
Finding

Bearer Credential Can Be Transmitted over Plaintext HTTP

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • Taint TrackingDirect Taint Flow, Variable-Mediated Taint Flow, Credential Exfiltration Chain
Findings (52)

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

Unlike the other mismatch findings, this one notes persistent local device-memory behavior that is not clearly surfaced in the declaration. Persisting device identifiers and Wi‑Fi targets can create privacy and targeting risks, especially on shared hosts, because future runs may silently reconnect to or act on a remembered phone.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

Unlike the other mismatch findings, this one notes persistent local device-memory behavior that is not clearly surfaced in the declaration. Persisting device identifiers and Wi‑Fi targets can create privacy and targeting risks, especially on shared hosts, because future runs may silently reconnect to or act on a remembered phone.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

Unlike the other mismatch findings, this one notes persistent local device-memory behavior that is not clearly surfaced in the declaration. Persisting device identifiers and Wi‑Fi targets can create privacy and targeting risks, especially on shared hosts, because future runs may silently reconnect to or act on a remembered phone.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

Unlike the other mismatch findings, this one notes persistent local device-memory behavior that is not clearly surfaced in the declaration. Persisting device identifiers and Wi‑Fi targets can create privacy and targeting risks, especially on shared hosts, because future runs may silently reconnect to or act on a remembered phone.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

Unlike the other mismatch findings, this one notes persistent local device-memory behavior that is not clearly surfaced in the declaration. Persisting device identifiers and Wi‑Fi targets can create privacy and targeting risks, especially on shared hosts, because future runs may silently reconnect to or act on a remembered phone.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

Unlike the other mismatch findings, this one notes persistent local device-memory behavior that is not clearly surfaced in the declaration. Persisting device identifiers and Wi‑Fi targets can create privacy and targeting risks, especially on shared hosts, because future runs may silently reconnect to or act on a remembered phone.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

Unlike the other mismatch findings, this one notes persistent local device-memory behavior that is not clearly surfaced in the declaration. Persisting device identifiers and Wi‑Fi targets can create privacy and targeting risks, especially on shared hosts, because future runs may silently reconnect to or act on a remembered phone.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

Unlike the other mismatch findings, this one notes persistent local device-memory behavior that is not clearly surfaced in the declaration. Persisting device identifiers and Wi‑Fi targets can create privacy and targeting risks, especially on shared hosts, because future runs may silently reconnect to or act on a remembered phone.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

Unlike the other mismatch findings, this one notes persistent local device-memory behavior that is not clearly surfaced in the declaration. Persisting device identifiers and Wi‑Fi targets can create privacy and targeting risks, especially on shared hosts, because future runs may silently reconnect to or act on a remembered phone.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
96% confidence
Finding

The skill instructs automatic cloning, installation, environment repair, device connection changes, and task execution on a connected phone, yet it lacks a clear user-facing warning that these actions will modify the host and device. That is dangerous because users may believe they are only asking a question while the skill is authorized to make persistent system changes and perform external actions in apps.

Content

No source excerpt is available for this finding.

Env Variable Harvesting

High
Category
Data Exfiltration
Confidence
60% confidence
Finding

Code enumerates, copies, or searches environment variables for secrets. Bulk environment access can collect credentials unrelated to the skill's stated purpose.

Content

Scanner excerpt · scripts/deploy_open_autoglm.py (reported line 12)May include surrounding context.

python
def run(cmd, cwd=None):
    return subprocess.run(cmd, cwd=cwd, env=os.environ.copy())


def venv_matches_selected(repo_dir: Path, selected_path: str) -> bool:

Env Variable Harvesting

High
Category
Data Exfiltration
Confidence
60% confidence
Finding

Code enumerates, copies, or searches environment variables for secrets. Bulk environment access can collect credentials unrelated to the skill's stated purpose.

Content

Scanner excerpt · scripts/run_phone_task.py (reported line 62)May include surrounding context.

python
def run(cmd, cwd=None):
    return subprocess.run(cmd, cwd=cwd, env=os.environ.copy())


def venv_matches_selected(repo_dir: Path, selected_path: str) -> bool:

Env Variable Harvesting

High
Category
Data Exfiltration
Confidence
93% confidence
Finding

This helper forwards the entire environment to every captured subprocess execution. That pattern can unnecessarily expose secrets to downstream scripts and tools that have no need for them, increasing accidental disclosure risk.

Content

Scanner excerpt · scripts/ensure_and_run_task.py (reported line 16)May include surrounding context.

python
def run(cmd, cwd=None, check=False, capture=False):
    if capture:
        return subprocess.run(cmd, cwd=cwd, env=os.environ.copy(), check=check, capture_output=True, text=True)
    return subprocess.run(cmd, cwd=cwd, env=os.environ.copy(), check=check)

Env Variable Harvesting

High
Category
Data Exfiltration
Confidence
93% confidence
Finding

Passing os.environ.copy() to child processes indiscriminately forwards all parent environment variables, which may include API keys, tokens, proxy credentials, CI secrets, or other sensitive values unrelated to the task. In a deployment/orchestration skill that launches multiple helper scripts, this broad propagation expands the blast radius if any child process logs, leaks, or misuses inherited secrets.

Content

Scanner excerpt · scripts/ensure_and_run_task.py (reported line 17)May include surrounding context.

python
def run(cmd, cwd=None, check=False, capture=False):
    if capture:
        return subprocess.run(cmd, cwd=cwd, env=os.environ.copy(), check=check, capture_output=True, text=True)
    return subprocess.run(cmd, cwd=cwd, env=os.environ.copy(), check=check)


def classify_recheck(repo_dir: Path, device_type: str) -> str:

Env Variable Harvesting

High
Category
Data Exfiltration
Confidence
88% confidence
Finding

The 'adb devices' call does not need access to model credentials or most ambient environment variables, yet it inherits them all. While the command itself is harmless, broad secret propagation to unnecessary child processes is still a real exposure and poor secret-handling practice.

Content

Scanner excerpt · scripts/ensure_and_run_task.py (reported line 28)May include surrounding context.

python
return 'config'

    if device_type == 'android':
        adb = subprocess.run(['adb', 'devices'], capture_output=True, text=True, env=os.environ.copy())
        lines = [line.strip() for line in adb.stdout.splitlines()[1:] if line.strip()]
        authorized = [line.split()[0] for line in lines if len(line.split()) >= 2 and line.split()[1] == 'device']
        if not authorized:

Env Variable Harvesting

High
Category
Data Exfiltration
Confidence
90% confidence
Finding

The host-tools installer is given the full parent environment even though most secrets are unrelated to package installation. This creates unnecessary exposure to helper tools and installers, which may generate logs or invoke further subprocesses.

Content

Scanner excerpt · scripts/ensure_and_run_task.py (reported line 102)May include surrounding context.

python
print('[phase] install host tools if needed')
        install_script = root_dir / 'scripts' / 'install_host_tools.py'
        if install_script.exists():
            install = subprocess.run([sys.executable, str(install_script), device_type], env=os.environ.copy())
            if install.returncode == 0:
                print('[auto-fixed] host tools step completed without fatal errors')
            else:

Env Variable Harvesting

High
Category
Data Exfiltration
Confidence
91% confidence
Finding

The deployment script inherits the full environment, which likely includes model credentials and other secrets. Because deployment/repair scripts are often verbose and complex, the chance of accidental logging or downstream propagation is elevated in this skill context.

Content

Scanner excerpt · scripts/ensure_and_run_task.py (reported line 110)May include surrounding context.

python
print('[phase] deployment / repair')
        deploy_script = root_dir / 'scripts' / 'deploy_open_autoglm.py'
        deploy = subprocess.run([sys.executable, str(deploy_script), device_type, model_mode, str(repo_dir)], env=os.environ.copy())
        if deploy.returncode != 0:
            print('[runtime-failed] deployment / repair exited with a non-zero code')
            return deploy.returncode

Direct flow: os.environ.get (credential/environment) → subprocess.run (code execution)

High
Category
Data Flow
Confidence
97% confidence
Finding

The code takes credential-bearing environment values and feeds them directly into a subprocess invocation, including exposing the API key as a command-line flag. In a product-grade deployment skill that automates local setup and execution, this is more dangerous because it normalizes handling secrets in ways that can leak them through process listings, crash reports, telemetry, or debug output.

Content

Scanner excerpt · scripts/ensure_and_run_task.py (reported line 128)May include surrounding context.

python
print('[phase] model verification')
    py = venv_python(repo_dir)
    verify = subprocess.run([
        str(py), str(root_dir / 'scripts' / 'verify_open_autoglm.py'),
        '--base-url', os.environ.get('MODEL_BASE_URL', ''),
        '--model', os.environ.get('MODEL_NAME', ''),

Env Variable Harvesting

High
Category
Data Exfiltration
Confidence
98% confidence
Finding

This call both forwards the full environment and passes an API key explicitly on the command line, creating two avenues for secret exposure. In local automation contexts, child processes and support tooling may emit diagnostics or be inspectable by other local users, making credential leakage realistically exploitable.

Content

Scanner excerpt · scripts/ensure_and_run_task.py (reported line 134)May include surrounding context.

python
'--model', os.environ.get('MODEL_NAME', ''),
        '--apikey', os.environ.get('MODEL_API_KEY', ''),
        '--task', '请输出一个最简单的 do(action="Wait", duration="1 seconds") 来验证动作格式'
    ], cwd=str(repo_dir), env=os.environ.copy())
    if verify.returncode != 0:
        print('[runtime-failed] model verification failed')
        print('[safe-to-retry] verify model endpoint settings or service health, then rerun the workflow')

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
94% confidence
Finding

The skill declares broad operational behavior that implies shell, network, environment, and filesystem access, but it does not declare an explicit tool/permission scope. That makes the execution boundary unclear to users and reviewers, increasing the chance of over-privileged execution and unsafe side effects such as cloning repos, modifying local environments, and interacting with connected phones without a narrowly constrained allowlist.

Content

No source excerpt is available for this finding.

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
92% confidence
Finding

The skill repeatedly instructs the agent not to ask the user before proceeding and to push setup and execution forward automatically until blocked. In the context of shell, network, filesystem, environment-variable use, and phone control, that autonomy can lead to unapproved installs, repo modifications, endpoint usage, and actions on the user's mobile apps before meaningful informed consent is obtained.

Content

Scanner excerpt · SKILL.md (reported line 45)May include surrounding context.

md
- automatically reuse any existing repo, `.venv`, installed dependencies, device connection, and model env vars
- only ask the user to do something after a real runtime blocker is observed
- do not front-load setup instructions "just in case"
- do not ask the user to install ADB Keyboard, enable debugging, or configure env vars unless the workflow actually proves that those are the blockers

## Environment variables
This skill expects the following variables when applicable:

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The activation guidance is intentionally broad enough to trigger on ordinary 'use my phone to do X' requests, which can cause the skill to initiate repo changes, device interactions, and external actions without a clear boundary or explicit opt-in. In a skill that can automate actions on real mobile apps and connected devices, ambiguous invocation materially increases the risk of unintended or unsafe execution.

Content

No source excerpt is available for this finding.

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
93% confidence
Finding

This section expands autonomous behavior to include automatic reuse of remembered device identity and ADB Wi‑Fi targets, plus automatic enabling of TCP/IP connectivity for previously authorized devices. In practice, that can silently reconnect to and operate the wrong phone, broaden device exposure over the network, and reduce user awareness of which device is being controlled.

Content

Scanner excerpt · SKILL.md (reported line 140)May include surrounding context.

md
- existing model environment variables
- remembered Android device identity and remembered ADB Wi‑Fi target

Do not ask the user to reinstall or reconfigure something that may already be present.

For Android:
- if a previously authorized USB device is connected, try enabling TCP/IP and connecting over Wi‑Fi automatically

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill instructs users to enable Developer Options, USB debugging, security-related debugging settings, and alternate device-connection mechanisms, but it does not warn about the increased attack surface or advise disabling them after setup. These settings can allow unauthorized device control, data access, or broader local compromise if the connected computer, cable path, or network environment is untrusted. In this deployment-focused skill, the risk is contextually relevant because the instructions are likely to be followed verbatim by non-expert users.

Content

No source excerpt is available for this finding.

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · scripts/check_android_ready.py (reported line 24)May include surrounding context.

python
return 1

    print('[step] checking adb devices')
    subprocess.run(['adb', 'devices'])
    devices = run(['adb', 'devices'])
    lines = [line.strip() for line in devices.stdout.splitlines()[1:] if line.strip()]
    authorized = [line.split()[0] for line in lines if len(line.split()) >= 2 and line.split()[1] == 'device']