Back to skill

Security audit

Google Maps

Security checks for vulnerabilities and agentic risk

Overview

This Google Maps skill is coherent, but it should be reviewed because it auto-falls back to a bundled shared gateway key and uses unpinned external installs while sending location queries to external services.

Install only after reviewing the OneKey Gateway dependency and data handling. Use your own scoped API key, avoid relying on the bundled demo key, pin npm and Python dependency versions, and avoid submitting highly sensitive home, workplace, or travel locations unless you are comfortable sending them through OneKey/Google-backed services.

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

Unpinned third-party dependencies permit uncontrolled package upgrades

Content
View full analysis

Vulnerability Details

File Location: requirements.txt:1; SKILL.md:8-15
Vulnerability Type: Supply-chain exposure through unpinned dependencies
Risk Level: Medium

Vulnerable Code

requirements.txt:1:

text
ai-agent-marketplace>=0.0.10

SKILL.md:8-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

Technical Analysis

The Python requirement uses an open-ended lower bound, while the npm dependency has no version constraint. Consequently, a fresh installation can resolve to any future compatible Python release and the current npm release without repository-controlled review.

The skill documentation instructs users or agents to install these dependencies before executing the scripts. Every Python script imports OneKeyAgentRouter from ai_agent_marketplace, so package initialization code executes in the local Python process. The npm package is also installed globally in the documented command, increasing the consequences of a compromised release because package lifecycle scripts may run during installation and the resulting executable is exposed system-wide.

No malicious dependency payload was present in the audited project itself. The vulnerability is the lack of reproducible dependency resolution, which creates an avoidable supply-chain attack path if a package publisher account, registry package, or future release is compromised.

Attack Path

  1. An attacker compromises a dependency publisher or causes a malicious future version of ai-agent-marketplace or @aiagenta2z/onekey-gateway to be published.
  2. A user or automated agent follows SKILL.md and performs a fresh installation.
  3. The unconstrained npm specification or Python >= range resolves to the attacker-controlled release.
  4. Mal ...[truncated 801 chars]
Remediation
View remediation

Remediation Suggestions

  • Pin Python dependencies to reviewed exact versions, for example ai-agent-marketplace==X.Y.Z.
  • Pin the npm package to an exact reviewed version rather than installing the latest release.
  • Commit lock files with integrity hashes where the installation workflow supports them.
  • For Python, use a hash-locked requirements file generated by a dependency-locking tool and install with pip --require-hashes.
  • Avoid global npm installation. Use a project-local dependency with a committed lock file and invoke the locally resolved binary.
  • Disable or tightly control npm lifecycle scripts where operationally possible.
  • Use an internal package mirror or allowlist and add automated dependency vulnerability and provenance checks.
  • Review and deliberately update dependency pins instead of accepting future releases automatically.

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/maps_directions.py:8
Finding

Hardcoded shared gateway credential is used when no user credential is configured

Content
View full analysis

Vulnerability Details

File Location: scripts/maps_directions.py:8-10; scripts/maps_distance_matrix.py:8-10; scripts/maps_elevation.py:8-10; scripts/maps_geocode.py:8-10; scripts/maps_place_details.py:8-10; scripts/maps_reverse_geocode.py:8-10; scripts/maps_search_places.py:8-10
Vulnerability Type: Hardcoded credential and insecure authentication fallback
Risk Level: Medium

Vulnerable Code

The following implementation is repeated in all seven scripts:

python
def build_router():
    onekey = os.getenv("DEEPNLP_ONEKEY_ROUTER_ACCESS", "BETA_TEST_KEY_MARCH_2026")
    return OneKeyAgentRouter(onekey=onekey)

SKILL.md also explicitly documents the fallback:

text
If no key is provided, the scripts fall back to the demo key `BETA_TEST_KEY_MARCH_2026`.

Technical Analysis

A gateway access key is embedded directly in the distributed source and automatically selected whenever DEEPNLP_ONEKEY_ROUTER_ACCESS is absent. Anyone with access to the package can recover and reuse this value. The behavior also prevents a secure fail-closed configuration: a missing credential silently results in authenticated requests under a shared identity rather than terminating with a configuration error.

