Back to skill

Security audit

7d Stock Analyzer

Security checks for vulnerabilities and agentic risk

Overview

This stock-analysis skill is not visibly malicious, but it needs Review because it presents placeholder scores and investment conclusions as if they were data-derived analysis.

Install only if you are comfortable treating the reports as experimental scaffolding, not reliable investment analysis. Verify any generated scores manually, avoid using it for real trading decisions, and install dependencies in an isolated environment with reviewed/pinned package versions.

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

T08 · Insecure Dependencies

Warning
Location
SKILL.md:4
Finding

Unpinned Third-Party Dependencies Create Supply-Chain Risk

Content
View full analysis

Vulnerability Details

File Location: SKILL.md:4, SKILL.md:119, README.md:30-32
Vulnerability Type: Unpinned dependency installation
Risk Level: Medium

Vulnerable Code

json
metadata: {"clawdbot":{"emoji":"📊","requires":{"bins":["python3"],"env":["QVERIS_API_KEY"]},"install":[{"id":"python-deps","kind":"pip","package":"efinance akshare pandas numpy","label":"Install Python dependencies"}]}}
bash
pip install efinance akshare pandas numpy

Technical Analysis

The Skill installs efinance, akshare, pandas, and numpy without exact version constraints, package hashes, a lock file, or an explicitly trusted package index. Consequently, installation resolves whatever versions are current on the configured Python package index at installation time.

Python package installation can execute package-controlled build logic. The effective installation payload may therefore change after this Skill has been reviewed. Although the package names do not appear to be misspelled and no dependency is confirmed as malicious, the current configuration does not provide reproducible or integrity-verified dependency resolution.

This exposes users to compromised future releases, compromised publisher accounts, dependency confusion through an untrusted package index, and malicious transitive dependencies.

Attack Path

  1. An attacker compromises a declared package, one of its transitive dependencies, or the package index used by the victim.
  2. The attacker publishes a malicious release that still satisfies the unconstrained package name.
  3. A user installs the Skill dependencies using the documented command or automatic Skill installer.
  4. Pip resolves and downloads the malicious release.
  5. Package-controlled build or installation code executes with the privileges of the user running pip.
  6. Malicious code may also execute later when the application imports the affected package.

Impact Assessment

Successful exploitation could ...[truncated 623 chars]

Remediation
View remediation

Remediation Suggestions

  1. Pin every direct dependency to a reviewed exact version.
  2. Generate and commit a lock file that includes all transitive dependencies.
  3. Record cryptographic hashes and install with pip install --require-hashes.
  4. Configure an explicitly trusted package index instead of inheriting an arbitrary environment configuration.
  5. Scan dependencies for known vulnerabilities during development and release.
  6. Review dependency updates before changing locked versions.
  7. Prefer installation in an isolated, unprivileged virtual environment.
  8. Document the exact supported Python and dependency versions.

other

Warning
Location
scripts/analyzers/conclusion.py:39
Finding

Stock-Specific Reports Contain Hard-Coded Scores and Unsupported Conclusions

Content
View full analysis

Vulnerability Details

File Location: scripts/analyzers/conclusion.py:39-54, scripts/analyzers/fundamental.py:73-76, scripts/analyzers/valuation.py:61-64, scripts/analyzers/industry.py:31-52, scripts/analyzers/risk.py:32-51
Vulnerability Type: Misleading financial analysis caused by placeholder logic
Risk Level: Medium

Vulnerable Code

The fundamental score is fixed regardless of the stock or collected data:

python
def _calculate_score(self, details: Dict) -> int:
    return 50

The valuation score is also fixed:

python
def _calculate_score(self, details: Dict) -> int:
    return 50

The conclusion generator assigns the same overall score to every symbol:

python
result['overall_score'] = 58

The risk analyzer assigns a fixed score independently of actual financial, industry, or valuation data:

python
result['score'] = 70

The industry analyzer similarly assigns a fixed score:

python
result['score'] = 60

Technical Analysis

Most non-technical analyzers do not derive their scores and ratings from retrieved stock data. Fundamental and valuation scoring always returns 50, industry scoring always returns 60, risk scoring always returns 70, and the overall conclusion always assigns 58.

