Back to skill

Security audit

A Share Pro

Security checks for vulnerabilities and agentic risk

Overview

The skill mostly matches its A-share stock-monitoring purpose, but its installer has a path bug that can run an unintended local Python file and its setup/network choices need review.

Install only after reviewing the installer or running commands manually from the skill directory. Be aware that it stores watchlists and transactions as local plaintext files under ~/.openclaw/a_share, sends stock symbols to third-party quote providers, and may show unauthenticated Tencent HTTP data. Treat the sample analysis reports and summaries as informational, not financial advice.

Vulnerability Patterns
  • Tool Hijacking and SpoofingModifies or replaces tools so legitimate-looking calls execute attacker logic
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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
Findings (3)

T07 · Tool Hijacking and Spoofing

Error
Location
scripts/install.sh:20
Finding

Installer Can Execute an Attacker-Controlled Local Python Script

Content
View full analysis
/dev/null ``` ### Technical Analysis The installer itself resides in the `scripts` directory, but it attempts to change into another `scripts` directory beneath its own location. For a normal installation, this resolves to `scripts/scripts`, which does not exist. The script neither enables `set -e` nor checks whether `cd` succeeded. Consequently, after the directory change fails, execution continues in the caller's original working directory. The relative command `python3 monitor.py --help` then resolves `monitor.py` from that directory rather than from the trusted Skill directory. An attacker who can place a malicious `monitor.py` in the directory from which a victim launches the installer can cause arbitrary Python code to execute. ### Attack Path 1. The attacker creates a malicious file named `monitor.py` in a directory writable by the victim or otherwise controlled by the attacker. 2. The victim enters that directory and invokes the legitimate installer using an absolute or relative path. 3. The installer attempts to enter the nonexistent `scripts/scripts` directory. 4. The failed `cd` does not terminate execution. 5. `python3 monitor.py --help` loads and executes the attacker's local `monitor.py`. 6. The payload runs with all permissions available to the victim running the installer. This path requires the attacker to influence the launch directory or place a file there, but no further confirmation is requested before Python executes the file. ### Impact Assessment Successful exploitation provides arbitrary code execution with the privileges of the installing user. The attacker could rea ...[truncated 381 chars]
Remediation
View remediation
/dev/null 2>&1 ``` Additional hardening measures: 1. Check that `monitor.py` is a regular file before executing it. 2. Avoid continuing after any failed directory change. 3. Quote every filesystem path. 4. Run installation tests with the same explicit absolute-path convention. 5. Add an automated test that launches `install.sh` from an unrelated directory containing a decoy `monitor.py` and verifies that the decoy is never executed. ]]>

T08 · Insecure Dependencies

Warning
Location
scripts/install.sh:14
Finding

Installer Uses Unpinned and Unnecessary Third-Party Dependencies

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/monitor.py:60
Finding

Primary Financial Quote Source Uses Unauthenticated Plaintext HTTP

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Rogue AgentSelf-Modification, Session Persistence
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (26)

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The declared purpose presents the skill as a stock monitoring tool, but the package behavior reportedly includes uninstall/removal logic, deletion of local user data, and backup handling that are not clearly disclosed in the top-level description. Hidden or under-disclosed destructive behaviors are risky because a user may invoke maintenance scripts without understanding they can remove application files or erase persisted watchlist and transaction data.

Content

No source excerpt is available for this finding.

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
100% confidence
Finding

The script performs a recursive force delete on a user-home path, which is inherently dangerous if path assumptions change or environment expansion behaves unexpectedly. Although the target is intended to be the app's own data directory and the script asks for confirmation, destructive deletion in uninstallers still carries risk of accidental data loss and is more dangerous because it operates on persistent user data.

Content

Scanner excerpt · scripts/uninstall.sh (reported line 15)May include surrounding context.

sh
cp -r ~/.openclaw/a_share ~/.openclaw/a_share_backup_$backup_date 2>/dev/null
        echo "💾 已备份数据到:~/.openclaw/a_share_backup_$backup_date"
        
        rm -rf ~/.openclaw/a_share
        echo "✅ 数据目录已删除"
    fi

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
100% confidence
Finding

The script performs a recursive force delete on a user-home path, which is inherently dangerous if path assumptions change or environment expansion behaves unexpectedly. Although the target is intended to be the app's own data directory and the script asks for confirmation, destructive deletion in uninstallers still carries risk of accidental data loss and is more dangerous because it operates on persistent user data.

Content

Scanner excerpt · scripts/uninstall.sh (reported line 15)May include surrounding context.

sh
cp -r ~/.openclaw/a_share ~/.openclaw/a_share_backup_$backup_date 2>/dev/null
        echo "💾 已备份数据到:~/.openclaw/a_share_backup_$backup_date"
        
        rm -rf ~/.openclaw/a_share
        echo "✅ 数据目录已删除"
    fi

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The entire skill description is written in Chinese and presents the skill as an A-share investing tool without indicating that Chinese is optional or that the skill is intentionally limited to Chinese-speaking users. Under the policy, forcing a specific language without user opt-in is a natural-language locale violation.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
89% confidence
Finding

