Back to skill

Security audit

1688 Common Cha88 Bidding Base

Security checks for vulnerabilities and agentic risk

Overview

This skill performs the advertised bidding search, but its AK setup and automatic usage reporting create credential and privacy risks that should be reviewed before installation.

Install only if you trust the publisher and the OpenClaw/1688 gateway environment. Treat the AK as a secret: avoid pasting it into chat or shell history when possible, verify OPENCLAW_GATEWAY_URL points to a trusted local or approved HTTPS endpoint before configuring, and review permissions on the OpenClaw config file that stores the AK. Be aware that each completed CLI command may send signed usage metadata to the 1688 skills gateway.

Vulnerability Patterns
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (4)

T09 · Insecure Skill Coding Practices

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

Unrestricted Gateway URL Can Expose the AK and Gateway Bearer Token

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

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

Long-Lived AK Is Accepted Through Process Command-Line Arguments

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

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

Plaintext AK Configuration File Is Written Without Enforced Restrictive Permissions

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Note
Location
scripts/capabilities/bidding_search/cmd.py:18
Finding

Untrusted API Fields Are Rendered as Agent-Directed Markdown Without Escaping

Content
View full analysis
str: """Remove HTML tags.""" return re.sub(r'<[^>]+>', '', text) if text else '' ``` ```python for i, item in enumerate(items, 1): title = _strip_html(item.get("title", "")) bid_type = item.get("subBidType", "") or item.get("bidType", "") publish_date = item.get("publishDate", "") province = item.get("province", "") city = item.get("city", "") region = f"{province}{city}" if province and city else province or city or "-" bid_unit_name = _strip_html((item.get("bidUnit") or {}).get("name", "")) win_bid_name = _strip_html((item.get("winBidUnit") or {}).get("name", "")) tender_products = item.get("tenderProducts", "") win_amount = _fmt_amount(item.get("winBidAmount")) lines.append( f"| {i} | {title} | {bid_type} | {publish_date} | {region} " f"| {bid_unit_name} | {win_bid_name} | {tender_products} | {win_amount} |" ) ``` The Skill instructions direct the Agent to output the returned `markdown` field directly. ### Technical Analysis Search-result fields originate from a remote API and are therefore outside the local trust boundary. The renderer removes HTML tags from only selected fields. It does not escape Markdown syntax, table delimiters, backslashes, links, images, or newline characters. Several fields, including bidding type, publication date, region components, products, and amount, are inserted without HTML removal or Markdown normalization. An API record containing a pipe character can create additional table cells. Newlines can terminate the current row and add arbitrary Markdown blocks. Links or image syntax can display deceptive destinations or trigger remote content loading in s ...[truncated 1295 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
  • Taint TrackingDirect Taint Flow, Variable-Mediated Taint Flow, Credential Exfiltration Chain
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (29)

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

Critical
Category
Data Flow
Confidence
94% confidence
Finding

The code builds a destination URL for a credential-bearing PATCH request directly from the OPENCLAW_GATEWAY_URL environment variable and sends the API key in the JSON body, optionally with a bearer token header. If that environment variable is attacker-controlled or misconfigured, the skill can exfiltrate secrets to an arbitrary host, and the default also permits cleartext HTTP rather than enforcing TLS.

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

The documentation indicates additional behavior beyond search, including reading environment variables, writing local configuration, and sending authenticated requests to a gateway. In the context of an agent skill, this is particularly risky because the advertised read-only nature can cause underestimation of the attack surface and lead to unintended secret use, persistence, or external transmission.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The documentation indicates additional behavior beyond search, including reading environment variables, writing local configuration, and sending authenticated requests to a gateway. In the context of an agent skill, this is particularly risky because the advertised read-only nature can cause underestimation of the attack surface and lead to unintended secret use, persistence, or external transmission.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The documentation indicates additional behavior beyond search, including reading environment variables, writing local configuration, and sending authenticated requests to a gateway. In the context of an agent skill, this is particularly risky because the advertised read-only nature can cause underestimation of the attack surface and lead to unintended secret use, persistence, or external transmission.

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 名称,默认 cha88-bidding-search
    SKILL_VERSION  skill 版本,默认 1.0.0
    SKILL_CHANNEL  发布渠道,默认 clawhub

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 名称,默认 cha88-bidding-search
    SKILL_VERSION  skill 版本,默认 1.0.0
    SKILL_CHANNEL  发布渠道,默认 clawhub

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 名称,默认 cha88-bidding-search
    SKILL_VERSION  skill 版本,默认 1.0.0
    SKILL_CHANNEL  发布渠道,默认 clawhub

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:

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
87% confidence
Finding

The skill declares no explicit tool scope or permissions despite describing capabilities that involve environment access, local file interaction, and outbound network calls. Without clear scoping, an agent or reviewer may assume the skill is a simple read-only search tool when it can also access configuration and transmit data, increasing the risk of over-broad execution and misuse.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill states that every CLI invocation automatically reports usage to a remote endpoint, but this is not presented as a prominent user-facing warning or opt-in choice. Automatic transmission on each run can leak operational metadata such as skill identity, version, channel, and execution frequency, and in some environments even metadata-only egress is a policy violation.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The CLI invokes _tracker.report_skill_usage() after every command, introducing hidden telemetry behavior that is unrelated to the stated bidding-search functionality and not disclosed in this file's help or output contract. Even if the tracker only sends minimal analytics, this creates an undisclosed data-flow channel that could expose command usage, arguments, environment details, or user identifiers depending on _tracker implementation.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

Post-execution telemetry is executed unconditionally after the main command completes, despite the skill being presented as a basic search tool. In this context, the hidden reporting capability increases risk because users would reasonably expect local command execution for search/configuration, not background reporting that may leak operational metadata.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The code reports usage after every command with no user-facing disclosure in this file, and exceptions are swallowed so the behavior remains silent. Silent telemetry is dangerous because it prevents informed consent and makes auditing difficult, while the hidden channel could be repurposed to exfiltrate sensitive command usage or environment 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 explicitly instructs the agent to ask the user for an Access Key in chat and then pass it into a command, but it provides no warning about the sensitivity of the credential, no minimization guidance, and no safer collection channel. This creates a real secret-handling risk because credentials may be exposed in conversation history, logs, telemetry, screenshots, or downstream tool output.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The skill defines a natural-language credential collection flow: extract the user's AK from the message and use it directly in cli.py configure <AK>. That is dangerous because it normalizes submission of secrets through chat and direct command-line interpolation, increasing the chance of credential exposure through transcripts, process arguments, shell history, logging, or accidental re-disclosure.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The manifest describes this skill as "88查招投标基础搜索", which implies a bidding-information search function. This file documents an additional capability that reports invocation metadata to a remote gateway, including request construction, authentication reuse, retries, and failure handling. Remote telemetry is not part of the user-stated search purpose and is not justified by the manifest description alone.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The code reads a local .env file and injects values into process environment state solely to support telemetry configuration, which is unrelated to the declared search purpose. Reading local configuration files broadens access to sensitive deployment context and can unintentionally normalize handling of secrets-adjacent data without clear user awareness.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

This file performs network telemetry reporting on every CLI invocation, which goes beyond the stated skill purpose of bidding/search functionality. Even though the payload appears limited to skill metadata, undisclosed outbound reporting expands the skill's behavior and creates privacy, transparency, and policy-compliance risk.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

Telemetry is sent on every CLI execution and failures are silently ignored, with no user-facing warning or consent mechanism in this file. In a search-oriented skill context, hidden network activity is more suspicious because it is not necessary to fulfill the advertised function and prevents informed user choice.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The natural-language strings throughout the CLI, including the command description, argument help, and output messages, are exclusively in Chinese, with no indication that users may select another language. Under the policy, forcing a specific language without opt-in is a natural-language policy violation unless clearly documented and justified.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
86% confidence
Finding

The function transmits the provided API key in a network request to the configured Gateway endpoint. Although the docstring describes the mechanism, there is no explicit user-facing warning, confirmation, or visible disclosure that the credential will be sent over HTTP to a service endpoint.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

This code creates the configuration directory and writes the provided API key to disk, which affects user data and stores a credential persistently. In this file there is no confirmation prompt, logging/print disclosure, or comment/docstring clearly warning the user that the key will be written to the config file.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
89% confidence
Finding

All user-facing guidance and quoted agent output are specified only in Chinese, including the exact prompt the agent should send. This can violate language/locale policy when no user opt-in or explicit region-specific justification is provided.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Low
Category
Not specified by scanner
Confidence
79% confidence
Finding

The manifest describes a basic招投标搜索 skill, for which signed API requests are expected. However, this module goes beyond simple request signing by reading API credentials from a local gateway config file as a fallback, which is a broader local-secret access capability than the stated search purpose suggests. This is not an obvious requirement of 'basic search' from the manifest text alone.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

The module docstring is entirely in Chinese and does not indicate that language choice is configurable or intentionally limited to a Chinese-only audience. Per the policy, forcing a specific language without user opt-in or documented justification is a natural-language policy concern.

Content

No source excerpt is available for this finding.