Back to skill

Security audit

Fund Advisor

Security checks for vulnerabilities and agentic risk

Overview

This fund advisor is not clearly malicious, but it needs review because it can overwrite local portfolio records and persist an API key in local MCP configuration.

Install only if you are comfortable with a Chinese-language fund tool that stores portfolio data locally, overwrites existing holdings on import, modifies ~/.mcporter/mcporter.json, and may persist your Qieman API key in that config. Back up any existing fund-advisor database first, use a scoped or disposable API key if possible, and review dependency installation before running the wrapper.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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
Findings (3)

T09 · Insecure Skill Coding Practices

Warning
Location
tools/src/config.py:54
Finding

API Key Persisted in Plaintext Within an MCP URL

Content
View full analysis
Dict[str, str]: api_key = get_api_key() if not api_key: api_key = "YOUR_API_KEY_HERE" return { "baseUrl": f"https://stargate.yingmi.com/mcp/sse?apiKey={api_key}", "description": "Fund investment toolkit" } ``` ```python config["mcpServers"][self.REQUIRED_MCP_SERVER] = get_qieman_mcp_config() try: with open(self.MCPORTER_CONFIG_PATH, "w", encoding="utf-8") as f: json.dump(config, f, indent=2, ensure_ascii=False) self.results["setup_success"] = True return True except Exception as e: self.results["setup_error"] = str(e) return False ``` ### Technical Analysis The application reads `QIEMAN_API_KEY` from the process environment, interpolates it into the query component of an MCP endpoint URL, and writes the resulting URL to `~/.mcporter/mcporter.json`. The configuration file is created with the default permissions derived from the process umask. The application does not explicitly require owner-only permissions. On systems with a permissive umask or shared home-directory access, other local users or processes may be able to retrieve the credential. Placing credentials in query strings is also unsafe because URLs are commonly included in diagnostic output, proxy logs, exception messages, telemetry, and connection histories. The key may consequently be exposed beyond the configuration file itself. ### Attack Path 1. A user exports a valid `QIEMAN_API_KEY`. 2. The user runs the documented initialization command. 3. `get_qieman_mcp_config()` embeds the key in the `baseUrl` query string. 4. `setup_qieman_mcp_config()` writes that URL to `~/.mcporter/mcporter.json` without enforcing owner-only per ...[truncated 686 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
tools/src/csv_importer.py:143
Finding

Non-Atomic Imports Can Irreversibly Delete Existing Portfolio Data

Content
View full analysis
Remediation
View remediation

T08 · Insecure Dependencies

Warning
Location
scripts/fund-cli.sh:46
Finding

Unpinned Dependencies Are Installed During Normal CLI Setup

Content
View full analysis
"$INSTALL_MARKER" } ``` ```toml dependencies = [ "click>=8.1.0", "rich>=13.0.0", "python-dateutil>=2.8.0", ] ``` ```bash npm install -g mcporter brew tap steipete/tap brew install mcporter ``` ### Technical Analysis The launcher automatically invokes `pip install` when the virtual environment is missing or considered invalid. The Python dependencies use open-ended minimum versions and are not accompanied by a lockfile or hashes. Consequently, the exact code installed can change between executions even if the Skill itself has not changed. The documentation also directs users to install `mcporter` globally through npm or Homebrew without specifying an audited version. Global npm installation increases the effect of a compromised dependency because package lifecycle scripts execute with the invoking user's privileges and the resulting command becomes available system-wide for that user. No evidence was found that the named packages are currently malicious. The confirmed weakness is that installation trusts mutable package-registry state and does not provide reproducible or integrity-verified dependency resolution. ### Attack Path 1. A user invokes `scripts/fund-cli.sh` without an existing valid virtual environment, or follows the documented `mcporter` installation procedure. 2. The package manager resolves the newest versions satisfying the open-ended constraints. 3. A compromised maintainer release, dependency takeover, registry compromise, or malicious transitive dependency is selected. 4. Package build hooks or lifecycle scripts execute during installation. 5. M ...[truncated 780 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (53)

Tp4

High
Category
MCP Tool Poisoning
Confidence
92% confidence
Finding

The skill presents itself mainly as an investment advisory tool, but it also modifies local configuration files, inspects environment state, and executes external commands to initialize MCP connectivity. These side effects expand the trust boundary substantially; users asking finance questions may not expect persistent config changes or command execution on their system.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
93% confidence
Finding

The skill presents itself mainly as an investment advisory tool, but it also modifies local configuration files, inspects environment state, and executes external commands to initialize MCP connectivity. These side effects expand the trust boundary substantially; users asking finance questions may not expect persistent config changes or command execution on their system.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The skill presents itself mainly as an investment advisory tool, but it also modifies local configuration files, inspects environment state, and executes external commands to initialize MCP connectivity. These side effects expand the trust boundary substantially; users asking finance questions may not expect persistent config changes or command execution on their system.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The instructions use mandatory language such as 'you all analysis process and conclusions must...' in Chinese-only guidance, effectively constraining operation to a specific language context without user opt-in. There is no indication that the skill supports language choice or that the locale restriction is required for compliance or regional scope.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The reset command irreversibly clears all holdings immediately, with no confirmation prompt, dry-run mode, or backup safeguard. In a fund portfolio management CLI, accidental invocation or automation misuse can destroy a user's local investment records and materially disrupt analysis, reporting, and subsequent sync operations.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

