Back to skill

Security audit

天枢股票分析系统

Security checks for vulnerabilities and agentic risk

Overview

This stock-analysis skill is mostly coherent, but it tells agents to disable TLS checks while fetching live financial data, which makes the resulting advice too easy to tamper with.

Install only if you are comfortable with the skill contacting Tencent Finance for stock quotes, and treat its ratings or operation suggestions as informational rather than trading advice. The publisher should remove the TLS-disabling instructions before this is considered safe for routine financial analysis.

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

Warning
Location
SKILL.md:82
Finding

TLS Certificate and Hostname Verification Disabled

Content
View full analysis

Vulnerability Details

File Location: SKILL.md:82-83
Vulnerability Type: T09: Insecure Skill Coding Practices
Risk Level: Medium

python
ssl_context.check_hostname = False
ssl_context.verify_mode = ssl.CERT_NONE

Technical Analysis

The documented network-check procedure disables both TLS certificate validation and hostname verification. If this configuration is used for the Tencent Finance API request, the client will no longer authenticate the remote server.

The example is incomplete because it does not show the initialization or use of ssl_context. Nevertheless, the explicitly documented configuration is unsafe: applying it to the HTTPS request would allow any certificate to be accepted, including a self-signed or attacker-controlled certificate.

An attacker with a network interception capability could impersonate the financial-data endpoint and supply fabricated market information. No remote code execution or privilege escalation is demonstrated; the affected security property is the integrity and authenticity of externally retrieved data.

Attack Path

  1. A user invokes the skill to analyze a stock.
  2. The implementation follows the documented procedure and uses an SSL context with certificate and hostname verification disabled.
  3. An attacker positioned on the network, or controlling a relevant proxy or routing component, intercepts the HTTPS connection.
  4. The attacker presents an untrusted certificate, which the client accepts because verification is disabled.
  5. The attacker returns manipulated stock prices, valuation metrics, or trading-volume data.
  6. The skill processes the forged response and generates a misleading score, rating, or trading recommendation.

Impact Assessment

Successful exploitation could compromise the integrity of all financial data retrieved through the affected request and consequently alter the generated analysis and investment guidance. The scope ...[truncated 190 chars]

Remediation
View remediation

Remediation Suggestions

  • Remove the assignments that disable hostname and certificate verification.

  • Use Python's default verified TLS context:

    python
    import ssl
    import urllib.request
    
    ssl_context = ssl.create_default_context()
    request = urllib.request.Request(
        "https://qt.gtimg.cn/q=sh603127",
        headers={"User-Agent": "TianShu-Stock-Analysis/1.0"},
    )
    
    with urllib.request.urlopen(
        request,
        context=ssl_context,
        timeout=10,
    ) as response:
        data = response.read()
    
  • Do not provide an insecure fallback that retries requests with certificate validation disabled.

  • Configure an explicit connection timeout to prevent indefinite blocking.

  • Validate the response structure, expected stock identifier, encoding, field count, and numeric ranges before using the data.

  • Fail closed and report a data-source error when TLS validation or response validation fails.

  • If a private certificate authority is required in a controlled environment, install and trust that specific authority rather than disabling verification globally.

Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (3)

Missing User Warnings

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The network-check example disables certificate validation and hostname verification, which defeats TLS protections and allows man-in-the-middle interception or spoofing of the market-data endpoint. In a financial analysis skill, tampered data could directly alter recommendations or mislead users into making harmful trading decisions.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
77% confidence
Finding

The skill is written entirely in Chinese and specifies a Chinese trigger phrase for use, but nowhere indicates that language choice is optional or that the tool is intentionally limited to a Chinese-only regional context. This can violate language/locale policy when a skill imposes a specific language without user opt-in.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The skill explicitly instructs the agent to fetch live market data from an external Tencent Finance API, but it does not warn the user that their request will trigger outbound network access to a third-party service. This creates a transparency and privacy risk because user prompts and stock selections may be processed in a way the user did not expect, and it can also introduce reliability and compliance concerns tied to external content.

Content

No source excerpt is available for this finding.