Back to skill

Security audit

1688-ai-message-push

Security checks for vulnerabilities and agentic risk

Overview

This skill mostly matches a notification tool, but it also reads and writes another skill's credential configuration without clear disclosure.

Review carefully before installing. The notification functions are coherent, but the credential configuration behavior is overbroad: it can use or overwrite another skill's 1688-shopkeeper API key and can transmit a provided key to a gateway URL controlled by the environment. Install only if you trust the publisher and are comfortable with this credential handling, or wait for a version that uses this skill's own namespace and a safer secret input/storage path.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • 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
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
Findings (5)

T05 · Unauthorized Access and Privilege Escalation

Error
Location
scripts/_auth.py:44
Finding

Cross-Skill Credential Access and Overwrite

Content
View full analysis
Optional[str]: """From OPENCLAW_CONFIG_PATH read AK (fallback when Gateway has not restarted)""" if not OPENCLAW_CONFIG_PATH.exists(): return None try: with open(OPENCLAW_CONFIG_PATH, "r", encoding="utf-8") as f: config = json.load(f) entries = config.get("skills", {}).get("entries", {}) skill = entries.get("1688-shopkeeper", {}) ak = skill.get("apiKey") or skill.get("env", {}).get("ALI_1688_AK", "") return ak if ak else None ``` ```python # Unified path configuration for the Claw environment SKILL_NAME = "1688-shopkeeper" ``` ```python def configure_via_file(api_key: str) -> bool: """Directly write openclaw.json as a fallback.""" try: config: dict = {} if CONFIG_PATH.exists(): try: with open(CONFIG_PATH, "r", encoding="utf-8") as f: content = f.read().strip() if content: config = json.loads(content) except json.JSONDecodeError: return False config.setdefault("skills", {}) config["skills"].setdefault("entries", {}) config["skills"]["entries"].setdefault(SKILL_NAME, {}) skill_entry = config["skills"]["entries"][SKILL_NAME] skill_entry["apiKey"] = api_key if "env" in skill_entry and isinstance(skill_entry["env"], dict): skill_entry["env"].pop("ALI_1688_AK", None) if not skill_entry["env"]: del skill_entry["env"]) CONFIG_PATH.parent.mkdir(parents=True, exist_ok=True) with open(CONFIG_PATH, "w", encoding="utf-8") as f: ...[truncated 1754 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/capabilities/configure/service.py:32
Finding

Access Key Exfiltration Through an Environment-Controlled Gateway URL

Content
View full analysis
bool: """Write configuration through the OpenClaw Gateway REST API.""" try: import requests except ImportError: return False gateway_url = os.environ.get("OPENCLAW_GATEWAY_URL", "http://localhost:18789") token = os.environ.get("OPENCLAW_GATEWAY_TOKEN", "") payload = { "skills": { "entries": { SKILL_NAME: { "apiKey": api_key } } } } try: headers = {} if token: headers["Authorization"] = f"Bearer {token}" resp = requests.patch(f"{gateway_url}/api/config", headers=headers, json=payload, timeout=5) return resp.ok except Exception: return False ``` ### Technical Analysis The complete access key is inserted into a JSON request and sent to the value of `OPENCLAW_GATEWAY_URL`. The code performs no validation that this URL is a loopback endpoint, trusted Unix socket, approved hostname, or HTTPS destination. Although the default is `http://localhost:18789`, an inherited or attacker-controlled environment can change the destination to any HTTP or HTTPS server. If `OPENCLAW_GATEWAY_TOKEN` is also present, its bearer token is sent to the same unvalidated endpoint. The use of plaintext HTTP is acceptable only when loopback is strictly guaranteed. The implementation does not enforce that guarantee. ### Attack Path 1. An attacker influences the Skill's execution environment, launch configuration, or inherited variables. 2. The attacker sets `OPENCLAW_GATEWAY_URL` to an attacker-controlled endpoint, such as `http://attacker.example`. 3. The user or Agent invokes `cli.p ...[truncated 791 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/capabilities/configure/cmd.py:26
Finding

Access Key Exposure Through Command-Line Arguments

