Back to skill

Security audit

investment-framework-bundle

Security checks for vulnerabilities and agentic risk

Overview

This stock-analysis prompt bundle is mostly coherent, but it uses overbroad triggers, gives concrete trading guidance, and includes an unscoped instruction to save reports into agent memory.

Install only if you intentionally want a Chinese-first stock-research prompt that may produce concrete trading suggestions. Before using it, require explicit invocation, treat outputs as informational rather than personalized financial advice, verify all market data independently, and disable or override the memory-saving instruction unless you choose a scoped storage location.

Vulnerability Patterns
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • 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
Findings (1)

T02 · Agent Memory Poisoning

Warning
Location
v3-original.md:208
Finding
Unscoped Persistence of Generated Investment Reports in Agent Memory## Vulnerability Details **File Location**: `v3-original.md`, lines 208–212 **Vulnerability Type**: Persistent agent-state contamination **Risk Level**: Medium ### Vulnerable Instruction ```markdown ## Execution Discipline - Save progress every 30 minutes - If blocked, skip the blocked item and continue - Store the final output in the memory directory ``` The snippet above is an English rendering of the original instruction at the cited location. ### Technical Analysis The skill directs the agent to save intermediate progress periodically and place its final output in the agent's persistent `memory` directory. Persisting an investment report is not necessary to perform the skill's declared analytical function. The instruction does not define a filename, storage namespace, retention period, content-validation process, or requirement for user consent. Because the report is generated from user-supplied investment context, inaccurate or manipulated content may be written into persistent state. If later sessions consume that state, stale or attacker-influenced financial conclusions could affect future responses. The primary `SKILL.md` does not disclose this persistence behavior, making it unexpected relative to the skill's stated workflow. This is categorized as agent memory poisoning because untrusted, generated content is directed into long-term agent storage. The instruction does not explicitly write new behavioral rules, so the demonstrated impact is limited to persistent state contamination rather than confirmed control of future agent instructions. ### Attack Path 1. A user invokes the V3 investment-analysis workflow. 2. The user supplies stock information, assumptions, or other context that influences the generated report. 3. The skill instructs the agent to save progress and store the final report in the persistent memory directory. 4. The generated, user-influenced content remains available across sessions. ...[truncated 720 chars]
Remediation
## Remediation Suggestions 1. Remove the instruction to store final output in the agent's memory directory. 2. Return reports directly to the user by default rather than persisting them. 3. If file persistence is requested, require explicit user confirmation and use a user-approved, task-scoped destination. 4. Generate a unique, sanitized filename within a dedicated namespace to prevent collisions or path manipulation. 5. Apply content validation and prevent generated reports from being interpreted as agent instructions. 6. Define retention and deletion policies for saved reports. 7. Avoid periodic background saves unless the runtime provides a narrowly scoped, user-visible workspace. 8. Document all persistence behavior in `SKILL.md`, including what is stored, where it is stored, and how users can delete it.
Vulnerability Patterns
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • 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
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (8)

Vague Triggers

High
Confidence
97% confidence
Finding
The V1 trigger list includes very broad, everyday phrases such as '帮我分析', '机会', and '交易', plus '任何金融标的讨论', which can cause the skill to activate on routine conversation rather than explicit user intent. In an investment skill, unintended activation is risky because it can steer ordinary discussion into structured trading guidance and recommendations without clear consent or context.

Vague Triggers

High
Confidence
98% confidence
Finding
The trigger conditions are extremely broad, including effectively any financial instrument discussion, which can cause the skill to activate without clear user intent. In an agent setting, this can override normal conversational boundaries, inject unsolicited investment workflow behavior, and increase the chance of inappropriate financial guidance being applied in contexts the user did not explicitly request.

Missing User Warnings

High
Confidence
97% confidence
Finding
The skill provides direct buy/avoid recommendations, price targets, and timing suggestions without any warning, suitability check, or disclaimer that the content is investment-oriented. Because financial decisions can cause real monetary loss, presenting actionable advice as default output materially raises harm, especially when paired with authoritative framing like '已验证' and '华尔街-grade' analysis.

Natural-Language Policy Violations

Medium
Confidence
83% confidence
Finding
The description and body impose a bilingual Chinese-first presentation, including Chinese headings, trigger phrases, and analysis templates, but do not state that language selection is optional or user-controlled. Under the policy, forcing a specific language or locale without opt-in is a natural-language policy concern.

Vague Triggers

Medium
Confidence
87% confidence
Finding
The V3 trigger condition combines broad phrases like 'AI产业链' and '深度投研' with an unclear prerequisite ('V2多头胜出且涉及AI相关行业'), making it ambiguous when the deepest analysis mode should activate. This can lead to premature or inconsistent escalation into high-authority stock selection and operation advice, increasing the chance of overconfident or unsolicited financial recommendations.

Natural-Language Policy Violations

Medium
Confidence
93% confidence
Finding
The skill content is written in Chinese and strongly frames the role and workflow in that locale without any indication of checking the user's preferred language first. While not directly a security flaw, forced locale behavior can degrade user comprehension, cause misunderstandings in high-stakes financial contexts, and increase the risk of users acting on advice they do not fully understand.

Vague Triggers

Medium
Confidence
92% confidence
Finding
The trigger phrases are generic enough to activate during ordinary discussions about AI, research, or investing, which can cause the skill to run outside the user's intended context. In a finance-focused skill that gives concrete security selections and trading cues, accidental invocation increases the chance of unsolicited high-stakes advice being surfaced.

Natural-Language Policy Violations

Low
Confidence
82% confidence
Finding
This markdown file contains natural-language instructions exclusively in Chinese, and the example invocation is also Chinese-only. Under the policy rule, forcing a specific language without opt-in can be a locale/language policy violation when no user choice or justification is provided.

Static analysis

No suspicious patterns detected.