Back to skill

Security audit

Nio Enhanced Analysis

Security checks for vulnerabilities and agentic risk

Overview

This skill is not system-malware, but it presents simulated NIO market data as real-time analysis and turns it into actionable trading recommendations.

Review before installing. Treat this as a demo or toy analyzer unless the author replaces the simulated data with verifiable market and news sources, labels generated reports as simulated, and avoids concrete trading recommendations from mock inputs. Do not rely on its output for financial decisions.

Vulnerability Patterns
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (1)

T09 · Insecure Skill Coding Practices

Error
Location
analyze_nio.py:14
Finding

Synthetic market data is presented as real-time analysis and used for financial recommendations

Content
View full analysis

Vulnerability Details

File Location: analyze_nio.py:14-220; supporting documentation at SKILL.md:13-16, 61-65
Vulnerability Type: Misrepresentation of randomized and hard-coded financial data
Risk Level: High

Evidence

The reported US and Hong Kong prices are generated from fixed values plus pseudorandom variation rather than retrieved from a market-data provider:

python
current_price = 6.30 + random.uniform(-0.2, 0.2)
change = current_price - 6.30
change_percent = (change / 6.30) * 100
python
current_price = 48.70 + random.uniform(-1.0, 1.0)
change = current_price - 48.70
change_percent = (change / 48.70) * 100

Technical indicators and price levels are also fixed or derived from fixed thresholds:

python
if market_type == "us":
    support_levels = [6.00, 5.80, 5.50]
    resistance_levels = [6.50, 6.80, 7.00]
    ma_20 = 6.20
    ma_50 = 6.00
    rsi = 58 if price > ma_20 else 42
else:
    support_levels = [47.00, 45.50, 44.00]
    resistance_levels = [50.00, 52.00, 55.00]
    ma_20 = 48.00
    ma_50 = 46.50
    rsi = 62 if price > ma_20 else 45

Analyst, social-media, and institutional sentiment values are hard-coded:

python
return {
    "analyst_ratings": {
        "buy": 12,
        "hold": 8,
        "sell": 3,
        "average_target": 7.50 if random.random() > 0.5 else 7.20,
        "upside_potential": "19%" if random.random() > 0.5 else "15%"
    },
    "social_sentiment": {
        "twitter_bullish": 65,
        "twitter_bearish": 25,
        "twitter_neutral": 10,
        "trending_topics": ["#NIO", "#EVstocks", "#蔚来"]
    },
    "institutional_activity": {
        "net_buying": "轻度净买入",
        "major_buyers": ["BlackRock", "Vanguard", "Fidelity"],
        "options_activity": "看涨期权活跃度增加"
    }
}

These synthetic inputs directly determine financial recommendations:

python

...[truncated 3211 chars]
Remediation
View remediation

Remediation Suggestions

  1. Replace randomized and hard-coded market values with authenticated, documented market-data and news APIs.
  2. Record the provider, instrument identifier, retrieval time, exchange time, and source URL or API endpoint for every externally obtained value.
  3. Validate response status, schema, instrument identity, currency, trading session, and data freshness before producing analysis.
  4. Fail closed when authoritative data is unavailable. Do not issue buy, hold, reduce, target-price, stop-loss, or position-sizing recommendations from simulated fallback data.
  5. If simulation is intentionally retained for demonstrations or tests, require an explicit simulation flag and prominently mark every console and JSON report with fields such as "simulated": true and "not_real_time": true.
  6. Separate demonstration fixtures from production logic so that synthetic news, analyst ratings, and institutional claims cannot enter production reports.
  7. Update SKILL.md to accurately distinguish implemented sources from planned integrations and remove unsupported real-time claims.
  8. Add automated tests that reject reports labeled as real-time when they lack verifiable source metadata or contain simulated inputs.
  9. Consider removing direct financial recommendations unless the inputs are authoritative, sufficiently fresh, and accompanied by clear methodology and limitations.
  10. Modify run_analysis.sh to execute the analyzer only once per invocation; its current two executions can produce inconsistent randomized results in the report and log.
Vulnerability Patterns
  • 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
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
Findings (12)

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
70% confidence
Finding

Without declared permissions the skill's intent is opaque and cannot be validated.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The natural-language content, including the description, commands, and usage guidance, is presented only in Chinese. Under the policy, forcing a specific language without user opt-in or a documented region-specific justification is a language/locale policy violation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

This Python skill’s natural-language interface, descriptions, and outputs are entirely in Chinese, including the module description and user-facing reporting text. The file does not provide any opt-in, fallback, or documented rationale for restricting interaction to Chinese, which can violate language/locale policy requirements.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill advertises real-time price, technical analysis, and sentiment analysis, but the implementation generates simulated/randomized values instead of obtaining live market data. This can mislead users into believing the output is current and trustworthy, which is especially risky because the script also produces trading recommendations based on fabricated inputs.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The news sentiment section is presented as if it reflects current fetched news, but it is derived from a fixed hardcoded list. In a financial-analysis skill, this creates deceptive output that may cause users to act on stale or fictional market context, amplifying the risk of harmful financial decisions.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The skill provides a concrete trading recommendation, target price, stop loss, and position sizing without an explicit financial-risk disclaimer or warning that the content is informational rather than personalized investment advice. In a financial-analysis context, this increases the chance that users treat the output as authoritative advice and make risky trading decisions without understanding uncertainty, suitability, or loss potential.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

This JSON file presents all substantive labels, analysis fields, and recommendations in Chinese, indicating a fixed language/locale with no opt-in or alternative. Under the policy rule, forcing a specific language without user choice is a natural-language locale violation unless clearly justified as region-specific.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The file contains a direct buy recommendation, target price, stop loss, and position sizing without any visible activation constraints, suitability checks, or disclaimers limiting it to informational use. In an agent skill context, this can be surfaced broadly to users as actionable financial advice, increasing the risk of inappropriate or unsafe trading decisions if consumed out of context.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Low
Category
Not specified by scanner
Confidence
82% confidence
Finding

The manifest describes an analysis skill, with no indication that it persists results to disk. The code always saves a timestamped JSON report locally, which is additional behavior beyond simply producing analysis output.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
89% confidence
Finding

This JSON file contains user-facing natural-language fields such as market analysis, recommendations, and risk descriptions entirely in Chinese. Under the policy, forcing a specific language without user opt-in can be a locale/language policy violation when no alternative or opt-in is provided.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

The file presents key user-facing analytical content in Chinese, including market labels, trend descriptions, sentiment summaries, and the final recommendation, without any indication of user language selection or locale opt-in. This can violate language/locale policy when a skill forces one language by default rather than offering a choice or documenting a justified regional constraint.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
80% confidence
Finding

This JSON presents core analysis fields and recommendations primarily in Chinese while also using English keys and sentiment labels, with no indication that the language choice is optional or user-selected. That can violate a language/locale policy when a skill forces a specific language presentation without explicit opt-in.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.