Even if the value is intended as a restricted demonstration credential, embedding and automatically using it prevents reliable per-user attribution, rotation, revocation, quota isolation, and auditing. User-supplied addresses, coordinates, place identifiers, and travel queries are forwarded through OneKeyAgentRouter under this common credential.

Attack Path

  1. An attacker obtains the published skill or reads its documentation.
  2. The attacker extracts BETA_TEST_KEY_MARCH_2026.
  3. The attacker supplies the key directly to the corresponding gateway client or runs one of the scripts without setting the environment variable.
  4. Requests are submitted under the shared credential until gate ...[truncated 1261 chars]
Remediation
View remediation

Remediation Suggestions

  • Remove the hardcoded fallback from every script.
  • Require DEEPNLP_ONEKEY_ROUTER_ACCESS and terminate with a clear error if it is missing.
  • Revoke or rotate the published shared key and inspect gateway logs for unexpected use.
  • Issue separate, least-privilege credentials per user, deployment, or environment.
  • Apply strict gateway-side API allowlists, quotas, rate limits, expiration, and usage monitoring.
  • Store credentials in a secret manager or protected environment configuration rather than source code or documentation.
  • Inform users before location-related data is sent to a third-party gateway and document the relevant data handling boundary.
  • Centralize router construction in one reviewed module to prevent the insecure fallback from being duplicated across scripts.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • 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
Findings (24)

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

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

Set your OneKey Access Key

In the .env file

shell
DEEPNLP_ONEKEY_ROUTER_ACCESS=YOUR_API_KEY

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
89% confidence
Finding

The skill declares an environment variable requirement but does not define any explicit tool scope such as permissions or allowed-tools. This weakens least-privilege controls and makes it harder for a host agent or reviewer to understand what external capabilities the skill needs, increasing the chance of unintended tool or secret exposure.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The skill sends addresses, coordinates, place searches, routes, and other location-derived data to external services via OneKey Gateway and Google Maps APIs, but it does not provide a clear user-facing privacy warning. This can cause users to disclose sensitive location information without informed consent, especially when queries may reveal home, workplace, travel, or operational patterns.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
95% confidence
Finding

Using 'npx onekey' without pinning a version allows execution of whatever package version is currently resolved from the registry at runtime. If the package is updated maliciously, compromised upstream, or unexpectedly changed, users may execute unreviewed code with access to their API key and query data.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
95% confidence
Finding

Using 'npx onekey' without pinning a version allows execution of whatever package version is currently resolved from the registry at runtime. If the package is updated maliciously, compromised upstream, or unexpectedly changed, users may execute unreviewed code with access to their API key and query data.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
95% confidence
Finding

Using 'npx onekey' without pinning a version allows execution of whatever package version is currently resolved from the registry at runtime. If the package is updated maliciously, compromised upstream, or unexpectedly changed, users may execute unreviewed code with access to their API key and query data.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
95% confidence
Finding

Using 'npx onekey' without pinning a version allows execution of whatever package version is currently resolved from the registry at runtime. If the package is updated maliciously, compromised upstream, or unexpectedly changed, users may execute unreviewed code with access to their API key and query data.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
95% confidence
Finding

Using 'npx onekey' without pinning a version allows execution of whatever package version is currently resolved from the registry at runtime. If the package is updated maliciously, compromised upstream, or unexpectedly changed, users may execute unreviewed code with access to their API key and query data.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
95% confidence
Finding

Using 'npx onekey' without pinning a version allows execution of whatever package version is currently resolved from the registry at runtime. If the package is updated maliciously, compromised upstream, or unexpectedly changed, users may execute unreviewed code with access to their API key and query data.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
95% confidence
Finding

