Back to skill

Security audit

Csi Stock Analyzer

Security checks for vulnerabilities and agentic risk

Overview

This stock-analysis skill needs review because it can turn simulated or hardcoded market data into concrete buy/sell-style recommendations.

Install only if you treat it as a demo or prototype. Do not rely on its ratings, scores, or buy/sell suggestions for financial decisions unless the publisher replaces the simulated market and financial data with verified sources, labels synthetic/demo output clearly, constrains report writes, and documents network and file permissions.

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

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/analyze_stock.py:48
Finding

Path Traversal Through Unsanitized Default Report Filename

Content
View full analysis
Remediation
View remediation

T08 · Insecure Dependencies

Note
Location
requirements.txt:4
Finding

Unpinned and Unhashed Third-Party Dependencies

Content
View full analysis
=2.0.0 numpy>=1.24.0 # Network requests requests>=2.28.0 # Data parsing beautifulsoup4>=4.11.0 lxml>=4.9.0 # Optional data sources # tushare>=1.2.89 # akshare>=1.9.0 # baostock>=0.8.8 # Data visualization (optional) # matplotlib>=3.7.0 # seaborn>=0.12.0 # Utility libraries pyyaml>=6.0 python-dotenv>=1.0.0 ``` `README.md:37-40`: ```bash pip install -r requirements.txt ``` ### Technical Analysis Every active dependency is specified with an open-ended minimum version. No lock file, upper bound, artifact hash, or reviewed dependency snapshot is supplied. As a result, the documented installation command can resolve to package releases that did not exist when the Skill was audited. This weakens reproducibility and permits future upstream changes to alter the installed code without any corresponding change to this repository. The package names reviewed are conventional, and the project does not configure an untrusted package index or contain evidence that any listed dependency is malicious. The finding is therefore a hardening and supply-chain risk rather than evidence of an active dependency attack. ### Attack Path 1. A user follows the documented installation command. 2. `pip` queries its configured package index and resolves the newest versions satisfying the open-ended minimum constraints. 3. A future compromised, malicious, or unexpectedly incompatible release satisfies those constraints. 4. The release is downloaded and installed without repository-level hash verification. 5. The dependency's code executes during installation, import, or normal Skill operation with the privileges of the user running the installation or application. ### Impact Assessment T ...[truncated 527 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (42)

Tp4

High
Category
MCP Tool Poisoning
Confidence
93% confidence
Finding

The skill claims broad stock-analysis functions, including real-time quotes, technical indicators, CSI 2000 batch analysis, and sentiment analysis, but the finding states these are absent or only partially present, while external network access to third-party endpoints is used without declaration. This combination is risky because it couples deceptive capability claims with undisclosed outbound communication in a domain where users may act on the results financially.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The skill claims broad stock-analysis functions, including real-time quotes, technical indicators, CSI 2000 batch analysis, and sentiment analysis, but the finding states these are absent or only partially present, while external network access to third-party endpoints is used without declaration. This combination is risky because it couples deceptive capability claims with undisclosed outbound communication in a domain where users may act on the results financially.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The skill claims broad stock-analysis functions, including real-time quotes, technical indicators, CSI 2000 batch analysis, and sentiment analysis, but the finding states these are absent or only partially present, while external network access to third-party endpoints is used without declaration. This combination is risky because it couples deceptive capability claims with undisclosed outbound communication in a domain where users may act on the results financially.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The function is documented and named as if it retrieves real historical stock market data, but it actually fabricates synthetic random OHLCV values. In an investment-analysis skill, this can directly mislead downstream indicator calculations and trading decisions while presenting false data as authentic market information.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The function claims to return company financial statements but instead returns hardcoded placeholder values, creating a false impression of factual financial analysis. In a stock analysis tool, fabricated revenue, profit, and ratio data can materially distort recommendations and cause users to act on nonexistent fundamentals.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The entire skill description, examples, and operational guidance are written exclusively in Chinese, and there is no indication that users may choose another language or that the skill is intentionally limited to a Chinese-speaking or China-only compliance context. Under the policy, a language constraint without user opt-in or explicit justification is a natural-language policy violation.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The manifest describes the skill as supporting real-time market data retrieval, technical indicator analysis, caching, and news sentiment analysis. This README adds a substantial separate capability area—financial statement analysis including ROE, debt service, cash flow, R&D spending, PEG, and free cash flow—which is not reflected in the manifest description and materially broadens the skill’s stated purpose.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The manifest focuses on obtaining quotes, technical signals, batch analysis, sentiment monitoring, and caching. The README’s sample output goes further by claiming concrete investment ratings and action recommendations such as '建议买入,逢低加仓', which changes the skill from an analysis utility into an advisory/recommendation system.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The stated purpose is stock analysis, sentiment monitoring, technical indicators, and caching. Mentioning extension to real brokerage/trading interfaces and automated trading introduces a materially different capability with real-world action-taking consequences that is not justified by the declared scope of an analysis skill.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
83% confidence
Finding

