Back to skill

Security audit

Noah Stock Market

Security checks for vulnerabilities and agentic risk

Overview

The skill is partly a market-data helper, but it also includes private wealth and asset queries plus broad token handling that users should review before installing.

Install only if you intend this skill to access both market data and potentially private wealth or asset data through the configured Noah API token. Use a dedicated, least-privileged read-only token if possible, keep the base URL fixed to the documented production host, and do not use a credential that also allows trading or broader account actions.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • 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

Error
Location
scripts/quote_client.py:37
Finding

Bearer Token Transmission to an Unrestricted API Destination

Content
View full analysis
Dict[str, str]: return { 'Authorization': f'Bearer {self.token}', 'Accept': 'application/json', } def get(self, path: str, params: Optional[Dict[str, Any]] = None) -> Dict[str, Any]: url = urljoin(self.base_url, path.lstrip('/')) resp = requests.get(url, headers=self._headers(), params=params or {}, timeout=self.timeout) return self._normalize_response(resp) def post(self, path: str, payload: Optional[Dict[str, Any]] = None) -> Dict[str, Any]: url = urljoin(self.base_url, path.lstrip('/')) resp = requests.post(url, headers={**self._headers(), 'Content-Type': 'application/json'}, json=payload or {}, timeout=self.timeout) return self._normalize_response(resp) ``` ### Technical Analysis The API destination is accepted from the `NOAH_API_BASE_URL` environment variable or the constructor without validating its scheme, hostname, port, or trust relationship. The client then unconditionally attaches the bearer credential to every GET and POST request. The documented producti ...[truncated 1677 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/quote_client.py:13
Finding

Shared Temporary-Directory Configuration Poisoning

Content
View full analysis
None: if not path.exists(): return for line in path.read_text(encoding='utf-8').splitlines(): line = line.strip() if not line or line.startswith('#') or '=' not in line: continue key, value = line.split('=', 1) os.environ[key.strip()] = value.strip() for _env_file in SECRETS_FILES: load_env_file(_env_file) ``` ### Technical Analysis In the audited directory layout, `Path(__file__).resolve().parents[3]` resolves to `/tmp`, not the project or workspace root. Consequently, the first configuration path becomes: ```text /tmp/.secrets/noah-market.env ``` This is a predictable location under a shared temporary directory. A local attacker may be able to create `/tmp/.secrets` and its configuration file before the Skill runs. The loader performs no ownership, file-type, symlink, or permission checks and imports every key found in the file into `os.environ`. The home-directory configuration is loaded afterward and can overwrite matching keys when present. However, poisoning remains exploitable when the home configuration is absent or does not redefine the attacker-controlled key. In particular, an attacker can set `NOAH_API_BASE_URL` while relying on a token already present in the process environment. Because the network client subsequently trusts `NOAH_API_BASE_URL` and sends the bearer token to that destination, this path-resolution error provides a direct route to credential exfiltration. ### Attack Path 1. A local attacker creates `/tmp/.secrets/noa ...[truncated 1213 chars]
Remediation
View remediation

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
scripts/run_query.py:134
Finding

Sensitive Wealth Queries Exceed the Skill's Declared Market-Data Scope

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • System Prompt LeakageDirect Leakage, Indirect Extraction, Tool-Based Exfiltration
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (62)

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The skill advertises account/asset summary functions and analyst-style US analysis while presenting itself primarily as a market-data-only tool. Even if read-only, these functions expand the sensitivity and decision-support profile of the skill and can bypass user expectations about what data will be accessed.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The skill advertises account/asset summary functions and analyst-style US analysis while presenting itself primarily as a market-data-only tool. Even if read-only, these functions expand the sensitivity and decision-support profile of the skill and can bypass user expectations about what data will be accessed.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The skill advertises account/asset summary functions and analyst-style US analysis while presenting itself primarily as a market-data-only tool. Even if read-only, these functions expand the sensitivity and decision-support profile of the skill and can bypass user expectations about what data will be accessed.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The skill advertises account/asset summary functions and analyst-style US analysis while presenting itself primarily as a market-data-only tool. Even if read-only, these functions expand the sensitivity and decision-support profile of the skill and can bypass user expectations about what data will be accessed.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The document first reassures that the skill does not provide account or holding queries, then later claims support for wealth balance and total asset queries. This internal contradiction is dangerous because it undermines informed consent and can cause sensitive financial data access under false assumptions of low-risk functionality.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The documentation broadens a market-data skill into wealth/account asset retrieval, which is a materially more sensitive domain than quote data. Scope drift of this kind is dangerous because policy engines, auditors, and users may permit the skill assuming low sensitivity while it can actually expose private financial information.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

High
Category
Not specified by scanner
Confidence
96% confidence
Finding

The 'not supported' section forbids account/fund queries, but later sections reintroduce wealth asset retrieval. Such contradictions create a governance gap: downstream systems may whitelist the skill based on the restrictive section while the actual documented behavior enables access to sensitive user financial data.

Content

No source excerpt is available for this finding.

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 91)May include surrounding context.

