Back to skill

Security audit

stock-diagnosis

Security checks for vulnerabilities and agentic risk

Overview

This skill is a disclosed Eastmoney-backed stock diagnosis helper, with manageable privacy considerations around API use and saved reports.

Install only if you are comfortable sending each stock question to Eastmoney's service with your EM_API_KEY. Use a revocable, scoped key if available, avoid putting sensitive personal context in stock questions, and run with --no-save when you do not want Markdown reports retained locally.

Vulnerability Patterns
  • 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
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Taint TrackingDirect Taint Flow, Variable-Mediated Taint Flow, Credential Exfiltration Chain
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (6)

Tainted flow: 'req' from os.environ.get (line 129, credential/environment) → urllib.request.urlopen (network output)

Critical
Category
Data Flow
Content
)

    try:
        with urllib_request.urlopen(req, timeout=TIMEOUT_SECONDS) as resp:
            raw_body = resp.read().decode("utf-8", errors="replace")
    except urllib_error.HTTPError as exc:
        err_body = exc.read().decode("utf-8", errors="replace") if exc.fp else ""
Confidence
90% confidence
Finding
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.

Lp3

Medium
Category
MCP Least Privilege
Confidence
92% confidence
Finding
The skill requires an environment secret, performs network access to an external API, and can write files, but it declares no explicit tool scope or permission boundaries. This creates an unnecessary trust gap: a caller or platform may grant broader capabilities than intended, making secret exposure, unintended outbound requests, or unsafe file writes harder to constrain and audit.

Context-Inappropriate Capability

Medium
Confidence
89% confidence
Finding
The code requires an environment API key and sends user questions to an external remote service, but this network exfiltration capability is not evident from the manifest description. In this skill context, users may reasonably expect local analysis logic rather than silent third-party transmission of their prompts, making the mismatch a meaningful security and privacy concern.

Description-Behavior Mismatch

Medium
Confidence
92% confidence
Finding
The skill persists stock-diagnosis output to local Markdown files by default, even though its described behavior is to return a structured report. This creates unnecessary local data retention, which can leak user prompts, generated analysis, or sensitive usage context to other local processes or future users of the environment.

Missing User Warnings

Medium
Confidence
94% confidence
Finding
The skill saves analysis output to disk by default without warning the user. In a conversational skill, silent persistence increases privacy risk because user inputs and generated financial analysis may remain on disk beyond the session and be accessible to others with filesystem access.

Natural-Language Policy Violations

Low
Confidence
91% confidence
Finding
The description states the skill returns a structured Markdown diagnosis report in Chinese for A-share stock queries, without indicating that users can choose another language or opt into this locale restriction. This is a natural-language locale policy concern because the skill appears to impose a specific language by default.

Static analysis

No suspicious patterns detected.