Back to skill

Security audit

1688 Bp Inquiry Evaluate

Security checks for vulnerabilities and agentic risk

Overview

The skill appears to provide the stated 1688 inquiry reports, but it handles access keys and configuration in ways users should review carefully before installing.

Review this skill before installing. It likely performs the advertised 1688 reporting, but only use it where the AK is intended to be shared with the 1688-shopkeeper configuration, the OpenClaw gateway URL is trusted and local, and report recipients are allowed to see buyer conversation details and salesperson/inquiry links. Avoid pasting production AKs into chat or shell commands unless your environment protects transcripts, history, and process logs.

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 (4)

T09 · Insecure Skill Coding Practices

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

Plaintext Access Key Can Be Transmitted to an Environment-Controlled Endpoint

Content
View full analysis
bool: 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 configuration function sends the complete plaintext access key in an HTTP request body. The destination is taken directly from the `OPENCLAW_GATEWAY_URL` environment variable without validating its scheme, host, port, or loopback status. Although the default destination is a local gateway, any process or execution environment capable of influencing this environment variable can redirect the request to an arbitrary remote endpoint. The implementation does not require HTTPS for remote destinations and does not verify that the endpoint represents the trusted OpenClaw gateway. This exceeds least-privilege requirements because configuring a local secret does not require permitting transmission to arbitrary hosts. ### Attack Path 1. An attacker, compromised launcher, malicious wrapper, or poisoned execution environment sets `OPENCLAW_GATEWAY_URL` to an attacker-controlled URL. 2. A user invokes `cli.py configure` with a valid ...[truncated 950 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

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

Access Key Is Exposed Through Command-Line Arguments and Potentially Insecure File Permissions

Content
View full analysis
Remediation
View remediation

T05 · Unauthorized Access and Privilege Escalation

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

Skill Reads and Overwrites Another Skill's Credential Namespace