The skill advertises capabilities that imply network access, local file writes, and possible environment use, but it does not declare any tool scope or permissions. This is dangerous because users and the host platform cannot accurately constrain or review what the skill may access, increasing the risk of unintended data exposure or unauthorized external communication.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The manifest description and main documentation are written entirely in Chinese and present the skill as a general stock analysis tool, but they do not offer any language or locale choice. Under the policy, forcing a specific language without user opt-in is a natural-language policy violation unless the locale constraint is clearly documented and justified.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% 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 · core/data_fetcher.py (reported line 156)May include surrounding context.

python
return []
            
        try:
            url = "https://api.tavily.com/search"
            headers = {"Content-Type": "application/json"}
            payload = {
                "api_key": self.tavily_api_key,

External Transmission

Medium
Category
Data Exfiltration
Confidence
80% 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 · core/data_fetcher.py (reported line 167)May include surrounding context.

python
"max_results": 20
            }
            
            response = requests.post(url, json=payload, headers=headers, timeout=30)
            if response.status_code == 200:
                data = response.json()
                return data.get('results', [])

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This Python file contains natural-language descriptions entirely in Chinese, beginning with the module docstring and continuing through generated summary strings. Because the skill does not provide any user opt-in, language selection, or justification that it is intended only for a Chinese-language context, it violates the language/locale policy criterion.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The manifest describes a stock analysis tool centered on real-time行情、技术指标分析(MACD/KDJ/RSI/EMA)、缓存和新闻舆情, but this module performs extensive fundamental financial-statement analysis such as ROE、资产负债率、现金流、研发支出、PEG and management/strategy scoring. That is a meaningful capability expansion beyond the declared behavior, not just an implementation detail of technical analysis.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

This code hard-codes Chinese natural-language strings throughout the module, including the main description, generated report text, CLI usage, and disclaimer, without offering any language selection or opt-in. That creates a locale policy issue because the skill effectively mandates a specific language for all users rather than allowing a choice or documenting a justified region-specific restriction.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

This code's natural-language description specifies the module behavior entirely in Chinese, and the generated user-facing report is also hard-coded in Chinese throughout the file. Under the policy rule for language/locale, forcing a specific language without user opt-in is a violation unless a justified region-specific constraint is documented, which is not present here.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The report content, labels, recommendations, and disclaimer are all emitted as Chinese strings, with no mechanism for the user to choose another language. This constitutes a language/locale policy issue because the skill imposes a specific language on end users without opt-in or documented justification.

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 multiple Chinese docstrings, comments, error messages, and CLI usage text, which effectively forces a specific language for users and maintainers. Under the policy, language constraints should either offer user choice or be clearly documented as region- or locale-specific.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This code presents its description, argument help text, and user-facing messages entirely in Chinese, which imposes a specific language on users without any opt-in or alternative locale path. Under the policy, forcing a language without user choice is a natural-language policy violation unless clearly justified as region-specific.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
82% confidence
Finding

The file’s human-facing comments and labels are entirely in Chinese, which indicates a fixed language/locale presentation. Under the stated policy, forcing a specific language without user opt-in can be a natural-language policy violation when no alternative or opt-in is documented.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
82% confidence
Finding

This code file contains natural-language documentation entirely in Chinese ('数据获取模块 - 从公开数据源获取股票数据、新闻、财报等信息') with no indication that language choice is optional. Under the policy rule for language/locale, forcing a specific language without user opt-in can be a violation when no justification or alternative is provided.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

The comment and returned fields suggest dynamic adjustment based on news or analyst forecast data (e.g. '可根据新闻调整', '可接入分析师预测数据'), but the code always returns fixed values like '正面' and fixed growth forecast strings. This documentation signals a capability or behavior that the function does not actually implement.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
91% confidence
Finding

This Python file contains user-facing natural-language descriptions in Chinese, and the module appears oriented around Chinese-language output without any indication that users can opt into another language. The policy requires flagging language or locale constraints when a specific language is forced without user choice or explicit justification.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

The manifest describes stock analysis, technical indicators, news sentiment, and data caching, but does not mention generating and persisting report files to the local filesystem. Writing a dated report file is additional behavior beyond the described analysis-focused scope, even though it is not highly risky.

Content

No source excerpt is available for this finding.