Back to skill

Security audit

A Stock Data

Security checks for vulnerabilities and agentic risk

Overview

This stock-data skill has some scope and disclosure gaps, but the artifacts do not show hidden persistence, credential theft, destructive actions, or exfiltration.

Before installing, treat this as a Chinese-market AkShare helper that may send stock queries to external financial data services. Use an isolated Python environment, pin dependencies if possible, and be aware that parts of the documentation exceed the stated A-share scope and the bundled chart scripts write a fixed chart filename.

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:252
Finding

Unpinned Third-Party Dependency Installation

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 252-255
Vulnerability Type: Unpinned third-party dependency and missing integrity verification
Risk Level: Medium

Vulnerable Code:

markdown
### Installation Dependencies
```bash
pip install ta-lib
text

### Technical Analysis

The installation instruction retrieves and installs `ta-lib` without specifying an audited version, verifying cryptographic hashes, or constraining the package source. Consequently, the installed artifact can change over time even though the reviewed Skill remains unchanged.

Python packages can execute code during installation and subsequently when imported. If the package distribution, package index, maintainer account, or dependency chain is compromised, following this instruction could introduce attacker-controlled code into the user's environment. The finding does not establish that the current `ta-lib` package is malicious; it identifies an unsafe and mutable dependency installation process.

### Attack Path

1. An attacker compromises the package distribution, its maintainer account, the configured package index, or a transitive dependency.
2. A user follows the Skill documentation and runs `pip install ta-lib`.
3. Because no version or artifact hash is required, pip resolves and downloads the attacker-controlled release available through the configured index.
4. Malicious package code executes during installation or later when the package is imported by the technical-analysis workflow.
5. The code runs with the privileges of the user performing the installation or executing the Skill.

### Impact Assessment

Successful exploitation could provide arbitrary code execution with the installing user's privileges. Depending on those privileges and the environment, the attacker could access or modify user-readable files, steal environment variables and credentials available to the process, tamper with analysis results
...[truncated 241 chars]
Remediation
View remediation

Remediation Suggestions

  1. Pin ta-lib to a specifically reviewed version rather than allowing unconstrained resolution.
  2. Generate a locked requirements file containing cryptographic hashes and install it with pip install --require-hashes -r requirements.txt.
  3. Pin and hash all transitive Python dependencies, not only the direct package.
  4. Use an explicitly configured, trusted package index or an internally controlled artifact repository.
  5. Install dependencies inside an isolated virtual environment or container under a non-administrative account.
  6. Review package provenance, release signatures where available, and dependency vulnerability reports before updating the lock file.
  7. Document a controlled update process so dependency changes receive security review before deployment.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • 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
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (9)

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

The declared description presents a broad A-share data query skill that should respond to user requests about stock prices, market data, K-lines, financials, real-time and historical information, and stock selection, including lookup by code or name. In contrast, the supplied code only constructs a pandas DataFrame from fixed embedded values for five dates, plots three subcharts with matplotlib, saves the result to a local filesystem path, and prints summary statistics. There is no network access, database/API query, parameter handling, user input processing, stock search logic, or generalized support for arbitrary A-share symbols. While the code is stock-related and does produce a chart resembling recent market data, that is only a narrow subset and is materially different from the declared functionality. Therefore this is a clear description-behavior mismatch.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The manifest description defines usage entirely around Chinese-language user requests and a China-specific market context, but it does not explicitly state that the skill is intentionally Chinese-only or provide any language/locale opt-in. Under the policy, forcing a specific language without user choice or documented justification is a natural-language policy issue.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The auto-trigger phrases are broad enough that normal finance-related conversation could invoke the skill unexpectedly, causing unsolicited network calls to third-party data providers and possibly returning irrelevant or unintended results. In agent environments, overbroad routing increases the chance of data being sent externally without strong user intent, which is a real security and privacy concern even if the queried content is usually low sensitivity.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill explicitly relies on external network-based financial data providers and even mentions account-dependent access, but it does not warn users that requests may be sent to third parties. In an agent context, this can expose user-entered stock interests, watchlists, or related context to external services without meaningful notice or consent.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The manifest description limits the skill to '中国A股' data queries, examples, and analysis. However, the documentation claims support for B股、港股、美股实时行情, which materially broadens the behavior and intended use beyond A-share-only functionality.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The file contains natural-language strings and display settings that assume Chinese output and fonts, including Chinese labels, status messages, and a hard-coded Chinese stock title. Under the policy, forcing a specific language or locale without user opt-in is a natural-language policy violation unless the locale restriction is explicitly documented and justified.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The script explicitly configures Chinese fonts and uses Chinese-only labels/output, which imposes a specific language/locale choice on all users. The policy requires either user choice or clearly documented justification for locale constraints, neither of which appears in this file.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

The manifest positions this as an A-share query skill, but the data source section advertises coverage of 港股、美股、基金、期货、宏观经济. While this may describe the upstream library, in this skill document it implies a broader operational scope than the declared A-share use case.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

This Python file performs a file write by saving a chart to a hard-coded path under the user's profile directory. Although it prints the destination after saving, there is no advance disclosure, confirmation prompt, or comment/docstring warning that the script will create or overwrite a file at that location.

Content

No source excerpt is available for this finding.