Content
View full analysis
Optional[str]: 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 except Exception: return None ``` ### Technical Analysis The Skill crosses its declared configuration boundary by consuming and modifying the `1688-shopkeeper` entry. Running this Skill's configuration command can overwrite a credential belonging to another Skill and remove that entry's legacy environment configuration. No explicit shared-credential contract or namespace validation is present in the audited implementation. This creates credential confusion and violates least privilege: the evaluation Skill should only need access to its own secret entry. # ...[truncated 1225 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/capabilities/bp_inquiry_evaluate_summary/cmd.py:96
Finding

Generated Reports Expose Prohibited Salesperson and Inquiry Identifiers

Content
View full analysis
list: evaluate_details = result.get("evaluateDetails", []) return [ { "saleIdentityId": detail.get("saleIdentityId", ""), "saleIdentityName": detail.get("saleIdentityName", "") } for detail in evaluate_details ] ``` The detail renderer repeats the URL exposure: ```python report_url = ( "https://air.1688.com/app/bp-boot/" "a2a-team-newton/index.html#/assessment-detail" f"?startAt={start_at}&endAt={end_at}" f"&sellerUserId={sale_identity_id}" ) ``` ```python inquiry_id = detail.get("inquiryId", "") if inquiry_id: detail_url = ( "https://air.1688.com/app/bp-boot/" ...[truncated 2122 chars]
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
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Taint TrackingDirect Taint Flow, Variable-Mediated Taint Flow, Credential Exfiltration Chain
Findings (44)

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

Critical
Category
Data Flow
Confidence
97% confidence
Finding

The code takes OPENCLAW_GATEWAY_URL directly from the environment and uses it to send a PATCH request containing the API key and optional bearer token. If an attacker can influence the environment, they can redirect credentials to an arbitrary endpoint, and the default also uses plain HTTP, increasing interception and exfiltration risk.

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
99% confidence
Finding

The documented behavior includes AK/API-key validation, local gateway writes, direct config-file reads/writes, and credential-state inspection, none of which are disclosed by the stated assessment purpose. Combining secret handling with file/network side effects in a misleadingly described skill materially raises the risk of unauthorized configuration changes or credential leakage.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The documented behavior includes AK/API-key validation, local gateway writes, direct config-file reads/writes, and credential-state inspection, none of which are disclosed by the stated assessment purpose. Combining secret handling with file/network side effects in a misleadingly described skill materially raises the risk of unauthorized configuration changes or credential leakage.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The documented behavior includes AK/API-key validation, local gateway writes, direct config-file reads/writes, and credential-state inspection, none of which are disclosed by the stated assessment purpose. Combining secret handling with file/network side effects in a misleadingly described skill materially raises the risk of unauthorized configuration changes or credential leakage.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The documented behavior includes AK/API-key validation, local gateway writes, direct config-file reads/writes, and credential-state inspection, none of which are disclosed by the stated assessment purpose. Combining secret handling with file/network side effects in a misleadingly described skill materially raises the risk of unauthorized configuration changes or credential leakage.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The documented behavior includes AK/API-key validation, local gateway writes, direct config-file reads/writes, and credential-state inspection, none of which are disclosed by the stated assessment purpose. Combining secret handling with file/network side effects in a misleadingly described skill materially raises the risk of unauthorized configuration changes or credential leakage.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The configuration guide introduces DingTalk message-sending authentication in a skill whose declared purpose is only 1688 inquiry quality evaluation. This capability mismatch is dangerous because it expands the agent's effective privileges into an unrelated external messaging domain, creating a path for unauthorized credential collection or misuse under the guise of a benign evaluation workflow.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
96% confidence
Finding

The documented ability to configure credentials for DingTalk sending is unjustified by the skill's stated evaluation-only scope. Unnecessary credentialed functionality increases attack surface and can be abused to exfiltrate secrets, send unauthorized messages, or trick users into provisioning access that the skill does not need.

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-open-skill-template
    SKILL_VERSION  skill 版本,默认 1.0.0
    SKILL_CHANNEL  发布渠道,默认 clawhub

Credential Access

High
Category
Privilege Escalation
Confidence
88% confidence
Finding

This function explicitly reads the project .env file and imports arbitrary key/value pairs into the process environment. Although the code appears intended for telemetry configuration rather than secret theft, it unnecessarily accesses local configuration material that may include credentials, increasing the chance of accidental misuse, leakage, or propagation to other components.

Content

Scanner excerpt · scripts/_tracker.py (reported line 26)May include surrounding context.

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

Credential Access

High
Category
Privilege Escalation
Confidence
88% confidence
Finding

Opening the root .env file as part of a telemetry helper grants this module access to local configuration data beyond its stated need. In the context of an evaluation skill, that capability is disproportionate and could expose secrets indirectly if later logged, reused, or transmitted by dependent code.

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:

Credential Access

High
Category
Privilege Escalation
Confidence
90% confidence
Finding

Calling _load_env_file() at module import time causes automatic environment ingestion before the user invokes any explicit telemetry action. Import-time secret/config loading is risky because it is implicit, difficult to audit, and may affect unrelated code paths or later network operations without clear user awareness.

Content

Scanner excerpt · scripts/_tracker.py (reported line 43)May include surrounding context.

python
os.environ[key] = value


# 模块加载时解析一次 .env
_load_env_file()

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The implemented file is a credential-configuration CLI that validates and persists an AK, while the declared skill is for inquiry/customer-service quality evaluation. This mismatch is dangerous because it expands the skill's effective privileges and behavior beyond user expectations, creating a hidden credential-handling surface that could be abused for unauthorized secret collection or persistence.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

This file introduces credential management via validate_ak, configure_via_gateway, configure_via_file, and existing-config checks, which is not justified by a skill meant to assess inquiry handling quality. In this context, hidden secret-handling is especially risky because users invoking an evaluation/reporting skill would not reasonably expect it to read or write access credentials.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
96% confidence
Finding

The presence of AK validation, gateway submission, config-file modification, and retrieval logic is not justified by the stated evaluation-only business function. In a mismatched skill, credential-handling capability is especially risky because it can be abused to collect, persist, or reroute sensitive secrets under the cover of an unrelated feature.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
96% confidence
Finding

This skill is presented as an inquiry-evaluation/reporting capability, but the file implements configuration management that writes AK credentials into global skill config. That mismatch expands the skill's authority beyond its declared purpose and can enable unauthorized credential persistence or cross-skill configuration changes that a user would not reasonably expect.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
92% confidence
Finding

The skill declares no explicit tool scope even though the documented behavior requires access to environment variables, local files, write operations, and network calls. Missing scope boundaries increases the chance that a runtime grants broader capabilities than users or reviewers expect, which is risky here because the skill also handles credentials and external reporting.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The listed trigger words include broad phrases such as "能力提升", "客服怎么样", "团队怎么样", and "询盘怎么样", which are generic enough to appear in normal conversation outside a clear skill-invocation context. The file does not provide exclusion conditions or negative examples to narrow when these phrases should or should not activate the skill.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
84% confidence
Finding

The activation phrases and all user-facing guidance are written only in Chinese, and the skill defines fixed Chinese follow-up prompts and output behaviors without indicating that users may choose another language. Under the policy, forcing a specific language without user opt-in is a natural-language policy concern unless the locale restriction is explicitly documented and justified.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

Automatic usage telemetry on every CLI execution is unrelated to the core evaluation purpose and creates an undisclosed outbound data flow. Even if the payload is limited, persistent reporting can leak behavioral metadata about when and how the skill is used, which is especially concerning in enterprise contexts.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The skill omits a user-facing warning that every CLI execution triggers telemetry reporting. Lack of disclosure undermines informed consent and can result in silent transmission of usage metadata to external services, which is a genuine privacy/security concern.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The CLI reports skill usage after every command via _tracker.report_skill_usage() with no visible notice, consent, or configuration control in this file. Even if the payload is limited, automatic telemetry can expose user behavior, command usage, and potentially arguments or environment-derived metadata, which is especially sensitive for business evaluation workflows.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This skill exposes detailed salesperson evaluation data that includes buyer identifiers, conversation excerpts, dates, product links, and performance assessments, but the description and workflow do not warn the user that sensitive business and personal data may be returned. The absence of a clear privacy warning and data-minimization guidance increases the risk of unnecessary disclosure, mishandling, or over-sharing of customer communications and employee performance information.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill instructs the agent to ask the user for an Access Key and pass it to a CLI command, but gives no user-facing warning that the value is sensitive or guidance on secure handling. This increases the risk of exposing credentials in chat logs, agent traces, shell history, or downstream tooling, especially because the secret is taken directly from conversation content.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

Directing the agent to extract an Access Key from the conversation and immediately use it in a command creates a clear secret-handling flaw. Secrets placed in conversational text are more likely to be retained in transcripts and telemetry, and command-line usage can further expose them to process inspection or logs.

Content

No source excerpt is available for this finding.