Back to skill

Security audit

Amap Maps StreamableHTTP

Security checks for vulnerabilities and agentic risk

Overview

The skill is a coherent maps gateway wrapper, but it handles sensitive location/IP data with a shared fallback credential and unpinned executable dependencies that users should review before installing.

Install only if you are comfortable sending map queries, coordinates, addresses, routes, IPs, and any extra JSON fields you provide to the OneKey/AMap gateway. Prefer setting your own DEEPNLP_ONEKEY_ROUTER_ACCESS key, avoid the demo fallback, pin dependencies in an isolated environment, and review provider logging/retention policies before using sensitive locations.

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
requirements.txt:1
Finding
Mutable and Unverified Third-Party Dependencies<![CDATA[ ## Vulnerability Details **File Location**: `requirements.txt:1`; `SKILL.md:9-15`, `SKILL.md:22-31`, and `SKILL.md:261-276` **Vulnerability Type**: Supply-chain exposure caused by non-reproducible dependency installation **Risk Level**: Medium ### Vulnerable Code `requirements.txt:1`: ```text ai-agent-marketplace>=0.0.10 ``` `SKILL.md:9-15`: ```yaml dependencies: npm: - "@aiagenta2z/onekey-gateway" python: - "ai-agent-marketplace" installation: npm: npm -g install @aiagenta2z/onekey-gateway python: pip install ai-agent-marketplace ``` `SKILL.md:22-31`: ```markdown Install the required Python package before running any scripts. ```bash pip install ai-agent-marketplace ``` Alternatively, install dependencies from the requirements file: ```bash pip install -r requirements.txt ``` ``` ### Technical Analysis The Skill requires executable third-party Python and npm packages but does not pin them to exact, reviewed versions or provide integrity hashes. The Python constraint accepts version `0.0.10` and every later release. The npm commands similarly resolve the current registry release, and one documented command installs the package globally. Consequently, installation is not reproducible: code installed after this audit may differ from code previously reviewed. Package installation and subsequent imports can execute code outside this repository. This creates a supply-chain attack surface if a publisher account, package release, transitive dependency, or registry delivery path is compromised. The audit did not establish that either named package is currently malicious. The confirmed issue is the unsafe dependency policy that permits future unreviewed code to enter the execution path. ### Attack Path 1. An attacker compromises a dependency publisher, transitive dependency, or package release process. 2. The attacker publishes a malicious version that still satisfies `ai-agent-marketplace>=0.0.10`, or replaces the npm package ver ...[truncated 1016 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Pin Python dependencies to exact reviewed versions, for example: ```text ai-agent-marketplace==<reviewed-version> --hash=sha256:<verified-hash> ``` 2. Generate dependencies with hashes using a reproducible workflow such as `pip-compile --generate-hashes`, and install with `pip install --require-hashes`. 3. Commit an npm lock file and use `npm ci` rather than resolving the latest package dynamically. 4. Pin the npm dependency to an exact reviewed version rather than using an unconstrained installation command. 5. Avoid global npm installation. Install into a project-local, isolated environment with least privilege. 6. Disable package lifecycle scripts where compatible, and review all required install hooks before enabling them. 7. Audit transitive dependencies and verify package ownership, provenance, signatures, and registry source. 8. Run dependency installation and Skill execution in a sandbox with restricted filesystem, environment-variable, and network access. 9. Establish a controlled update process in which new versions are reviewed and tested before lock files and hashes are changed. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/maps_around_search.py:9
Finding
Public Shared Credential Used as an Authentication Fallback<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:41-45`; line 10 of every Python file under `scripts/` **Vulnerability Type**: Hardcoded shared access credential and fail-open authentication **Risk Level**: Medium **Affected scripts**: - `scripts/maps_around_search.py:9-11` - `scripts/maps_direction_bicycling.py:9-11` - `scripts/maps_direction_driving.py:9-11` - `scripts/maps_direction_transit_integrated.py:9-11` - `scripts/maps_direction_walking.py:9-11` - `scripts/maps_distance.py:9-11` - `scripts/maps_geo.py:9-11` - `scripts/maps_ip_location.py:9-11` - `scripts/maps_regeocode.py:9-11` - `scripts/maps_schema_navi.py:9-11` - `scripts/maps_schema_personal_map.py:9-11` - `scripts/maps_schema_take_taxi.py:9-11` - `scripts/maps_search_detail.py:9-11` - `scripts/maps_text_search.py:9-11` - `scripts/maps_weather.py:9-11` ### Vulnerable Code The following complete function is duplicated in all affected scripts: ```python def build_router(): onekey = os.getenv("DEEPNLP_ONEKEY_ROUTER_ACCESS", "BETA_TEST_KEY_MARCH_2026") return OneKeyAgentRouter(onekey=onekey) ``` Each script then forwards its complete payload through the authenticated router. For example, `scripts/maps_around_search.py:40-45` contains: ```python router = build_router() result = router.invoke( unique_id="amap-maps-streamableHTTP/amap-maps-streamableHTTP", api_id="maps_around_search", data=payload, ) ``` The fallback is explicitly documented in `SKILL.md:41-45`: ```markdown Set your OneKey access key: ```bash export DEEPNLP_ONEKEY_ROUTER_ACCESS=YOUR_API_KEY ``` If no key is provided, the scripts fall back to the demo key `BETA_TEST_KEY_MARCH_2026`. ``` ### Technical Analysis Although the Skill metadata declares `DEEPNLP_ONEKEY_ROUTER_ACCESS` as required, every script silently substitutes a repository-visible shared credential when that variable is missing. Authentication therefore fails open rather than stopping execution. Because the credential is public and ...[truncated 2141 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Remove the hardcoded fallback from every script: ```python def build_router(): onekey = os.getenv("DEEPNLP_ONEKEY_ROUTER_ACCESS") if not onekey: raise SystemExit( "DEEPNLP_ONEKEY_ROUTER_ACCESS must be configured." ) return OneKeyAgentRouter(onekey=onekey) ``` 2. Revoke or rotate the published demo credential if it grants active gateway access. 3. Require unique, per-user or per-workload credentials rather than a shared key. 4. Scope credentials to only the required map APIs and apply restrictive quotas. 5. Prefer short-lived credentials issued through a managed secret service. 6. Ensure credentials are never printed, included in error responses, or written to logs. 7. Add explicit user-facing disclosure that supplied addresses, coordinates, IP addresses, routes, and search terms are transmitted to an external gateway and map provider. 8. Define gateway retention, access-control, and audit policies for location-related payloads. 9. Add automated tests confirming that all scripts terminate before network activity when the required environment variable is absent. 10. Centralize router construction in one reviewed module to prevent inconsistent authentication behavior across the 15 wrappers. ]]>
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 (46)

Lp3

Medium
Category
MCP Least Privilege
Confidence
87% confidence
Finding
The skill declares access to environment variables and implies file/script execution workflows, but it does not define an explicit permission or allowed-tools scope. In agent environments, missing scope boundaries can lead to broader-than-necessary capability exposure, making misuse of secrets like the API key or unintended local file access more likely.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
This skill sends highly sensitive data types, including precise location coordinates, travel routes, addresses, and IP addresses, to a third-party commercial API, but the documentation does not warn users about that disclosure. Users may unknowingly transmit personal or regulated data, creating privacy, compliance, and trust risks.

Missing User Warnings

Medium
Confidence
96% confidence
Finding
Documenting a fallback to a shared demo API key encourages users to send requests under a non-user-specific credential, which can expose their data to shared logging, quota abuse, and loss of accountability. Because the skill handles sensitive location and IP information, using a communal key materially increases privacy and misuse risk.

Natural-Language Policy Violations

Medium
Confidence
93% confidence
Finding
A substantial portion of the tool descriptions and parameter explanations is only provided in Chinese, while the rest of the file is in English, and the skill does not state that it is intentionally Chinese-only or offer an opt-in language selection. This creates a language-policy concern because the skill effectively forces a specific language for core usage details without user choice.

Rp1

Medium
Category
MCP Rug Pull
Confidence
93% confidence
Finding
Using 'npx onekey' without a pinned package version allows whatever version is current at execution time to be downloaded and run. This creates a supply-chain risk where a compromised or incompatible upstream release could execute unexpected code in the user's environment.

Rp1

Medium
Category
MCP Rug Pull
Confidence
93% confidence
Finding
Using 'npx onekey' without a pinned package version allows whatever version is current at execution time to be downloaded and run. This creates a supply-chain risk where a compromised or incompatible upstream release could execute unexpected code in the user's environment.

Rp1

Medium
Category
MCP Rug Pull
Confidence
93% confidence
Finding
Using 'npx onekey' without a pinned package version allows whatever version is current at execution time to be downloaded and run. This creates a supply-chain risk where a compromised or incompatible upstream release could execute unexpected code in the user's environment.

Rp1

Medium
Category
MCP Rug Pull
Confidence
93% confidence
Finding
Using 'npx onekey' without a pinned package version allows whatever version is current at execution time to be downloaded and run. This creates a supply-chain risk where a compromised or incompatible upstream release could execute unexpected code in the user's environment.

Rp1

Medium
Category
MCP Rug Pull
Confidence
93% confidence
Finding
Using 'npx onekey' without a pinned package version allows whatever version is current at execution time to be downloaded and run. This creates a supply-chain risk where a compromised or incompatible upstream release could execute unexpected code in the user's environment.

Rp1

Medium
Category
MCP Rug Pull
Confidence
93% confidence
Finding
Using 'npx onekey' without a pinned package version allows whatever version is current at execution time to be downloaded and run. This creates a supply-chain risk where a compromised or incompatible upstream release could execute unexpected code in the user's environment.

Rp1

Medium
Category
MCP Rug Pull
Confidence
93% confidence
Finding
Using 'npx onekey' without a pinned package version allows whatever version is current at execution time to be downloaded and run. This creates a supply-chain risk where a compromised or incompatible upstream release could execute unexpected code in the user's environment.

Rp1

Medium
Category
MCP Rug Pull
Confidence
93% confidence
Finding
Using 'npx onekey' without a pinned package version allows whatever version is current at execution time to be downloaded and run. This creates a supply-chain risk where a compromised or incompatible upstream release could execute unexpected code in the user's environment.

Rp1

Medium
Category
MCP Rug Pull
Confidence
93% confidence
Finding
Using 'npx onekey' without a pinned package version allows whatever version is current at execution time to be downloaded and run. This creates a supply-chain risk where a compromised or incompatible upstream release could execute unexpected code in the user's environment.

Rp1

Medium
Category
MCP Rug Pull
Confidence
93% confidence
Finding
Using 'npx onekey' without a pinned package version allows whatever version is current at execution time to be downloaded and run. This creates a supply-chain risk where a compromised or incompatible upstream release could execute unexpected code in the user's environment.

Rp1

Medium
Category
MCP Rug Pull
Confidence
93% confidence
Finding
Using 'npx onekey' without a pinned package version allows whatever version is current at execution time to be downloaded and run. This creates a supply-chain risk where a compromised or incompatible upstream release could execute unexpected code in the user's environment.

Rp1

Medium
Category
MCP Rug Pull
Confidence
93% confidence
Finding
Using 'npx onekey' without a pinned package version allows whatever version is current at execution time to be downloaded and run. This creates a supply-chain risk where a compromised or incompatible upstream release could execute unexpected code in the user's environment.

Rp1

Medium
Category
MCP Rug Pull
Confidence
93% confidence
Finding
Using 'npx onekey' without a pinned package version allows whatever version is current at execution time to be downloaded and run. This creates a supply-chain risk where a compromised or incompatible upstream release could execute unexpected code in the user's environment.

Rp1

Medium
Category
MCP Rug Pull
Confidence
93% confidence
Finding
Using 'npx onekey' without a pinned package version allows whatever version is current at execution time to be downloaded and run. This creates a supply-chain risk where a compromised or incompatible upstream release could execute unexpected code in the user's environment.

Rp1

Medium
Category
MCP Rug Pull
Confidence
93% confidence
Finding
Using 'npx onekey' without a pinned package version allows whatever version is current at execution time to be downloaded and run. This creates a supply-chain risk where a compromised or incompatible upstream release could execute unexpected code in the user's environment.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The script forwards user-supplied payload data to an external service through OneKeyAgentRouter without any explicit disclosure, consent prompt, or data-sensitivity checks. Because the required fields include location and free-form keywords, users may unintentionally transmit sensitive or identifying information to a third-party endpoint, creating privacy and data-governance risk.

Context-Inappropriate Capability

Medium
Confidence
95% confidence
Finding
The script reads a router access credential from an environment variable and silently falls back to a hardcoded default token when the variable is unset. Embedding a default access key in a distributed wrapper increases the risk of unauthorized API use, accidental credential exposure, and makes the credential-handling behavior broader than necessary for a simple maps wrapper.

Missing User Warnings

Medium
Confidence
88% confidence
Finding
The script transmits the user-provided payload, including origin and destination fields, to an external router via `router.invoke(...)`. While the code prints the result, it does not provide any confirmation prompt, warning message, or explanatory comment/docstring disclosing that location data will be sent over the network.

Missing User Warnings

Medium
Confidence
91% confidence
Finding
The script forwards user-supplied origin, destination, and city fields to an external router service without any explicit disclosure, consent prompt, or minimization checks. Because these fields can contain sensitive location or travel information, this creates a real privacy and data-handling risk, especially when users may not realize their input is being transmitted off-host.

Missing User Warnings

Medium
Confidence
85% confidence
Finding
This code sends the payload, including user-provided origin and destination fields, to an external router via `router.invoke(...)`. There is no confirmation prompt, visible disclosure, or explanatory comment/docstring warning that input data will be transmitted off-host.

Missing User Warnings

Medium
Confidence
85% confidence
Finding
The script sends the user-provided payload to an external router via `router.invoke(...)`, which is a network/data-transmission operation. There is no confirmation prompt, logging, comment, or docstring disclosing that input data will be sent to an external service.

Static analysis

No suspicious patterns detected.