Back to skill

Security audit

Mcp Server Chart

Security checks for vulnerabilities and agentic risk

Overview

The skill largely matches its chart and map-generation purpose, but it should be reviewed because it sends user payloads to an external gateway while using unpinned dependencies and a shared fallback access key.

Review before installing. Use your own OneKey key, avoid sending private spreadsheet data or sensitive home/work/medical/travel locations, run the tools in a constrained environment, and prefer pinned, audited dependency versions instead of the unpinned npm, pip, and npx commands shown here.

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

T08 · Insecure Dependencies

Warning
Location
SKILL.md:10
Finding
Unpinned Third-Party Gateway Dependencies Create a Supply-Chain Risk<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:10-15`, `SKILL.md:683-697` **Vulnerability Type**: Unpinned third-party dependencies and implicit retrieval of current package releases **Risk Level**: Medium ### Vulnerable Code ```yaml dependencies: npm: - "@aiagenta2z/onekey-gateway" python: - "ai-agent-marketplace" installation: npm: npm -g install @aiagenta2z/onekey-gateway python: pip install ai-agent-marketplace ``` The installation instructions later repeat the unpinned commands: ```bash npm install @aiagenta2z/onekey-gateway ``` ```bash pip install ai-agent-marketplace ``` The documented CLI examples also use `npx` without specifying a reviewed package version: ```shell npx onekey agent mcp-server-chart/mcp-server-chart generate_area_chart '{}' ``` ### Technical Analysis Neither the npm dependency nor the Python dependency is pinned to an exact reviewed version. No lockfile or package integrity hash is included in the audited project. Consequently, following the installation instructions can install whichever package release the registry currently serves rather than the release originally reviewed by the project author. The Python scripts import `OneKeyAgentRouter` directly from `ai_agent_marketplace`. This dependency receives the access key and complete user payload, making it part of the security boundary: ```python from ai_agent_marketplace import OneKeyAgentRouter ``` Because the implementation of that package is not included in the project, its network destinations and internal handling of credentials and data could not be verified by this audit. This does not prove that the current packages are malicious, but it exposes users to future package compromise, publisher-account compromise, or an unexpectedly incompatible release. ### Attack Path 1. An attacker compromises a dependency publisher account, package registry release process, or a transitive dependency. 2. The attacker publishes a modified release ...[truncated 921 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Pin both dependencies to exact, reviewed versions rather than version ranges or latest releases. 2. Add lockfiles containing resolved transitive dependency versions. 3. Verify package integrity with registry-supported hashes or a trusted artifact repository. 4. Replace implicit `npx` resolution with an explicitly installed, pinned CLI binary. 5. Review package provenance, publisher identity, release signatures, and installation hooks before deployment. 6. Document the expected gateway domains and enforce outbound network allowlisting where possible. 7. Run the tools in a restricted environment with minimal filesystem access and no unnecessary credentials. 8. Establish an update process in which new dependency versions are audited and tested before the pins are changed. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/generate_area_chart.py:9
Finding
Public Shared Fallback Access Key Is Embedded in Every Executable Script<![CDATA[ ## Vulnerability Details **File Location**: `scripts/generate_area_chart.py:9-11` and the corresponding `build_router` function at lines 9-11 of every Python script under `scripts/` **Vulnerability Type**: Hardcoded shared credential and failure to reject missing credentials **Risk Level**: Medium ### Vulnerable Code ```python def build_router(): onekey = os.getenv("DEEPNLP_ONEKEY_ROUTER_ACCESS", "BETA_TEST_KEY_MARCH_2026") return OneKeyAgentRouter(onekey=onekey) ``` This identical credential fallback appears in all 27 executable scripts: - `generate_area_chart.py` - `generate_bar_chart.py` - `generate_boxplot_chart.py` - `generate_column_chart.py` - `generate_district_map.py` - `generate_dual_axes_chart.py` - `generate_fishbone_diagram.py` - `generate_flow_diagram.py` - `generate_funnel_chart.py` - `generate_histogram_chart.py` - `generate_line_chart.py` - `generate_liquid_chart.py` - `generate_mind_map.py` - `generate_network_graph.py` - `generate_organization_chart.py` - `generate_path_map.py` - `generate_pie_chart.py` - `generate_pin_map.py` - `generate_radar_chart.py` - `generate_sankey_chart.py` - `generate_scatter_chart.py` - `generate_spreadsheet.py` - `generate_treemap_chart.py` - `generate_venn_chart.py` - `generate_violin_chart.py` - `generate_waterfall_chart.py` - `generate_word_cloud_chart.py` ### Technical Analysis When `DEEPNLP_ONEKEY_ROUTER_ACCESS` is absent, each script silently selects the repository-public string `BETA_TEST_KEY_MARCH_2026`. A credential embedded in distributed source code cannot be treated as secret or tied reliably to an individual user. Failing open with a shared key also makes it difficult to enforce per-user authorization, attribution, revocation, and quota isolation. Users may unknowingly submit their payloads through a shared identity because the scripts do not warn them that their private credential is missing. The payload is then sent to the external router: ```python router = build_router( ...[truncated 1490 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Remove the fallback credential from every script. 2. Fail closed when `DEEPNLP_ONEKEY_ROUTER_ACCESS` is missing: ```python def build_router(): onekey = os.getenv("DEEPNLP_ONEKEY_ROUTER_ACCESS") if not onekey: raise SystemExit( "DEEPNLP_ONEKEY_ROUTER_ACCESS must be configured before use." ) return OneKeyAgentRouter(onekey=onekey) ``` 3. Revoke or rotate `BETA_TEST_KEY_MARCH_2026`, because it must be considered publicly exposed. 4. Issue individual, narrowly scoped credentials with independent quotas and revocation controls. 5. Avoid placing credentials in source code, examples, command histories, or process arguments. 6. Add explicit user-facing notice that tool payloads are transmitted to an external gateway. 7. Apply provider-side rate limits, scope restrictions, expiration, monitoring, and anomaly detection. 8. Consolidate router construction into one reviewed shared module to prevent the insecure fallback from being duplicated across all scripts. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • 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 (106)

Tp4

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding
The declared description is very broad and generic, saying only that this is an auto-generated skill for mcp-server-chart tools via OneKey Gateway. The actual code is narrower and more specific: it implements a command-line entry point for the particular remote API 'generate_mind_map'. It validates input, requires a 'data' field, and sends the payload to a remote OneKeyAgentRouter using an access token from the DEEPNLP_ONEKEY_ROUTER_ACCESS environment variable (with a fallback default value). While the remote invocation via OneKey Gateway partially aligns with the description, the primary purpose is specifically mind-map generation rather than general chart tools, and the external credentialed remote call is not captured in the declared permissions or description. This is a meaningful description-behavior mismatch.

Lp3

Medium
Category
MCP Least Privilege
Confidence
84% confidence
Finding
The skill declares environment-variable and file/script usage capabilities but does not define any explicit tool scope or permission boundaries. In an agent ecosystem, this increases the chance that a host or user treats the skill as lower-risk than it really is, enabling over-broad access to secrets or local files during execution.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
Publishing and encouraging fallback to a shared demo API key can cause unintentional credential sharing, weak accountability, and leakage of user data through a common tenant. Anyone using the skill without their own key may send potentially sensitive content through a publicly known shared access path.

Ssd 3

Medium
Confidence
96% confidence
Finding
Exposing a shared fallback key in plain text normalizes embedded credential use and invites abuse, unauthorized reuse, and blending of multiple users' data under one credential. In a hosted or multi-user agent environment, this can lead to privacy incidents, billing abuse, and difficulty tracing misuse.

Natural-Language Policy Violations

Medium
Confidence
85% confidence
Finding
Several map-related sections require Chinese administrative-region names or POI names and limit operation to locations within China. This is a locale/language restriction expressed in natural language, but the documentation does not frame it as an explicit region-specific limitation with user opt-in or explain the constraint as a justified compliance or product boundary.

Missing User Warnings

Medium
Confidence
87% confidence
Finding
The path map feature solicits planned route information, which can reveal movement patterns, destinations, and personal habits if sent to a remote service. Without a warning or consent step, users may unknowingly disclose sensitive travel plans.

Context-Inappropriate Capability

Medium
Confidence
85% confidence
Finding
The documentation advertises POI search, detailed location lookup, and photo retrieval capabilities that go beyond simple chart rendering. In agent settings, users may submit sensitive addresses, routes, or place names without realizing this data is being sent to an external service for enrichment.

Missing User Warnings

Medium
Confidence
89% confidence
Finding
The map tools describe transmitting POI keywords to retrieve detailed location information and photos, but no privacy or data-handling warning accompanies this behavior. This can mislead users into sharing sensitive places such as home, workplace, medical, or travel destinations with a third party.

Rp1

Medium
Category
MCP Rug Pull
Confidence
93% confidence
Finding
Using `npx onekey` without a pinned version allows the latest package version to be fetched and executed at runtime, creating a supply-chain risk. A malicious or compromised upstream release could execute arbitrary code in the user's environment when the documented command is followed.

Rp1

Medium
Category
MCP Rug Pull
Confidence
93% confidence
Finding
Using `npx onekey` without a pinned version allows the latest package version to be fetched and executed at runtime, creating a supply-chain risk. A malicious or compromised upstream release could execute arbitrary code in the user's environment when the documented command is followed.

Rp1

Medium
Category
MCP Rug Pull
Confidence
93% confidence
Finding
Using `npx onekey` without a pinned version allows the latest package version to be fetched and executed at runtime, creating a supply-chain risk. A malicious or compromised upstream release could execute arbitrary code in the user's environment when the documented command is followed.

Rp1

Medium
Category
MCP Rug Pull
Confidence
93% confidence
Finding
Using `npx onekey` without a pinned version allows the latest package version to be fetched and executed at runtime, creating a supply-chain risk. A malicious or compromised upstream release could execute arbitrary code in the user's environment when the documented command is followed.

Rp1

Medium
Category
MCP Rug Pull
Confidence
93% confidence
Finding
Using `npx onekey` without a pinned version allows the latest package version to be fetched and executed at runtime, creating a supply-chain risk. A malicious or compromised upstream release could execute arbitrary code in the user's environment when the documented command is followed.

Rp1

Medium
Category
MCP Rug Pull
Confidence
93% confidence
Finding
Using `npx onekey` without a pinned version allows the latest package version to be fetched and executed at runtime, creating a supply-chain risk. A malicious or compromised upstream release could execute arbitrary code in the user's environment when the documented command is followed.

Rp1

Medium
Category
MCP Rug Pull
Confidence
93% confidence
Finding
Using `npx onekey` without a pinned version allows the latest package version to be fetched and executed at runtime, creating a supply-chain risk. A malicious or compromised upstream release could execute arbitrary code in the user's environment when the documented command is followed.

Rp1

Medium
Category
MCP Rug Pull
Confidence
93% confidence
Finding
Using `npx onekey` without a pinned version allows the latest package version to be fetched and executed at runtime, creating a supply-chain risk. A malicious or compromised upstream release could execute arbitrary code in the user's environment when the documented command is followed.

Rp1

Medium
Category
MCP Rug Pull
Confidence
93% confidence
Finding
Using `npx onekey` without a pinned version allows the latest package version to be fetched and executed at runtime, creating a supply-chain risk. A malicious or compromised upstream release could execute arbitrary code in the user's environment when the documented command is followed.

Rp1

Medium
Category
MCP Rug Pull
Confidence
93% confidence
Finding
Using `npx onekey` without a pinned version allows the latest package version to be fetched and executed at runtime, creating a supply-chain risk. A malicious or compromised upstream release could execute arbitrary code in the user's environment when the documented command is followed.

Rp1

Medium
Category
MCP Rug Pull
Confidence
93% confidence
Finding
Using `npx onekey` without a pinned version allows the latest package version to be fetched and executed at runtime, creating a supply-chain risk. A malicious or compromised upstream release could execute arbitrary code in the user's environment when the documented command is followed.

Rp1

Medium
Category
MCP Rug Pull
Confidence
93% confidence
Finding
Using `npx onekey` without a pinned version allows the latest package version to be fetched and executed at runtime, creating a supply-chain risk. A malicious or compromised upstream release could execute arbitrary code in the user's environment when the documented command is followed.

Rp1

Medium
Category
MCP Rug Pull
Confidence
93% confidence
Finding
Using `npx onekey` without a pinned version allows the latest package version to be fetched and executed at runtime, creating a supply-chain risk. A malicious or compromised upstream release could execute arbitrary code in the user's environment when the documented command is followed.

Rp1

Medium
Category
MCP Rug Pull
Confidence
93% confidence
Finding
Using `npx onekey` without a pinned version allows the latest package version to be fetched and executed at runtime, creating a supply-chain risk. A malicious or compromised upstream release could execute arbitrary code in the user's environment when the documented command is followed.

Rp1

Medium
Category
MCP Rug Pull
Confidence
93% confidence
Finding
Using `npx onekey` without a pinned version allows the latest package version to be fetched and executed at runtime, creating a supply-chain risk. A malicious or compromised upstream release could execute arbitrary code in the user's environment when the documented command is followed.

Rp1

Medium
Category
MCP Rug Pull
Confidence
93% confidence
Finding
Using `npx onekey` without a pinned version allows the latest package version to be fetched and executed at runtime, creating a supply-chain risk. A malicious or compromised upstream release could execute arbitrary code in the user's environment when the documented command is followed.

Rp1

Medium
Category
MCP Rug Pull
Confidence
93% confidence
Finding
Using `npx onekey` without a pinned version allows the latest package version to be fetched and executed at runtime, creating a supply-chain risk. A malicious or compromised upstream release could execute arbitrary code in the user's environment when the documented command is followed.

Static analysis

No suspicious patterns detected.