Back to skill

Security audit

Fin Advisor

Security checks for vulnerabilities and agentic risk

Overview

This fund-advice skill is mostly on-purpose, but it needs Review because it stores financial preference data and uses shell/external-service patterns without enough scoping, consent, or transport limits.

Install only if you are comfortable with a Chinese-language fund assistant that may write profile information to USER.md and call external fund-data services. Before use, require explicit consent for any saved financial preferences, restrict or remove the slot-filling service URL/token path, enforce HTTPS and trusted hosts, and prefer structured MCP invocation over shell command strings for user-provided fund names or search text.

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 (3)

T09 · Insecure Skill Coding Practices

Error
Location
SKILL.md:94
Finding

Shell Command Injection Through User-Controlled MCP Arguments

Content
View full analysis
.<工具名> <参数名>:"<参数值>" --output json ``` Examples demonstrating direct argument interpolation: ```bash mcporter call fund-diagnosis.fundIntro fundObject:"001048" --output json mcporter call fund-diagnosis.fundStagePerformance fundObject:"富国新兴产业" --output json mcporter call fund-investments.conditionSelectFund condition:"医药板块基金" --output json mcporter call fund-investments.buyerInvestmentAdvisor scene:"富国新兴产业股票型证券投资基金" --output json mcporter call public-opinion-explanation.queryPublicOpinionNews keyWords:"降息" --output json mcporter call ai-search-all.all_search query:"富国新兴产业基金" --output json ``` ### Technical Analysis The Skill instructs the agent to build shell commands by placing fund names, search keywords, conditions, and other potentially user-controlled values inside a Bash command string. Double quotation marks alone do not provide safe shell argument handling. Shell constructs such as command substitution remain active inside double-quoted strings. For example, if a user-supplied search value containing `$(malicious-command)` is inserted into the documented template, Bash may execute the substituted command before invoking `mcporter`. Embedded quotation marks can also terminate the intended argument and introduce shell operators. The issue arises because structured tool parameters are converted into executable shell syntax without a defined validation, escaping, or safe argument-passing mechanism. ### Attack Path 1. An attacker submits a crafted fund name, keyword, or search condition containing shell syntax. 2. The agent follows the documented command template and interpolates the value into a Bash command. 3. Bash parses command substitutions, quotation marks, redirections, or command separators in the attacker-controlled value. 4. The injected command ...[truncated 518 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/slot-filling.sh:14
Finding

Arbitrary Shell Execution Through Sourced Configuration File

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/slot-filling.sh:83
Finding

Bearer Token and Financial Query Exposure Through Unrestricted HTTP Endpoint

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (16)

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

声明描述的是面向终端用户的基金投顾能力,重点在基金分析、比较、推荐和交易决策支持。但代码块只实现了一个底层 slot-filling 组件:解析命令行参数,读取环境变量配置,调用远程服务进行实体识别,将 span 映射为 entity_name/entity_code/entity_type/score,并把结果写入 filled_params;在 mock 模式下还固定返回基金代码、基金名、日期和周期。该行为更像“基金场景的工具参数补全/实体抽取辅助脚本”,而不是完整的基金投顾助手。虽然场景与基金相关,但主要用途与宣称能力存在实质差异,因此应判定为描述与实际行为不匹配。

Content

No source excerpt is available for this finding.

Scope Creep

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The manifest allows only Bash(mcporter:) and Read(.md), but the instructions require using Edit to modify USER.md. This capability mismatch can cause the agent to attempt unauthorized state changes, fail unpredictably, or encourage policy/capability bypass patterns if an implementation tries to emulate editing through other means.

Content

No source excerpt is available for this finding.

Lp1

High
Category
MCP Least Privilege
Confidence
75% confidence
Finding

The skill uses 'shell' capability that is not listed in its permissions. This may indicate deceptive intent or missing permission declarations.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The manifest description and all user-facing initialization text are written in Chinese, and the skill instructs the agent to begin conversations with a Chinese prompt. There is no indication that the user may choose another language, which is a language/locale policy concern under the natural-language policy rules.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The document is entirely written as mandatory compliance instructions in Chinese and repeatedly uses imperative phrasing such as '必须遵循本文档的合规要求'. There is no indication that users may choose another language or locale, which creates a language/locale policy concern under the natural-language policy rule.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The file is entirely framed as a Chinese-language knowledge and response guide, but it does not state that language choice is optional or limited to a justified region-specific context. Under the language/locale policy, forcing a specific language without user opt-in is a natural-language policy concern.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The instruction to accumulate a user profile in USER.md introduces a durable natural-language memory channel that may retain sensitive financial-preference data beyond the immediate conversation. That raises leakage risk to later prompts, operators, or other workflows and is more dangerous here because the skill handles personalized investment-related information.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill explicitly instructs the agent to record user risk preference, investment experience, and interests into USER.md without any consent, notice, minimization, or retention controls. In a financial-advice context, these details can be sensitive profile data, so persisting them creates privacy, compliance, and unintended cross-session disclosure risk.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
85% confidence
Finding

The document is written as a prescriptive response-format guide entirely in Chinese and describes answer structure as general guidance, with no indication that language choice depends on user preference or a region-specific context. This can constitute a language/locale policy issue because it implicitly forces one language without opt-in.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The persona hardcodes Chinese-language behavior and offers no user choice, which can override or conflict with a user's preferred language. In a financial advisory context, language mismatch can reduce comprehension of risk disclosures, product details, or transaction-related guidance, increasing the chance of user misunderstanding.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This persona file hard-codes Chinese-only communication preferences and user address style without offering any user language choice or fallback. In a financial advisory skill, that can cause mismatches with user expectations, reduce comprehension for non-Chinese speakers, and increase the risk that important risk disclosures or transaction-related guidance are misunderstood.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The persona file hard-codes Chinese-only interaction patterns, including Chinese honorifics and example responses, without indicating any fallback to the user's preferred language. In a financial advisory skill, this can cause user misunderstanding of investment analysis or recommendations when the user is not a Chinese speaker, increasing the risk of misinterpretation in a high-stakes domain.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

标题“工具使用参考”本身不是问题,但整份文档仅以中文给出操作说明,且未说明这是面向特定中文场景或允许用户选择其他语言。根据规则,强制单一语言且无用户 opt-in 的自然语言说明属于语言/locale 策略风险。

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
94% confidence
Finding

The curl POST performs external transmission of user-supplied query content and associated metadata to a configurable remote service. Because the destination is entirely environment-controlled and the script does not validate scheme, host, or certificate expectations beyond default curl behavior, a misconfiguration or hostile deployment could redirect sensitive financial prompts and tokens to an attacker-controlled endpoint.

Content

Scanner excerpt · scripts/slot-filling.sh (reported line 79)May include surrounding context.

sh
--argjson threshold "${SLOT_THRESHOLD:-0.8}" \
  '{traceId: $trace, query: $query, indexName: $index, scene: $scene, vectorStoreType: "es", threshold: $threshold}')

RESPONSE=$(curl -s -X POST "${SLOT_SERVICE_URL}" \
  -H "Content-Type: application/json; charset=utf-8" \
  -H "authorization: Bearer ${SLOT_SERVICE_TOKEN:-}" \
  -d "$PAYLOAD" \

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The script sends the user-derived query and a bearer token to an external service endpoint defined by environment variable, with no built-in trust boundary enforcement, allowlist, or user-visible consent mechanism. In a financial advisory skill, queries may contain sensitive investment interests or identifiers, so exfiltration to an unexpected or misconfigured endpoint increases privacy and credential exposure risk.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
87% confidence
Finding

The script's natural-language comments and parameter descriptions are entirely in Chinese, including domain defaults such as the scene value. There is no indication that the skill is intentionally region-specific or that users may choose another language, which can conflict with language/locale choice policy.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.