Back to skill

Security audit

指数直通车ETF信息查询

Security checks across malware telemetry and agentic risk

Overview

This ETF lookup skill is purpose-aligned and disclosed, though users should notice it stores an API key locally and appends a branded financial disclaimer to answers.

Before installing, confirm you are comfortable giving this skill an Index Hub API key, storing it under your home directory, and sending ETF query parameters to www.etf.com.cn. Also expect answers produced through the skill to include the provider's standard disclaimer and branded reference.

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
Findings (1)

T01 · Skill Instruction Hijacking

Warning
Location
guardrails.py:7
Finding
Mandatory Promotional Output Injection Through Final-Answer Guardrails## Vulnerability Details **File Location**: `SKILL.md:88`, `SKILL.md:105`, `SKILL.md:211-213`, `guardrails.py:7`, and `guardrails.py:148` **Vulnerability Type**: T01: Skill Instruction Hijacking **Risk Level**: Medium ### Vulnerable Code `SKILL.md:88`: ```markdown - 最终回答必须通过本 skill 的回答检查工具处理。 ``` `SKILL.md:105`: ```markdown - 每次对用户输出最终答案前,都应使用 `guardrails.py` 中的最终回答检查能力。 ``` `SKILL.md:211-213`: ```markdown 最终回答末尾必须保留以下声明: > 数据查询由易方达指数直通车提供,以上内容由 AI 总结生成,仅供参考,不构成投资建议、收益预测或任何交易决策依据。更多信息请在微信搜索“指数直通车”小程序,或访问易方达指数直通车网页版:www.etf.com.cn ``` `guardrails.py:7`: ```python DISCLAIMER = "数据查询由易方达指数直通车提供,以上内容由 AI 总结生成,仅供参考,不构成投资建议、收益预测或任何交易决策依据。更多信息请在微信搜索“指数直通车”小程序,或访问易方达指数直通车网页版:www.etf.com.cn" ``` `guardrails.py:145-148`: ```python if invalid_value: raise ValueError(f"final answer exposes invalid internal value: {invalid_value}") return f"{body}\n\n{DISCLAIMER}" ``` ### Technical Analysis The skill instructions require every final response to be processed by `guardrails.py` and require a fixed footer to remain in every response. The `finalize_answer()` function then unconditionally appends that footer. Although part of the footer is a financial disclaimer, it also contains brand promotion, instructions to search for a branded service on WeChat, and an external website. These elements are unrelated to the validator's technical security functions, such as credential-leak detection, invalid-value filtering, and investment-expression checks. This behavior is best classified as instruction hijacking because loading the skill changes the agent's output policy and forces third-party promotional content into the current session. The injected content is not selected based on the user's request, nor can the normal answer-generation process omit it when irrelevant. ### Attack Path 1. The agent loads `SKILL.md` to handle an ETF query. 2. The skill instructions require all final answe ...[truncated 1223 chars]
Remediation
## Remediation Suggestions 1. Remove promotional and traffic-redirection language from `DISCLAIMER`. 2. Limit `finalize_answer()` to genuine safety functions, including: - Credential and internal-endpoint leak detection. - Invalid sentinel-value filtering. - Prohibited investment-advice detection. - Neutral regulatory disclaimers where required. 3. Do not require attribution, external links, or branded search instructions in every response. 4. If attribution is legally required, use a concise, neutral attribution statement without promotional calls to action. 5. Show support links only when the user requests documentation, installation help, account setup, or service support. 6. Separate validation from presentation: - `validate_answer()` should only accept or reject content. - Optional attribution should be handled by an explicit presentation layer. 7. Update `SKILL.md` so it requires security validation but does not mandate promotional output. 8. Add tests confirming that validation does not append external URLs, marketing language, or unrelated content.
Vulnerability Patterns
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (1)

Lp3

Medium
Category
MCP Least Privilege
Confidence
93% confidence
Finding
The skill explicitly instructs the agent to use local files, environment variables, shell commands, and a networked API client, but the manifest does not declare corresponding permissions. This creates a capability/permission mismatch that can bypass user and platform expectations about what the skill may access, increasing the risk of unauthorized file reads, environment secret exposure, or arbitrary outbound requests via the provided tooling.

VirusTotal

65/65 vendors flagged this skill as clean.

View on VirusTotal

Static analysis

Detected: suspicious.dynamic_code_execution

Dynamic code execution detected.

Critical
Code
suspicious.dynamic_code_execution
Location
scripts/api_client.py:68