High
Category
Not specified by scanner
Confidence
93% confidence
Finding

The function documentation says it imports fund holdings but does not disclose that it first deletes all existing holdings. This mismatch is security-relevant because callers, agents, or UI layers may invoke the function assuming additive behavior, leading to silent destructive actions and loss of financial data.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The importer unconditionally calls clear_all_holdings() before processing the CSV, which causes destructive data loss far beyond the expected meaning of 'import'. In a fund-holdings management skill, this is especially dangerous because a malformed, partial, or accidental import can wipe a user's entire portfolio history without warning.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

Clearing all holdings during CSV import without any warning or confirmation creates a high-risk unsafe default. In this financial context, a user or upstream agent can trigger irreversible portfolio deletion through a routine import action, including with bad or incomplete CSV input.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The code performs a destructive bulk delete with no user-facing warning, confirmation, or safeguard before processing the uploaded Excel file. In the context of personal fund-holding management, this makes accidental or adversarial triggering highly damaging because users can lose complete portfolio history without realizing the import is a replacement operation.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
94% confidence
Finding

The skill declares shell, file read/write, and environment-variable dependent behavior but does not constrain tool scope with explicit permissions or allowed-tools. In an agent setting, this increases the chance of unintended command execution, local file modification, or access to sensitive environment values beyond what a user expects from a finance advisory skill.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The activation rule says the skill should be prioritized whenever the user's question falls within covered topics, and the covered topics are very broad finance domains. Overbroad activation can route generic financial conversations into a skill that has shell/file capabilities and persistent data behaviors, increasing the chance of unnecessary access to local data or setup actions.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill instructs importing portfolio files into a local database and states that imports overwrite saved data, but the warning is not prominent enough relative to the action. Because this involves sensitive financial holdings and persistent local storage, users could lose existing records or unknowingly create a sensitive local data store without informed consent.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The instructions recommend persisting the API key in shell startup files, which creates long-lived credential exposure on the host. Without a security warning or safer alternative, this can lead to accidental disclosure through dotfile sharing, backups, shell-history mistakes, multi-user access, or unrelated tools reading inherited environment variables.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
80% confidence
Finding

The document title and all instructional content are written in Chinese, with no indication that other languages are supported or that Chinese is required for a region-specific compliance reason. Under the policy rule for language/locale constraints, this can be treated as a forced locale without user 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

This markdown file is written entirely in Chinese and specifies command/data conventions using Chinese-language instructions, while also allowing bilingual column headers. Under the stated policy, forcing a specific language without user opt-in can be a natural-language policy violation unless the locale constraint is clearly documented and justified, which is not present here.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The document advertises tools that analyze highly sensitive personal financial and household data, including assets, liabilities, income, expenses, and family structure, but provides no privacy handling guidance, consent expectations, minimization rules, or storage/retention constraints. In a financial advisor skill, this omission increases the chance that downstream agents collect or expose unnecessary sensitive data, leading to privacy violations or unsafe handling of regulated financial information.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

User-facing help text, command descriptions, examples, and console output are consistently presented only in Chinese, with no option to select another language or documentation justifying a locale-specific constraint. This can violate a language/locale policy when the skill mandates one language without user opt-in.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
81% confidence
Finding

The file's human-readable docstrings and description are entirely in Chinese, which can amount to an implicit language policy constraint when no alternative or opt-in is offered. The file does not document that the skill is intentionally region-specific or provide a language choice.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The code embeds the API key directly into the request URL query string. Query-string secrets are commonly exposed through logs, browser history, proxy logs, monitoring systems, and error traces, increasing the chance of credential leakage and unauthorized use of the external service.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The module docstrings and user-visible error messages are written exclusively in Chinese, indicating a fixed language choice. There is no indication that users can opt into another language or that the locale restriction is documented as region-specific and justified.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The clear_all_holdings method deletes all records from fund_holdings, which is a destructive operation affecting user data. Although the docstring says it clears holdings, there is no confirmation prompt, logging, or explicit warning to users before the irreversible deletion occurs.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

User-facing messages, status reports, and documentation strings are entirely in Chinese, which imposes a specific language on users without any opt-in or stated regional justification. This can violate organizational language/locale policy when a skill is expected to be language-neutral or to offer a choice.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This code silently creates or overwrites ~/.mcporter/mcporter.json and injects an MCP server configuration without any explicit user confirmation at the point of modification. In an agent skill context, modifying global user tool configuration can have security consequences by changing future tool behavior, persisting access settings, or redirecting requests to an attacker-controlled MCP endpoint if upstream config generation is compromised.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

The connection test launches an external program that performs a real MCP/API call, but the function provides no explicit disclosure or consent mechanism indicating that an outbound service interaction will occur. In a financial assistant skill, undisclosed external calls can expose environment-derived credentials or metadata and may surprise users who expect a local-only environment check.

Content

No source excerpt is available for this finding.

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · tools/src/env_checker.py (reported line 117)May include surrounding context.

python
"--args", json.dumps({"fundCodes": ["000001"]}),
                "--output", "json"
            ]
            result = subprocess.run(
                cmd,
                capture_output=True,
                text=True,

Static analysis

No suspicious patterns detected.