Back to skill

Security audit

Tushare Pro A股数据

Security checks for vulnerabilities and agentic risk

Overview

The skill is mostly a normal Tushare market-data helper, but one bundled token setup file points users to a lookalike domain where credentials or API tokens could be exposed.

Review the token setup before installing. Only obtain or enter Tushare credentials at the verified Tushare domain, prefer supplying TUSHARE_TOKEN through your runtime environment or a secret manager, and avoid keeping a real token in a packaged or shared skill directory until the lookalike URL and plaintext-storage guidance are fixed.

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

other

Warning
Location
token.env:2
Finding

Lookalike Domain in Credential Acquisition Instructions

Content
View full analysis

Vulnerability Details

File Location: token.env, line 2
Vulnerability Type: Potential phishing through a lookalike domain
Risk Level: Medium

Vulnerable code snippet:

dotenv
# 获取地址:https://tussahre.pro → 个人中心 → 接口Token

Technical Analysis

The configuration template directs users to https://tussahre.pro, while the service identified throughout SKILL.md is https://tushare.pro. The former transposes letters in the legitimate service name and is therefore a lookalike hostname.

Directing users to a lookalike domain is unnecessary for the Skill's declared market-data functionality. Even if this is an accidental typographical error, users may trust the bundled instructions and visit the unrelated domain while attempting to obtain an API token. The security of TLS does not mitigate this issue because HTTPS only authenticates the hostname that the user actually visits.

Attack Path

  1. A user installs the Skill and reads token.env for token setup instructions.
  2. The user opens https://tussahre.pro.
  3. If the lookalike domain is controlled by an attacker, it presents a page resembling the legitimate Tushare service.
  4. The user submits account credentials, an existing token, or other sensitive information.
  5. The attacker captures that information and uses it against the legitimate service.

Impact Assessment

Exploitation could disclose the user's Tushare credentials or API token to an unrelated party. A captured token may permit unauthorized API requests within the victim's Tushare account permissions, consume quotas, access entitled financial datasets, or cause account disruption. This issue does not directly grant local system privileges or code execution.

Remediation
View remediation

Remediation Suggestions

  • Replace https://tussahre.pro with the verified official URL, https://tushare.pro.
  • Review all documentation and configuration templates for inconsistent or lookalike hostnames.
  • Prefer linking to a verified provider documentation page rather than directing users generically to an authentication page.
  • Add an automated URL-validation or allowlist check during release review.
  • Inform users that the API token should only be submitted to the verified Tushare API endpoint.

T09 · Insecure Skill Coding Practices

Note
Location
SKILL.md:28
Finding

Plaintext API Token Storage in the Skill Directory

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 28-34
Vulnerability Type: Insecure plaintext secret storage guidance
Risk Level: Low

Vulnerable code snippet:

markdown
### 2. 配置 Token

在 **~/.openclaw/skills/tushare-pro/** 目录下创建 `token.env` 文件:

TUSHARE_TOKEN=你的Token

text

The bundled token.env template also reinforces this storage method:

dotenv
# Tushare Pro Token 配置
# 获取地址:https://tussahre.pro → 个人中心 → 接口Token
# 安装后删除此文件,重新创建包含真实Token的版本
TUSHARE_TOKEN=你的Token

The distributed file currently contains only a placeholder; no live credential was found.

Technical Analysis

The Skill instructs users to save a real API token in a plaintext file inside the installed Skill directory. It does not require restrictive file permissions, source-control exclusion, packaging exclusion, or use of a secret-management facility.

A plaintext environment file may inherit permissions that allow other local users or processes to read it. Keeping the secret under the project or Skill directory also increases the chance that it will be committed to source control, included in archives, copied into backups, or redistributed with the Skill.

Sending the token to https://api.tushare.pro is necessary for the declared authenticated API functionality and uses HTTPS. The vulnerability is not the intended API transmission; it is the insufficiently protected storage guidance.

Attack Path

  1. A user follows the documentation and creates token.env under the Skill directory.
  2. The file receives permissive default permissions or is included in source control, backups, archives, diagnostics, or package redistribution.
  3. Another local user, process, repository reader, or package recipient obtains the token.
  4. The party submits the token to the Tushare API.
  5. Unauthorized requests are made using the victim's account entitlements and quota.

Impact Assessment

An exposed ...[truncated 398 chars]

Remediation
View remediation

Remediation Suggestions

  • Prefer injecting TUSHARE_TOKEN through the runtime environment or an operating-system secret manager.
  • If file-based configuration is unavoidable, store it outside the Skill package and require permissions equivalent to 0600.
  • Distribute only a placeholder file such as token.env.example; never package a user-populated token.env.
  • Add token.env to .gitignore, archive exclusions, and package publication exclusions.
  • Update the Python example to use only os.environ.get("TUSHARE_TOKEN") and fail safely when the variable is absent.
  • Document token rotation and immediate revocation procedures for suspected disclosure.
  • Ensure logs and error messages never print the token or complete request payload.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
Findings (1)

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
89% confidence
Finding

The skill requires a Tushare API token and instructs users to store it locally, but it does not explicitly warn that the token will be transmitted to the external Tushare service on each request. This is a genuine but low-severity issue because users may not fully understand the trust boundary or the privacy implications of sending credentials and query data to a third-party API.

Content

No source excerpt is available for this finding.