Using 'npx onekey' without pinning a version allows execution of whatever package version is currently resolved from the registry at runtime. If the package is updated maliciously, compromised upstream, or unexpectedly changed, users may execute unreviewed code with access to their API key and query data.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The script sends user-supplied origin and destination data to an external service through OneKeyAgentRouter without any notice, consent prompt, or privacy disclosure. Location data is sensitive personal information, and silent transmission can expose home, work, or travel patterns to third-party services or logs.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The script sends user-supplied origins and destinations to an external router service via router.invoke, which may transmit sensitive location or address data off-system. Although the CLI arguments describe the input format, there is no confirmation prompt, warning print, comment, or docstring disclosing that this data will be sent to an external service.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The script sends the user-supplied locations to an external router via router.invoke(...), but there is no confirmation prompt, user-facing notice, or comment/docstring disclosing that location data will be transmitted off-host. Because location data can be privacy-sensitive, this should be explicitly surfaced to the user.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The code embeds a hardcoded fallback credential via os.getenv(..., "BETA_TEST_KEY_MARCH_2026"), which means the script will silently use a built-in token when no environment variable is set. Hardcoded credentials are dangerous because they can be extracted from source control or package contents and reused by unauthorized parties, and the fallback is not necessary for a simple geocoding wrapper.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The code invokes an external router and transmits the user-provided address in the request payload. There is no confirmation prompt, comment, docstring, or user-facing message indicating that the supplied address will be sent to a remote service, which is a privacy-relevant operation.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The script reads a credential from the environment but silently falls back to a hardcoded gateway key, which embeds usable secret material directly in code. This enables unauthorized use of the external gateway by anyone with code access and makes credential rotation, auditing, and revocation difficult; in an agent skill, it also creates an unexpected outbound access path unrelated to user-visible input validation or disclosure.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The skill accesses a sensitive credential and sends user-supplied data to an external gateway without any user-facing disclosure, consent mechanism, or warning about third-party transmission. In this context, the skill is explicitly a Google Maps integration via OneKey Gateway, so outbound calls are expected, but the undisclosed credential use and external routing still create privacy, governance, and misuse risks.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The code falls back to a hardcoded default router access token when the environment variable is absent. Embedding a credential-like value in source can enable unauthorized use of the upstream service, accidental credential leakage, and deployment with shared non-rotated secrets across environments.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The code loads router credentials from an environment variable but silently falls back to a hardcoded default key, which risks unauthorized use of a shared or test credential if no secret is configured. In a network-enabled agent skill, this can expose external service access, make activity attributable to the wrong account, and encourage insecure credential handling.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The router.invoke call transmits the query and optional location/radius payload to an external service, but this file does not include any visible warning, confirmation, or explanatory comment about the network transmission. Because location data can be privacy-sensitive, the lack of disclosure meets the missing user warning criterion for code files.

Content

No source excerpt is available for this finding.

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
95% confidence
Finding

The dependency is specified with a lower-bound constraint only, which allows installation of any newer version, including unreviewed major releases or compromised upstream publishes. This creates a supply-chain risk because builds are not reproducible and future installs may pull a vulnerable or malicious package version without changes to this repository.

Content

Scanner excerpt · requirements.txt (reported line 1)May include surrounding context.

text
ai-agent-marketplace>=0.0.10

Context-Inappropriate Capability

Low
Category
Not specified by scanner
Confidence
97% confidence
Finding

The code falls back to a hard-coded access token when the environment variable is absent, which effectively embeds a credential in the skill. This can enable unauthorized use of the upstream OneKey router, accidental credential disclosure through source distribution, and misuse across environments because the secret is not externally managed.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
76% confidence
Finding

The code reads DEEPNLP_ONEKEY_ROUTER_ACCESS to obtain router access credentials, but provides no comment, docstring, or user-facing explanation that credential material is being used for external service access. This reduces transparency for operators reviewing what sensitive inputs the skill depends on.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

This code sends the user's latitude and longitude to an external router service via router.invoke, but there is no confirmation prompt, warning message, or explanatory comment/docstring indicating that location data will be transmitted off-box. Because precise location data is privacy-sensitive, the absence of any disclosure is a quality/safety concern for a code file.

Content

No source excerpt is available for this finding.