md
- `references/openapi.yaml`、`references/enum.yaml`、`references/entity.yaml` 是本 skill 的协议源文件。

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The command examples directly include wealth asset endpoints despite the manifest saying the skill is not for account or holdings scenarios. Concrete examples make accidental or automated misuse more likely because operators may invoke sensitive endpoints without realizing they violate the declared scope.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The OpenAPI spec exposes token issuance and token deletion endpoints even though the skill is described as read-only market-data lookup. This creates an unnecessary authentication-management capability that expands the attack surface and could let a caller obtain, rotate, or revoke bearer tokens outside the intended scope of the skill.

Content

No source excerpt is available for this finding.

Direct Prompt Extraction

High
Category
System Prompt Leakage
Confidence
85% confidence
Finding

Skill contains instructions that could directly expose system prompts, internal rules, or hidden instructions to users or external parties.

Content

Scanner excerpt · references/routing-spec.md (reported line 56)May include surrounding context.

md
- “腾讯” 可能需要明确是否腾讯控股
- “苹果” 默认候选可能是 `US-AAPL`,但仍应允许用户纠正

## Output Rule

对用户回复时,可以同时展示:
- 股票名称

Direct Prompt Extraction

High
Category
System Prompt Leakage
Confidence
85% confidence
Finding

Skill contains instructions that could directly expose system prompts, internal rules, or hidden instructions to users or external parties.

Content

Scanner excerpt · references/symbol-resolution.md (reported line 39)May include surrounding context.

md
- “腾讯” 可能需要明确是否腾讯控股
- “苹果” 默认候选可能是 `US-AAPL`,但仍应允许用户纠正

## Output Rule

对用户回复时,可以同时展示:
- 股票名称

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The usage guide documents wealth_balance_list, wealth_total_asset, and wealth_fixed_income, which go beyond the manifest’s declared stock-market read-only scope and enter account/asset domains. This creates a scope mismatch that can cause an agent or operator to invoke sensitive wealth endpoints under a skill that users would reasonably trust as market-data-only, increasing the risk of unauthorized financial data exposure.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The skill metadata explicitly says it is not for accounts, holdings, or related financial operations, yet the guide instructs use of balance and asset query commands. This contradiction is dangerous because downstream agents may rely on the stated safe scope while the documented commands enable access to potentially sensitive account-level financial information.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The skill metadata says it is only for read-only stock-market quote and market data queries, but this code adds multiple wealth/asset intents such as balance lists, total assets, fixed income, and private contract assets. Even if these endpoints are read-only, they access account-level financial data outside the declared scope, creating a scope-creep/data-exposure issue that could leak sensitive portfolio information or bypass user expectations and review boundaries.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The code directly calls wealth/account asset endpoints such as /wealth/balance_list, /wealth/cash_total_asset, /wealth/fixed_income, /wealth/query_private_contract_asset_list, and /wealth/total_asset in a skill presented as a stock quote lookup tool. This mismatch increases the risk of unauthorized retrieval or accidental exposure of highly sensitive financial account data if the environment has valid credentials configured.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The file contains multiple functions that summarize wealth, balance, fixed-income, private contract, and total asset data, which goes beyond the skill’s declared scope of read-only market-data queries. Even without trade execution, exposing account and portfolio data materially expands access to sensitive financial information and can enable privacy breaches or unauthorized financial profiling if the skill is invoked in the wrong context.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

Account balance and portfolio analysis capability is inconsistent with a quote/market-summary skill and introduces unnecessary access to highly sensitive financial holdings data. This kind of scope creep increases the blast radius of prompt-routing mistakes, authorization bugs, or downstream data leakage because a user asking for quotes could unintentionally trigger processing of private asset information.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
82% confidence
Finding

The skill declares no explicit tool scope while its documentation clearly implies access to environment secrets, local file reads, and outbound network calls. In an agent framework, missing scope declarations weaken least-privilege controls and can let a seemingly simple market-data skill use more capability than reviewers or users expect.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

The skill discusses wealth and account-like queries without a clear warning that these are sensitive personal financial data. In context, this increases privacy risk because a user or agent may treat the skill like a simple public market-data tool and inadvertently expose account-level information.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The purpose description is written entirely in Chinese, while the rest of the file structure is English, which suggests a language constraint without any opt-in or explanation. Under the policy rule, forcing a specific language without user choice or clear region-specific justification is a natural-language policy concern.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The markdown content, including section examples and routing hints, is entirely in Chinese and provides no indication that another language is supported or that Chinese is an intentional region-specific limitation. Under the policy rule, a language constraint should be optional, user-selectable, or clearly justified.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The file's natural-language instructions and examples are entirely in Chinese, which can constitute a language/locale policy violation when no user opt-in or alternative language support is provided. The content does not state that the skill is region-specific or otherwise justified to require Chinese.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
77% confidence
Finding

The document describes product rules centered on Chinese-language interaction, including parsing Chinese names and clarifying ambiguity for Chinese company names, but it does not indicate that users may choose another language or locale. This can amount to a language/locale policy issue when the skill behavior is effectively constrained to Chinese without explicit opt-in or justification.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

This markdown file contains user-facing documentation in Chinese and does not indicate that language selection is optional or limited to a China-specific audience. The stated policy flags locale or language constraints when a skill effectively forces a specific language without user opt-in.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.