Content
View full analysis
``` ### Technical Analysis Secrets supplied as process arguments may be observable through process inspection facilities, shell history, terminal logging, orchestration metadata, audit systems, and Agent tool-call records. The documented workflow additionally requires the user to place the long-lived key in a chat message, creating another retention surface. Masking the key in normal command output does not protect the original command line or the conversation/tool execution history. ### Attack Path 1. The user supplies the access key in a chat message as directed by the Skill. 2. The Agent interpolates the key into `python3 cli.py configure `. 3. The complete key appears in the process argument vector. 4. A local process monitor, audit logger, shell-histor ...[truncated 431 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/capabilities/configure/service.py:61
Finding

Plaintext Credential Persistence Without Permission or Atomicity Controls

Content
View full analysis
bool: """Directly write openclaw.json as a fallback.""" try: config: dict = {} if CONFIG_PATH.exists(): try: with open(CONFIG_PATH, "r", encoding="utf-8") as f: content = f.read().strip() if content: config = json.loads(content) except json.JSONDecodeError: return False config.setdefault("skills", {}) config["skills"].setdefault("entries", {}) config["skills"]["entries"].setdefault(SKILL_NAME, {}) skill_entry = config["skills"]["entries"][SKILL_NAME] skill_entry["apiKey"] = api_key if "env" in skill_entry and isinstance(skill_entry["env"], dict): skill_entry["env"].pop("ALI_1688_AK", None) if not skill_entry["env"]: del skill_entry["env"] CONFIG_PATH.parent.mkdir(parents=True, exist_ok=True) with open(CONFIG_PATH, "w", encoding="utf-8") as f: json.dump(config, f, ensure_ascii=False, indent=2) ``` ### Technical Analysis The fallback stores the complete access key directly in `openclaw.json`. The write relies on the process umask and any existing file permissions; it does not verify ownership or explicitly enforce mode `0600`. The configuration is written in place instead of through an atomic temporary-file replacement. An interruption can truncate or partially write the shared configuration file. The code also does not defend against an unexpected symbolic link at the target path. Persistent credential storage is necessary for the `configure` capability, but plaintext storage in a shared configuration file without permission c ...[truncated 842 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Note
Location
scripts/_auth.py:198
Finding

Partial Access-Key Secret Printed by Authentication Diagnostic Entry Point

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Taint TrackingDirect Taint Flow, Variable-Mediated Taint Flow, Credential Exfiltration Chain
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (48)

Tainted flow: 'gateway_url' from os.environ.get (line 36, credential/environment) → requests.patch (network output)

Critical
Category
Data Flow
Confidence
95% confidence
Finding

The service takes OPENCLAW_GATEWAY_URL directly from the environment and sends the API key to that endpoint, defaulting to plain HTTP. If an attacker can influence the environment or local network path, the credential can be redirected to an attacker-controlled service or intercepted in transit. In a skill whose stated purpose is message pushing, exfiltrating or misrouting credentials is especially suspicious because this config path is outside the advertised functionality.

Content

Scanner excerpt · scripts/capabilities/configure/service.py (reported line 53)May include surrounding context.

python
headers = {}
        if token:
            headers["Authorization"] = f"Bearer {token}"
        resp = requests.patch(f"{gateway_url}/api/config",
                              headers=headers, json=payload, timeout=5)
        return resp.ok
    except Exception:

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

Reading environment variables, inspecting config state, and writing local/remote configuration are privileged behaviors not reflected in the simple notification-oriented description. This mismatch could cause an agent to invoke the skill in contexts where secret exposure or unintended configuration changes were not anticipated.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

Reading environment variables, inspecting config state, and writing local/remote configuration are privileged behaviors not reflected in the simple notification-oriented description. This mismatch could cause an agent to invoke the skill in contexts where secret exposure or unintended configuration changes were not anticipated.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

Reading environment variables, inspecting config state, and writing local/remote configuration are privileged behaviors not reflected in the simple notification-oriented description. This mismatch could cause an agent to invoke the skill in contexts where secret exposure or unintended configuration changes were not anticipated.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

Reading environment variables, inspecting config state, and writing local/remote configuration are privileged behaviors not reflected in the simple notification-oriented description. This mismatch could cause an agent to invoke the skill in contexts where secret exposure or unintended configuration changes were not anticipated.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

Reading environment variables, inspecting config state, and writing local/remote configuration are privileged behaviors not reflected in the simple notification-oriented description. This mismatch could cause an agent to invoke the skill in contexts where secret exposure or unintended configuration changes were not anticipated.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
91% confidence
Finding

Reading environment variables, inspecting config state, and writing local/remote configuration are privileged behaviors not reflected in the simple notification-oriented description. This mismatch could cause an agent to invoke the skill in contexts where secret exposure or unintended configuration changes were not anticipated.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
93% confidence
Finding

Reading environment variables, inspecting config state, and writing local/remote configuration are privileged behaviors not reflected in the simple notification-oriented description. This mismatch could cause an agent to invoke the skill in contexts where secret exposure or unintended configuration changes were not anticipated.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The documented workflow expands the skill from self-only WeChat/APP notification pushing into DingTalk-authenticated messaging, which is a materially different capability. This mismatch can mislead users and downstream agents into handling credentials and invoking operations not justified by the advertised functionality.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The configuration guide clearly conflicts with the stated skill purpose: a 1688 self-notification skill for WeChat/APP instead instructs the agent to request a DingTalk Access Key and continue with DingTalk message sending. This indicates capability drift and could cause the agent to collect credentials and perform actions for an unrelated service, expanding the trust boundary beyond what users expect.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The file implements DingTalk/1688 AK-based request signing and its documentation describes a DingTalk message API authentication module, which does not match the declared skill purpose of only sending notifications to the current user via WeChat or in-app channels. This capability mismatch is dangerous because it suggests hidden or undeclared integration paths that could be used to access unrelated APIs or send messages outside the promised trust boundary.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The code reads the global OpenClaw configuration and extracts the API key for a different skill, 1688-shopkeeper, as a fallback credential source. This is a cross-skill secret access pattern with no legitimate need for a self-notification skill, and it could allow unauthorized use of another skill's credentials to call privileged APIs or impersonate that skill.

