Back to skill

Security audit

悟道 · A股市场情报

Security checks for vulnerabilities and agentic risk

Overview

This is a read-only China A-share market data skill with a disclosed API key requirement and no evidence of hidden execution, persistence, or destructive behavior.

Install only if you intend to use the stock.quicktiny.cn A-share market intelligence API. Keep the API key secret, set LB_API_BASE to the documented official URL, and treat the output as market information rather than trading advice. The publisher should clarify the limit-up/capital-flow scope wording and add base-URL validation guidance.

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

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:8
Finding

Unvalidated API Base URL Can Disclose the Bearer Credential

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 8 and 20-44
Vulnerability Type: Credential disclosure through an unvalidated configurable API destination
Risk Level: Medium

Vulnerable Code

yaml
metadata:
  {
    "openclaw":
      {
        "emoji": "📰",
        "requires": { "env": ["LB_API_KEY", "LB_API_BASE"] },
      },
  }
markdown
## Instructions for the hosting agent

1. **Environment variables**: If `LB_API_KEY` or `LB_API_BASE` is missing, ask the user to configure it according to **Setup** below.
2. **Only use paths and parameters listed in the "Endpoints" section of this document**; do not invent endpoints.

## Setup

### Obtain an API Key

1. Visit [https://stock.quicktiny.cn](https://stock.quicktiny.cn), register an account, and sign in.
2. Open the Developer API page at `/developer`.
3. Select Create Key. The system generates an API key beginning with `lb_`.
4. Copy and save it immediately; the key is shown only once.

### Configure Environment Variables

```bash
export LB_API_KEY="lb_your_key_here"
export LB_API_BASE="https://stock.quicktiny.cn/api/openclaw"

Authentication

bash
curl -s -H "Authorization: Bearer $LB_API_KEY" "$LB_API_BASE/endpoint"
text

### Technical Analysis

The Skill treats `LB_API_BASE` as a trusted request destination and unconditionally places `LB_API_KEY` in the HTTP `Authorization` header. Although the setup example recommends the legitimate `https://stock.quicktiny.cn/api/openclaw` URL, the hosting-agent instructions only check whether the environment variable exists. They do not require validation of its URL scheme, hostname, port, or path.

Consequently, an attacker who can influence the agent's environment or deployment configuration can set `LB_API_BASE` to an attacker-controlled endpoint. When the agent follows any documented API request, `curl` transmits the bearer credential to that endpoint. Redirect behavior also requires explicit hardening so that future com
...[truncated 1487 chars]
Remediation
View remediation

Remediation Suggestions

  1. Remove LB_API_BASE from user-controlled configuration and hard-code the trusted service origin where operationally possible:

    bash
    LB_API_BASE="https://stock.quicktiny.cn/api/openclaw"
    
  2. If configurability is required, parse and validate the URL before attaching credentials. Require all of the following:

    • Scheme exactly equal to https.
    • Hostname exactly equal to stock.quicktiny.cn.
    • An approved port, normally 443.
    • Path equal to or contained beneath /api/openclaw.
    • No embedded username or password.
    • No hostname suffix, substring, or wildcard matching.
  3. Instruct the hosting agent to reject requests when validation fails rather than silently using the supplied destination.

  4. Harden transport behavior and prevent unsafe protocol or redirect handling. For example:

    bash
    curl --silent --show-error --fail \
      --proto '=https' \
      --max-redirs 0 \
      -H "Authorization: Bearer $LB_API_KEY" \
      "https://stock.quicktiny.cn/api/openclaw/endpoint"
    
  5. If redirects are later enabled, verify every redirect target against the same strict origin allowlist before forwarding the authorization header.

  6. Store the API key in a managed secret store with narrowly scoped access. Avoid exposing it in logs, shell tracing, diagnostic output, or error messages.

  7. Support rapid key revocation and rotation. Revoke any key suspected of having been used while LB_API_BASE pointed to an untrusted destination.

Vulnerability Patterns
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (4)

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The manifest description says the skill is not for 'limit-up boards'. However, the endpoint documentation for daily briefings exposes content.dataBoard.limitUp and limitDown, and the auction/dragon-tiger sections explicitly advise combining results with 涨停板/limit-up information. This is a semantic mismatch between the claimed scope boundary and the actual documented behavior the skill supports.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The skill’s manifest description mixes English trigger text with a predominantly Chinese-only skill body and output guidance, but it does not state that the skill is region-specific or that Chinese responses/content are required by the data source. This can violate language/locale policy because it implicitly constrains interaction to Chinese without offering the user a language choice or opt-in.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The manifest states the skill should NOT be used for 'limit-up boards', but the inline analysis note says auction data works better when combined with 涨停板数据. That is an active contradiction in the skill's own documentation about intended use.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The 龙虎榜 section includes a limitUpInfo field and presents it as part of the returned record, despite the manifest explicitly excluding limit-up board use cases. This creates intent-level contradiction between the top-level skill description and the endpoint documentation.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.