Back to skill

Security audit

A股智能投资助手

Security checks for vulnerabilities and agentic risk

Overview

This A-share investment helper is broadly coherent with its stated finance-analysis purpose, but users should understand its third-party data access, loose dependency pinning, and overstated messaging automation claims.

Install only in an isolated Python environment and be aware that stock symbols, watchlists, and query timing may be sent to AKShare-backed sources or Eastmoney. Treat the Feishu/WeChat automation claims as incomplete unless you separately configure and approve OpenClaw scheduled jobs and messaging channels. For stronger supply-chain safety, pin and review dependency versions before use.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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)

T08 · Insecure Dependencies

Warning
Location
SKILL.md:8
Finding

Unpinned Third-Party Dependencies Allow Unreviewed Package Releases

Content
View full analysis
=1.12", "pandas>=1.5", "ta>=0.11"] install: - id: pip-install kind: pip packages: ["akshare>=1.12", "pandas>=1.5", "ta>=0.11"] ``` `SKILL.md:36`: ```bash pip install akshare pandas ta ``` `_meta.json:12`: ```json "dependencies": ["akshare>=1.12", "pandas>=1.5", "ta>=0.11"], ``` ### Technical Analysis The project installs dependencies using open-ended minimum-version constraints and also documents installation without any version constraints. It does not provide a lockfile, cryptographic hashes, or another mechanism that guarantees installation of previously reviewed artifacts. Consequently, installation results can change over time. Any future release satisfying these constraints can be selected without a corresponding review of this Skill. Python packages may execute code during build or installation, and their imported modules execute initialization code at runtime. A compromised maintainer account, malicious upstream release, or compromised distribution artifact could therefore introduce code execution through an otherwise normal installation workflow. The runtime script also imports `requests` in `scripts/analysis.py:78` and `scripts/analysis.py:133`, but that dependency is not declared in the Skill metadata. Relying on an undeclared transitive or preinstalled package further reduces reproducibility and dependency provenance. ### Attack Path 1. An attacker compromises an upstream dependency publisher, package repository account, or distribution artifact for `akshare`, `pandas`, or `ta`. 2. The attacker publishes a malicious release whose version satisfies the project's open-ended constraint, such as a release later than the stated minimum. 3. A user installs the Skill dependencies through th ...[truncated 1089 chars]
Remediation
View remediation
pandas== ta== requests== ``` 2. Generate and commit a lockfile containing the complete transitive dependency graph. 3. Use cryptographic artifact hashes and install with `pip --require-hashes` to prevent substitution of unreviewed distributions. 4. Explicitly declare and pin `requests`, because it is directly imported by the runtime script. 5. Install packages only from an approved package index over TLS. Disable unexpected extra indexes to reduce dependency-confusion risk. 6. Review dependency changes before updating the lockfile, including package ownership, release history, build scripts, and known vulnerabilities. 7. Run installation and execution in an isolated virtual environment or container under a non-privileged account with limited filesystem and credential access. 8. Add automated dependency and provenance scanning to the release process. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (8)

Tp4

High
Category
MCP Tool Poisoning
Confidence
88% confidence
Finding

The code substantially matches the core investment-analysis description: it retrieves real-time and historical stock data, calculates MACD/KDJ/Bollinger-style indicators, generates holding reports, and evaluates alert conditions. However, an important part of the declared description says reports are pushed on a schedule to Feishu/WeChat. No code here implements Feishu/WeChat integration, message sending, scheduling, or trigger-based automation. The alerting functionality also exists only as local logic returning alert objects, not as an actual automated notification system. Therefore the description overstates implemented delivery/automation capabilities, creating a meaningful description-behavior mismatch.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
90% confidence
Finding

The skill performs network-backed operations through AkShare data retrieval and declares scheduled/reporting behavior, but it does not define any explicit tool scope such as allowed-tools or permissions. In an agent environment, undeclared network capability weakens least-privilege controls and can enable unintended outbound access or make operator review inaccurate.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
82% confidence
Finding

The natural-language metadata is entirely oriented around Chinese-language stock analysis and A-share terminology, but the manifest does not indicate that this locale restriction is optional or user-selected. For organizational language/locale policy, forcing a specific language or regional context without opt-in can be a policy violation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The module title, docstrings, console messages, alerts, and generated report content are all fixed in Chinese, with no mechanism to let the user choose language or locale. This creates a natural-language policy concern because the skill forces one language rather than offering localization or explicit opt-in.

Content

No source excerpt is available for this finding.

Dynamic import via __import__()

Medium
Category
Dangerous Code Execution
Confidence
75% confidence
Finding

Dynamic import() can load arbitrary modules at runtime, bypassing static analysis and potentially importing malicious code.

Content

Scanner excerpt · scripts/analysis.py (reported line 38)May include surrounding context.

python
def safe_import(module_name):
    """安全导入模块"""
    try:
        return __import__(module_name)
    except ImportError:
        raise Exception(f"请安装 {module_name}: pip install {module_name}")

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The skill performs outbound requests to third-party market-data providers (via akshare and direct Eastmoney APIs) without any user-facing notice or consent flow. In an agent setting, this can expose the user's watchlist, queried tickers, timing, and usage patterns to external services, creating a privacy and data-governance risk.

Content

No source excerpt is available for this finding.

Vague Triggers

Low
Category
Not specified by scanner
Confidence
90% confidence
Finding

This manifest description lists broad capabilities such as '智能投资助手', '自动盯盘', and '持仓报告' but does not specify what exact user requests or contexts should invoke the skill. In a manifest file, that lack of specificity can make routing or activation overly broad and increase the chance of unintended invocation.

Content

No source excerpt is available for this finding.

Dynamic attribute access via getattr()

Low
Category
Dangerous Code Execution
Confidence
50% confidence
Finding

Dynamic getattr() with a non-literal attribute name can access arbitrary object attributes, potentially bypassing access controls.

Content

Scanner excerpt · scripts/analysis.py (reported line 65)May include surrounding context.

python
def get_macro_data(func_name):
    """获取宏观经济数据"""
    ak = safe_import('akshare')
    func = getattr(ak, func_name, None)
    if func is None:
        raise Exception(f"接口 {func_name} 不存在")
    return func()