Gaode Map JSAPI - 高德官方 JavaScript SDK Skill

Security checks across malware telemetry and agentic risk

Overview

This is a coherent Gaode Maps JavaScript SDK guide with expected credential and location-data caveats, but no hidden execution, persistence, or exfiltration behavior.

Install only if you are comfortable using AMap credentials and location features. Keep AMAP_SECURITY_JS_CODE out of frontend source and version control, prefer a backend proxy for production, restrict and rotate keys, and add explicit user consent and privacy handling before enabling geolocation or reverse-geocoding features.

SkillSpector

By NVIDIA
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (10)

Context-Inappropriate Capability

Medium
Confidence
96% confidence
Finding
The example injects inline HTML event handlers into InfoWindow content and relies on globally exposed functions such as `window.closeInfoWindow()` and `doSomething()`. This expands a display-oriented component into an execution surface; if developers later substitute dynamic or user-controlled content into the same pattern, it can enable DOM XSS or unauthorized actions triggered from injected markup.

Context-Inappropriate Capability

Medium
Confidence
91% confidence
Finding
The complete example mixes map display with globally callable action handlers such as `navigateTo(...)` and `shareLocation(...)`, wired through inline HTML in the popup. In isolation the sample only logs to console, but it normalizes a risky pattern where popup content becomes a command surface; if adapted with real side effects or untrusted POI fields, it can lead to script injection or abuse of privileged application actions.

Context-Inappropriate Capability

Medium
Confidence
92% confidence
Finding
The example uses `content` with raw HTML, which gives consumers a direct DOM injection sink. In this marker context the snippet itself is static, but it normalizes a dangerous pattern that can become XSS if developers later interpolate user-controlled values into the HTML string.

Context-Inappropriate Capability

Medium
Confidence
97% confidence
Finding
These helper functions interpolate parameters like `number`, `category`, and especially `name` directly into HTML template strings used as marker `content`. If any of those values come from user input or external data, an attacker can inject arbitrary HTML or script-bearing markup, leading to DOM XSS in applications that reuse this pattern.

Intent-Code Divergence

Medium
Confidence
97% confidence
Finding
The Java proxy example hardcodes `SECURITY_JS_CODE` directly in source as a static string, which contradicts the document's own guidance not to hardcode the security key. If copied into real projects, this increases the chance of secret leakage through source control, code sharing, builds, or logs, enabling abuse of the AMap quota and related API access.

Missing User Warnings

Medium
Confidence
88% confidence
Finding
The documentation describes precise and IP-based geolocation collection without any privacy warning, consent guidance, or data-handling caveats. In a developer skill, this can normalize collecting sensitive location data without informing end users, increasing the risk of privacy violations, over-collection, or noncompliant integrations.

Missing User Warnings

Medium
Confidence
91% confidence
Finding
The reverse geocoding options are documented without warning that enabling needAddress/extensions may derive structured address data, nearby POIs, roads, and intersections from a user's coordinates. This expands location sensitivity beyond raw coordinates and may expose highly identifying contextual information if developers enable it by default or without user awareness.

Missing User Warnings

Medium
Confidence
87% confidence
Finding
The IP-based city lookup is presented as a normal capability without warning that the user's IP address may be used to infer location. Even city-level inference is privacy-relevant, and omission of disclosure may lead developers to implement location inference without appropriate transparency or legal review.

Missing User Warnings

Medium
Confidence
93% confidence
Finding
The documentation explicitly states that the service URL is plaintext and that exposing the service ID and key can lead to data leakage, but the guidance is weak and framed as a suggestion rather than a clear security requirement. In a web JSAPI context, examples strongly influence implementation, so documenting credential-bearing client URLs normalizes insecure patterns that can result in credential theft, quota abuse, and unauthorized access to paid or private data services.

Missing User Warnings

Medium
Confidence
96% confidence
Finding
The example shows a browser-visible URL containing a key and data service ID placeholder, which teaches consumers to place sensitive credentials directly into frontend network requests. Even with placeholder text, this pattern is dangerous because developers often copy examples verbatim, leading to exposed credentials that can be harvested from source code, browser devtools, logs, or intermediary systems.

VirusTotal

59/59 vendors flagged this skill as clean.

View on VirusTotal