The main program creates every analyzer independently:

python
analyzer = analyzer_class(adapters, verbose=args.verbose)
result = analyzer.analyze(args.symbol)

Only the adapter collection is passed to each analyzer. Results from earlier analysis dimensions are not supplied to ConclusionGenerator. The conclusion therefore cannot aggregate fundamental, valuation, technical, industry, or risk results as documented.

As a result, unrelated symbols can receive identical scores and recommendations. The Markdown reporter then formats these placeholder values as a completed stock analysis report, without prominently distinguishing fixed placeholder output from data-derived analysis.

This finding is an ...[truncated 1787 chars]

Remediation
View remediation

Remediation Suggestions

  1. Remove all fixed scores and recommendations from production output.
  2. Return an explicit unavailable or incomplete status when required data is missing.
  3. Pass the completed dimension results into ConclusionGenerator rather than creating it with adapters alone.
  4. Define and document a reproducible scoring formula for every analysis dimension.
  5. Derive each score from validated financial or market data and include source timestamps.
  6. Clearly distinguish measured values, calculated values, assumptions, and unavailable data.
  7. Prevent investment recommendations from being generated when minimum data-quality thresholds are not met.
  8. Add tests proving that materially different input data produces materially different scores.
  9. Add tests ensuring that missing data cannot silently produce neutral or favorable defaults.
  10. Display a prominent placeholder warning for any analysis dimension that remains under development.
  11. Correct the documentation so it does not claim parallel execution, caching, cross-validation, or complete analysis until those capabilities are implemented.
  12. Include the inputs and formula behind each score in the generated report to make conclusions auditable.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • 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
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (29)

Tp4

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

The declared description presents a broad, comprehensive stock-analysis agent with a seven-dimensional framework and multi-source data integration. The supplied code chunk is much narrower: it defines a single FundamentalAnalyzer focused only on three dimensions of fundamental analysis and uses stubbed methods that return hardcoded placeholder values such as 0, '一般', and '数据不足'. The scoring is also simplified to a constant 50. There is no evidence of multi-source integration, no real data retrieval, and no full seven-dimensional analysis in this chunk. This is a material description-behavior mismatch.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The declared description describes a full-featured stock analysis agent with deep analytical capabilities and multi-source data integration. However, the provided code chunk only exposes reporting components via package imports and contains no stock analysis logic, no data source integration, and no agent behavior. This is a materially different primary purpose from the declared description, so it should be flagged as a 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 skill description is presented entirely in Chinese starting from the title, with no indication that users may choose another language or that the skill is intentionally restricted to a Chinese-speaking or China-only compliance context. The policy explicitly calls out language or locale constraints that are imposed without opt-in.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
83% confidence
Finding

The skill metadata declares environment-variable requirements and an install step implying executable code, but it does not define any explicit tool scope or allowed-tools boundary. In an agent setting, missing permission scoping increases the risk of overbroad runtime access, especially when secrets like QVERIS_API_KEY are available and code execution is expected.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The natural-language descriptions and user-facing warning strings are entirely in Chinese, with no indication that language selection is optional or that the skill is intentionally restricted to a Chinese-language context. Under the policy, forcing a specific language without user opt-in can be a locale-policy violation.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The method signature and docstring indicate it retrieves a financial report, with a selectable report_type defaulting to '利润表'. In implementation, report_type is unused and the code always calls ak.stock_financial_analysis_indicator(symbol=symbol), which contradicts the documented intent of fetching a chosen report type.

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 and method descriptions are written only in Chinese, and the installation error message is also hard-coded in Chinese. This imposes a specific language/locale without user opt-in or documented justification, which matches the language-policy violation category.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The module docstrings and user-facing messages are written entirely in Chinese, including warnings and operational prints. This imposes a specific language on users without opt-in or any documented region-specific justification, which matches the language/locale policy violation category.

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 user-facing natural-language strings exclusively in Chinese, beginning with the top-level description '七维分析框架 - 深度股票分析'. Under the stated policy, forcing a specific language without user opt-in is a natural-language policy violation unless the locale restriction is explicitly justified, 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
94% confidence
Finding