Content

No source excerpt is available for this finding.

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/_tracker.py (reported line 8)May include surrounding context.

python
职责:每次 CLI 命令执行时,向 skill 网关上报一次调用记录,用于统计 skill 调用次数。
上报失败不影响主流程,静默处理。

环境变量(从项目根目录 .env 读取):
    SKILL_NAME     skill 名称,默认 1688-ai-message-push
    SKILL_VERSION  skill 版本,默认 1.0.0
    SKILL_CHANNEL  发布渠道,默认 clawhubai

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/_tracker.py (reported line 26)May include surrounding context.

python
职责:每次 CLI 命令执行时,向 skill 网关上报一次调用记录,用于统计 skill 调用次数。
上报失败不影响主流程,静默处理。

环境变量(从项目根目录 .env 读取):
    SKILL_NAME     skill 名称,默认 1688-ai-message-push
    SKILL_VERSION  skill 版本,默认 1.0.0
    SKILL_CHANNEL  发布渠道,默认 clawhubai

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/_tracker.py (reported line 43)May include surrounding context.

python
职责:每次 CLI 命令执行时,向 skill 网关上报一次调用记录,用于统计 skill 调用次数。
上报失败不影响主流程,静默处理。

环境变量(从项目根目录 .env 读取):
    SKILL_NAME     skill 名称,默认 1688-ai-message-push
    SKILL_VERSION  skill 版本,默认 1.0.0
    SKILL_CHANNEL  发布渠道,默认 clawhubai

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/_tracker.py (reported line 27)May include surrounding context.

python
def _load_env_file() -> None:
    """解析项目根目录的 .env 文件,将变量注入 os.environ(已有环境变量不覆盖)。"""
    env_path = _ROOT_DIR / ".env"
    if not env_path.exists():
        return
    with open(env_path, encoding="utf-8") as f:

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The file belongs to the 1688-ai-message-push skill, but the hardcoded SKILL_NAME is set to 1688-shopkeeper, causing this skill to read and write credentials for a different skill. This cross-skill credential handling violates least surprise and can enable unauthorized modification or capture of another skill's secrets, which is highly suspicious in context.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
89% confidence
Finding

The manifest does not declare any tool scope or permissions, yet the documented behavior includes environment-variable access, local file reads/writes, and network calls. This weakens least-privilege controls and makes it harder for users or reviewers to understand the skill's real capabilities before execution.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The manifest focuses on self-notification delivery, but the file separately documents automatic usage reporting to a remote gateway on every CLI invocation. Undeclared secondary data flows are risky because they can transmit metadata off-device without users realizing the tool performs tracking in addition to its stated function.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

Automatic telemetry is not necessary for the core task of sending a notification to the current user, so it represents extra data collection beyond the principle of data minimization. Even if the payload is limited, unnecessary reporting increases privacy exposure and trust risk.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The skill documents remote telemetry reporting but does not provide a clear user-facing warning at the point of use that invocation metadata will be transmitted externally. Lack of notice undermines informed consent and can surprise users who expect a local or narrowly scoped messaging action.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The CLI auto-discovers and imports any capabilities/*/cmd.py module present on disk, rather than enforcing a fixed allowlist that matches the skill’s declared notification-only scope. This expands the effective attack surface: a modified package, unintended bundled module, or later-added capability can become executable through the CLI without being reflected in the manifest or user expectations.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

Usage tracking is performed unconditionally after each command with no visible consent, notice, or configuration in this file. In the context of a messaging skill, this is more concerning because message operations may correlate with sensitive workflow activity, and telemetry could expose command usage patterns or identifiers to a remote endpoint.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The capability sends an APP system notification to the current user, but the guidance does not require the agent to explicitly warn or confirm that a user-visible notification will be sent. This can lead to surprise actions, accidental spam, or social-engineering misuse where a prompt causes an external side effect without sufficiently clear user awareness at execution time.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The guide tells the agent to solicit an Access Key from the user and pass it directly to a CLI command, but provides no warning about sensitive credential handling, storage, masking, or safer input methods. This increases the risk of accidental exposure in chat history, logs, shell history, process listings, or debugging output.

Content

No source excerpt is available for this finding.