Back to skill

Security audit

12 量化交易V2.2完整版

Security checks for vulnerabilities and agentic risk

Overview

This is mostly a disclosed stock-analysis skill, but its installation and usage instructions are risky and inconsistent enough that users should review it before installing.

Install only after reviewing the shell commands and documentation. Do not run the /tmp scripts referenced in the docs unless you created and verified them yourself, use a virtual environment with pinned dependencies, keep notifications and AI APIs disabled unless needed, and avoid entering real SMTP/API credentials until you understand what data will be sent externally. Treat the trading outputs as informational rather than automated financial advice.

Vulnerability Patterns
  • 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
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
Findings (3)

T08 · Insecure Dependencies

Error
Location
install.sh:19
Finding

Automatic Installation of Unpinned Third-Party Dependencies

Content
View full analysis
/dev/null || { echo "⚠ 部分依赖安装失败,请手动安装:" echo " pip3 install akshare pandas numpy pyyaml" } ``` The documentation also recommends installing additional unpinned packages: ```bash pip3 install efinance pip3 install yfinance pip3 install pillow pip3 install google-generativeai ``` ### Technical Analysis The installation script retrieves mutable package versions from the package index without: - Exact version constraints - Cryptographic hashes - A reviewed lockfile - An isolated virtual environment - Explicit package-index restrictions - Dependency provenance verification Python package installation can execute package build and installation logic. Consequently, the selected packages and their transitive dependencies receive code execution under the account running the installer. Redirecting standard error to `/dev/null` also suppresses package resolver, certificate, build, and installation diagnostics. This makes supply-chain anomalies and dependency substitution harder to detect. The behavior is related to the Skill's declared need for market-data libraries, but it exceeds the minimum safe installation privilege because unrestricted current releases are installed directly into the active Python environment. ### Attack Path 1. An attacker compromises an upstream dependency, maintainer account, package release, or transitive dependency. 2. The attacker publishes a malicious version that satisfies the unconstrained package request. 3. A user runs `install.sh` or follows one of the documented `pip3 install` commands. 4. `pip3` resolves the malicious release because no version or hash is ...[truncated 834 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
docs/文件索引.md:60
Finding

Execution of Uncontrolled Scripts from a Shared Temporary Directory

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
modules/07-通知中心.py:282
Finding

Telegram Bot Token May Be Exposed Through Exception Logging

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (52)

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The finding indicates undocumented filesystem access to a specific config path and validation/test-harness behavior not reflected in the skill description. Hidden file reads can violate user expectations and, in some agent deployments, expose local secrets or environment-specific data if paths are broader than advertised.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The finding indicates undocumented filesystem access to a specific config path and validation/test-harness behavior not reflected in the skill description. Hidden file reads can violate user expectations and, in some agent deployments, expose local secrets or environment-specific data if paths are broader than advertised.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

The finding indicates undocumented filesystem access to a specific config path and validation/test-harness behavior not reflected in the skill description. Hidden file reads can violate user expectations and, in some agent deployments, expose local secrets or environment-specific data if paths are broader than advertised.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
90% confidence
Finding

The finding indicates undocumented filesystem access to a specific config path and validation/test-harness behavior not reflected in the skill description. Hidden file reads can violate user expectations and, in some agent deployments, expose local secrets or environment-specific data if paths are broader than advertised.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

The finding indicates undocumented filesystem access to a specific config path and validation/test-harness behavior not reflected in the skill description. Hidden file reads can violate user expectations and, in some agent deployments, expose local secrets or environment-specific data if paths are broader than advertised.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The finding indicates undocumented filesystem access to a specific config path and validation/test-harness behavior not reflected in the skill description. Hidden file reads can violate user expectations and, in some agent deployments, expose local secrets or environment-specific data if paths are broader than advertised.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The finding indicates undocumented filesystem access to a specific config path and validation/test-harness behavior not reflected in the skill description. Hidden file reads can violate user expectations and, in some agent deployments, expose local secrets or environment-specific data if paths are broader than advertised.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
90% confidence
Finding

The finding indicates undocumented filesystem access to a specific config path and validation/test-harness behavior not reflected in the skill description. Hidden file reads can violate user expectations and, in some agent deployments, expose local secrets or environment-specific data if paths are broader than advertised.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The finding indicates undocumented filesystem access to a specific config path and validation/test-harness behavior not reflected in the skill description. Hidden file reads can violate user expectations and, in some agent deployments, expose local secrets or environment-specific data if paths are broader than advertised.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The constructor instantiates MarketEnhancedAnalyzer from within MarketEnhancedAnalyzer.__init__, which causes unbounded recursive object creation until Python raises a recursion error or the process exhausts stack/resources. In a trading skill, this creates a reliable denial-of-service condition: any code path that constructs the analyzer can crash initialization and prevent market analysis or downstream trading logic from running.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
90% confidence
Finding

The skill advertises capabilities that involve filesystem access and outbound network communication, but it does not declare any explicit tool scope such as permissions or allowed-tools. In an agent environment, this weakens least-privilege controls and can cause the skill to be invoked with broader access than users expect, especially given email and external data fetching features.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The skill description mentions external data sources and notification features but does not clearly warn users that portfolio interests, watchlists, report contents, or email metadata may be transmitted to third parties. This is a privacy and transparency problem, especially in a financial context where symbols, strategies, and alerts may be sensitive.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

Broad trigger examples like generic requests to analyze stocks or scan markets can cause over-activation of the skill in contexts where users did not intend network access, monitoring, or notifications. In agent systems, vague activation boundaries increase the risk of unintended execution paths and surprise data transmission.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The monitoring example describes periodic checks with signal-triggered notifications but does not warn that this can create continuous outbound communications and repeated data access. In practice, this can leak ongoing watchlist interests and generate sustained network activity or notification spam without the user's full awareness.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The configuration enables outbound communication channels for email and third-party AI APIs without any accompanying notice about what data may be transmitted externally. In a trading system, this creates a real risk of unintentionally sending sensitive market data, screenshots, positions, signals, or user information to external providers, especially if these features are later enabled by users.

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 a quant trading system with 8-factor signals, multi-source fault tolerance, and real-time market analysis. This file adds a separate image_recognition capability using Gemini/OpenAI/Anthropic vision APIs, which is not justified by the stated purpose and materially expands the system into general multimodal AI usage.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · config/V2.2配置文件.yaml (reported line 182)May include surrounding context.

yaml
# OpenAI配置
  openai:
    base_url: "https://api.openai.com/v1"
    model_name: "gpt-4o"

  # Anthropic配置

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The pipeline initializes the market analyzer with a default region of 'cn', and the file's user-facing natural-language text is entirely Chinese. This imposes a specific locale/language behavior by default without offering a user choice or documenting why the constraint is required.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

This markdown file presents all user-facing guidance and recommendations exclusively in Chinese. The policy requires flagging language or locale constraints when the skill forces a specific language without user opt-in, and no alternative language option or justification is provided here.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

L246-L247将V2.2系统描述为“无AI依赖”“零成本”,给人的含义是系统不涉及外部AI服务成本。但L80-L81与L465-L467明确写出图片识别需要AI API Key,并计划集成Gemini/OpenAI,这与前述绝对化表述直接冲突。

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The document strongly encourages immediate deployment and real-world use of an automated trading system while omitting prominent risk disclosures, safety constraints, and validation prerequisites. In the context of a trading skill, this can push users toward financially consequential automation without understanding market, operational, or model risk, increasing the likelihood of harmful real-world outcomes.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The guide instructs users to enable SMTP email notifications and provide sender credentials and recipient addresses, but it does not clearly disclose that trading signals, portfolio-related content, and personal contact data will leave the local system and traverse third-party mail infrastructure. In a quantitative trading context, those outbound notifications can expose sensitive financial activity patterns, account metadata, and recipient information if users enable them without understanding the privacy implications.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The guide recommends enabling external AI APIs for image recognition and AI backtesting using third-party services, but it does not clearly warn that uploaded images, prompts, market data, or derived trading information may be transmitted to external providers. In a trading system, this can unintentionally disclose proprietary strategy inputs or sensitive operational data to third parties, creating privacy, confidentiality, and compliance risks.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
84% confidence
Finding

The file advertises email notification functionality but does not warn that market data, alert content, recipient addresses, and possibly credentials may be transmitted to external mail infrastructure. While not inherently malicious, omitting a privacy and security notice can lead to accidental disclosure of sensitive operational or personal information.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The document instructs users to execute an automated deployment script directly from /tmp without any warning, verification step, or explanation of what system changes will occur. In a skill context, this is risky because users may run a shell script that installs software, alters files, or changes environment state without review, increasing the chance of unsafe or unintended execution.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.