The file’s natural-language descriptions and user-facing recommendation strings are entirely in Chinese, indicating the skill is designed to operate in a fixed language. The file does not offer a language choice or document a justified region-specific constraint, which matches the locale policy violation criteria.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The docstring says the conclusion depends on prior analyses, but the implementation ignores upstream results and emits hardcoded scores, ratings, and recommendations. In a stock analysis skill, this can mislead users into acting on fabricated investment guidance presented as analytical output, undermining integrity and creating decision-risk even without code execution or data exfiltration.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The file's user-facing natural language strings, identifiers, and docstrings are consistently Chinese, including the module description, class docstring, property values, and function documentation. Under the policy, forcing a specific language without user opt-in or a clearly justified locale constraint 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

This code’s natural-language strings, including the module docstring, class docstring, method docstring, and user-facing log text, are all hardcoded in Chinese. That creates a locale policy concern because the skill appears to impose a specific language without user opt-in or any documented region-specific justification.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The file's natural-language identifiers and docstrings are entirely in Chinese, including the module description, class docstring, display name, and method docstring. This imposes a specific language/locale in user-visible skill metadata without offering opt-in or documenting 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
95% confidence
Finding

This code embeds the skill name, docstrings, log messages, and analysis labels entirely in Chinese, indicating a fixed language behavior. The policy for natural-language content requires avoiding forced language or locale constraints unless the user is given a choice or the regional limitation is clearly justified.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

This Python file consistently hard-codes Chinese-language titles, section labels, warnings, and docstrings, indicating the skill's reporting behavior is locked to a specific language. The policy allows locale constraints only when the user is given a choice or when the restriction is clearly documented and justified, neither of which appears here.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
82% confidence
Finding

The skill advertises use of external data sources and an API key but does not clearly disclose that user-supplied stock identifiers or analysis inputs may be transmitted to third-party services. This creates a transparency and privacy risk, especially in enterprise or regulated environments where query contents may be sensitive or proprietary.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
90% confidence
Finding

The natural-language content of the skill description and usage guidance is presented entirely in Chinese, which effectively forces a language choice on users. The file does not offer an alternative language or explain that the skill is intentionally restricted to a Chinese-speaking or region-specific audience.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
87% confidence
Finding

The only natural-language description in this file is written in Chinese ("数据适配器模块"), which imposes a specific language for readers without indicating any user choice or documented locale constraint. The policy explicitly calls for flagging language or locale requirements that are forced without opt-in.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
81% confidence
Finding

This code file makes external AKShare calls to retrieve realtime quotes and financial data, which implies network access to a third-party data source. While there are docstrings describing the functions, there is no explicit user-facing warning, logging, or comment disclosing that these methods contact an external service and may transmit request parameters such as stock symbols.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
83% confidence
Finding

This code method fetches real-time quotes via the external efinance library, which implies a network call to a remote data provider. While the docstring describes the function, there is no user-facing warning, confirmation, or logging indicating that external data access will occur.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
86% confidence
Finding

The method calls efinance to retrieve quote history for a provided symbol, which is a network/data-transfer operation involving user input. There is no visible confirmation, logging, or warning in this file that the symbol will be sent to an external market-data provider.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
82% confidence
Finding

This method fetches billboard data through the efinance library, which likely requires remote network access. The code contains no user-facing disclosure, warning, or logging about contacting an external service or transmitting date-query parameters.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

This file uses Chinese in module docstrings, class docstrings, and argument descriptions, which imposes a specific language on users and maintainers. Under the policy, a fixed language is only acceptable when the skill offers language choice or clearly documents a justified locale constraint, neither of which appears here.

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/analyzers/base.py (reported line 68)May include surrounding context.

python
if not hasattr(adapter, method):
            raise AttributeError(f"适配器 {source} 没有方法 {method}")

        return getattr(adapter, method)(**kwargs)

    def combine_data(self, source_priority: List[str] = None) -> Dict[str, Any]:
        """