The skill documentation shows capabilities to read and write local files, access environment-dependent paths, and fetch network data, but it does not declare any tool scope or permissions boundaries. This is dangerous because users and platforms cannot easily assess or constrain what the skill may do, increasing the chance of unintended file modification or network access beyond the expected monitoring function.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
85% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · SKILL.md (reported line 132)May include surrounding context.

bash
# 添加到 crontab(每天收盘后 15:30)
# crontab -e
30 15 * * * cd ~/.openclaw/workspace/skills/a-share-pro/scripts && python3 summarize_performance.py

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The documentation instructs users to manually edit or clear the watchlist and references a clear_watchlist.py reset path without an explicit warning about irreversible data loss. This is dangerous because users may erase tracked stock data unintentionally, especially in an assistant-driven workflow where commands can be followed quickly without reviewing consequences.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

This markdown file is entirely written in Chinese and includes user-directed advice throughout, but it does not indicate that language selection is optional or that the skill is specifically limited to Chinese-speaking users. Under the language/locale policy, forcing a specific language without user opt-in is a natural-language policy concern.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The entire report is presented in Chinese, including all headings, instructions, and risk disclosures, with no indication that the user can opt into another language or locale. Under the policy, a skill should not impose a specific language unless it offers choice or clearly documents a justified region-specific constraint.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The file’s user-facing natural language is entirely in Chinese, including the module description, function docstring, status messages, and confirmation prompt. This imposes a specific language on users without any opt-in, alternative locale, or documented justification, which matches the language/locale policy violation criteria.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The script’s user-facing text is consistently Chinese, which forces a specific language for installation feedback and usage instructions. The file does not provide any opt-in, fallback language, or documented justification that the skill is intended only for a Chinese-speaking or region-specific audience.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
60% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · scripts/install.sh (reported line 13)May include surrounding context.

sh
fi

# 创建数据目录
mkdir -p ~/.openclaw/a_share

# 安装依赖
echo "📦 正在安装依赖..."

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

The script labels this step as testing the monitor functionality, but after already being inside scripts/install.sh it changes into "$(dirname "$0")/scripts", which resolves to a nested scripts directory relative to the installer. This conflicts with the later usage instructions pointing to a single scripts directory and suggests the documented test target does not match the actual repository layout the script claims to validate.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
82% confidence
Finding

This code imports TUSHARE_TOKEN, which is a credential-like value, but the file provides no user-facing warning, logging, or explanatory comment that the skill accesses authentication material. For code files, access to sensitive environment variables or credentials should have some form of disclosure unless clearly covered elsewhere in the skill description, which is not shown in this file.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This Python file contains natural-language docstrings and CLI output entirely in Chinese, including the usage instructions, without indicating that language selection is configurable or region-specific. The policy for this category flags language/locale constraints when the skill forces a specific language without user opt-in.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The module docstring and all user-facing strings are written only in Chinese, indicating a fixed language experience. Under the stated policy, forcing a specific language without user opt-in or a documented region-specific justification is a natural-language policy violation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The description field uses Chinese-only text to describe the skill's purpose and behavior. Under the policy rule, forcing a specific language without offering user choice or documenting a justified locale restriction can be a natural-language policy violation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
92% confidence
Finding

This markdown report is written entirely in Chinese and all usage examples, headings, and operational guidance assume Chinese-language interaction. Under the policy rule for language/locale constraints, this can be considered a natural-language policy issue because the file does not offer an opt-in choice of language or explain that the skill is intentionally limited to a Chinese-speaking or China-market context.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
93% confidence
Finding

The markdown explicitly advertises persistent local storage and later shows concrete paths and file formats for watchlist and transaction records, but it does not include any user warning about local data retention or privacy implications. For a finance-related skill handling portfolio and transaction information, users should be clearly told that this data is saved in plaintext on disk.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
98% confidence
Finding

Earlier in the document, '策略一' is defined as '长期持有' at L060-L069, while '策略三' is defined as '止损观望' at L111-L119. Line L200 says '如果你是长期投资者 → 策略三(长期持有)', which directly conflicts with the document's own earlier labeling and can mislead users about the intended action.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
97% confidence
Finding

The docstring and CLI usage output require Chinese comprehension to use the skill effectively. Under the policy, forcing a specific language without opt-in is a natural-language policy violation unless the locale restriction is explicitly justified.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
92% confidence
Finding

The module docstring and function docstring are written only in Chinese, and all user-facing output strings are also Chinese. This imposes a locale/language choice on users without offering any opt-in, fallback, or documented justification, which matches the language-policy concern for natural-language content.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

The Accept-Language header is fixed to zh-CN,zh;q=0.9, which enforces a specific locale preference in requests. The policy allows locale constraints only when the user is offered a choice or when the constraint is clearly documented and justified, neither of which is evident in this file.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

The skill sends requested stock codes to external services such as Tencent Finance via HTTP requests, and similar behavior appears in the other fetch methods. Although network access is central to the skill's purpose, this file does not include any visible notice to the user that queries are sent to third-party data providers.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
76% confidence
Finding

This code calls monitor.get_quote(code) to fetch real-time stock data, which likely performs a network request for each watchlist entry. Although the script prints results, it does not explicitly disclose that it will contact an external data source or transmit requested stock symbols, and there is no warning comment or docstring stating this behavior.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.